|
1 | 1 | Compiler Support Status |
2 | 2 | ======================= |
3 | 3 |
|
4 | | -This directory contains two categories of unit tests separated into two files: |
5 | | - |
6 | | -* `usage_test.f90` exercises the reference-counter library, whereas |
7 | | -* `compiler_test.f90` tests the compiler without using reference-counter, |
8 | | - |
9 | | -`compiler_test.f90` verifies that a compiler calls a type's final subroutine |
10 | | -in each of the scenarios in which the Fortran standard requires finalization |
11 | | -to occur. Because one test must run as an external subprogram and because |
12 | | -passing that test involves error termination, that test is in the separate |
13 | | -file [specification_expression_finalization.f90]. |
14 | | - |
15 | | -* [NAG] |
16 | | -* [GNU] |
17 | | -* [Cray] |
18 | | -* [Intel] |
19 | | -* [NVIDIA] |
20 | | -* [IBM] |
21 | | -* [AMD] |
22 | | -* [LLVM] |
23 | | - |
24 | | -NAG |
25 | | ---- |
26 | | -- Version: 7.1 (Build 7113) |
27 | | -- Result: 0 test failures. :trophy: |
| 4 | +This directory contains two categories of unit tests: |
28 | 5 |
|
29 | | -``` |
30 | | -nagfor compile_me_only.f90 |
31 | | -./a.out |
32 | | - Pass: finalizes a non-allocatable object on the LHS of an intrinsic assignment |
33 | | - Pass: finalizes an allocated allocatable LHS of an intrinsic assignment |
34 | | - Pass: finalizes a target when the associated pointer is deallocated |
35 | | - Pass: finalizes an object upon explicit deallocation |
36 | | - Pass: finalizes a non-pointer non-allocatable object at the END statement |
37 | | - Pass: finalizes a non-pointer non-allocatable object at the end of a block construct |
38 | | - Pass: finalizes a function reference on the RHS of an intrinsic assignment |
39 | | - Pass: finalizes a specification expression function result |
40 | | - Pass: finalizes an intent(out) derived type dummy argument |
41 | | - Pass: finalizes an allocatable component object |
42 | | -``` |
| 6 | +* [compiler_test_m.f90] tests the compiler without using Smart-Pointers, whereas |
| 7 | +* [sp_smart_pointer_test_m.f90] exercises the Smart-Pointers library. |
43 | 8 |
|
44 | | -GNU |
45 | | ---- |
46 | | -- Version: 12.2.0 |
47 | | -- Result: 4 test failures. |
| 9 | +[compiler_test_m.f90] verifies that a compiler calls a type's final subroutine |
| 10 | +in each of the scenarios in which the Fortran 2018 standard requires finalization |
| 11 | +to occur. |
48 | 12 |
|
49 | | -Because the first usage test causes a segmentation fault when compiled |
50 | | -with `gfortran`, obtaining the test results requires skipping that test |
51 | | -by running individual tests as follows: |
52 | | -``` |
53 | | -fpm test -- -f "<description>" |
54 | | -``` |
55 | | -Replace <description> above with one of the enumerated test descriptions, |
56 | | -shown after a colon below, or with a corresponding substring not contained |
57 | | -in the first usage test description. |
58 | | - |
59 | | -``` |
60 | | -gfortran compile_me_only.f90 |
61 | | -./a.out |
62 | | - Fail: finalizes a non-allocatable object on the LHS of an intrinsic assignment |
63 | | - Fail: finalizes an allocated allocatable LHS of an intrinsic assignment |
64 | | - Pass: finalizes a target when the associated pointer is deallocated |
65 | | - Pass: finalizes an object upon explicit deallocation |
66 | | - Pass: finalizes a non-pointer non-allocatable object at the END statement |
67 | | - Pass: finalizes a non-pointer non-allocatable object at the end of a block construct |
68 | | - Fail: finalizes a function reference on the RHS of an intrinsic assignment |
69 | | - Fail: finalizes a specification expression function result |
70 | | - Pass: finalizes an intent(out) derived type dummy argument |
71 | | - Pass: finalizes an allocatable component object |
72 | | -``` |
| 13 | +Summary |
| 14 | +------- |
73 | 15 |
|
74 | | -Cray |
75 | | ----- |
76 | | -- Version: 13.0.1 |
77 | | -- Result: 3 test failures. |
78 | | -``` |
79 | | -ftn compile_me_only.f90 |
80 | | -./a.out |
81 | | -Cray Fortran : Version 13.0.1 fails to compile specification_expression_finalization.f90 |
82 | | -Pass: finalizes a non-allocatable object on the LHS of an intrinsic assignment |
83 | | -Fail: finalizes an allocated allocatable LHS of an intrinsic assignment |
84 | | -Pass: finalizes a target when the associated pointer is deallocated |
85 | | -Pass: finalizes an object upon explicit deallocation |
86 | | -Pass: finalizes a non-pointer non-allocatable object at the END statement |
87 | | -Pass: finalizes a non-pointer non-allocatable object at the end of a block construct |
88 | | -Pass: finalizes a function reference on the RHS of an intrinsic assignment |
89 | | -Fail: finalizes a specification expression function result |
90 | | -Fail: finalizes an intent(out) derived type dummy argument |
91 | | -Pass: finalizes an allocatable component object |
92 | | -``` |
| 16 | +* [AMD](#amd): unsupported (fails to build Smart-Pointers) |
| 17 | +* [Cray](#cray): partial support (3 test failures) |
| 18 | +* [GCC](#gnu): partial support (6 test failures) |
| 19 | +* [IBM](#ibm): partial support (1 test failure) |
| 20 | +* [Intel](#intel): partial support (1 test failure) |
| 21 | +* [LLVM](#llvm): unsupported (fails to build Smart-Pointers) |
| 22 | +* [NAG](#nag): full support :trophy: (0 test failures) |
| 23 | +* [NVIDIA](#nvidia): partial support (2 test failures) |
93 | 24 |
|
94 | | -Intel |
95 | | ------ |
96 | | -- Version: 2021.1 Beta Build 20200827 |
97 | | -- Result: 2 test failures. |
98 | | -``` |
99 | | -ifort compile_me_only.f90 |
100 | | -./a.out |
101 | | -Pass: finalizes a non-allocatable object on the LHS of an intrinsic assignment |
102 | | -Pass: finalizes an allocated allocatable LHS of an intrinsic assignment |
103 | | -Pass: finalizes a target when the associated pointer is deallocated |
104 | | -Pass: finalizes an object upon explicit deallocation |
105 | | -Pass: finalizes a non-pointer non-allocatable object at the END statement |
106 | | -Pass: finalizes a non-pointer non-allocatable object at the end of a block construct |
107 | | -Fail: finalizes a function reference on the RHS of an intrinsic assignment |
108 | | -Pass: finalizes a specification expression function result |
109 | | -Pass: finalizes an intent(out) derived type dummy argument |
110 | | -Fail: finalizes an allocatable component object |
| 25 | +Detailed Results |
| 26 | +---------------- |
111 | 27 |
|
112 | | -``` |
| 28 | +### AMD |
| 29 | +- Version tested: 13.0.0 (AOCC_3.2.0-Build#128 2021_11_12) |
| 30 | +- Result: Fails to build due to an internal compiler error (ICE) |
113 | 31 |
|
114 | | -NVIDIA |
115 | | ------- |
116 | | -- Version: 22.7-0 64-bit target on x86-64 Linux -tp zen3 |
117 | | -- Result: 2 test failures |
| 32 | +### Cray |
| 33 | +- Version: 13.0.1 |
| 34 | +- Result: 3 test failures. |
118 | 35 |
|
| 36 | +### GCC |
| 37 | +- Version: 12.2.0 |
| 38 | +- Result: 4 test failures. |
119 | 39 | ``` |
120 | | -nvfortran compile_me_only.f90 |
121 | | -./a.out |
122 | | -Pass: finalizes a non-allocatable object on the LHS of an intrinsic assignment |
123 | | -Fail: finalizes an allocated allocatable LHS of an intrinsic assignment |
124 | | -Pass: finalizes a target when the associated pointer is deallocated |
125 | | -Pass: finalizes an object upon explicit deallocation |
126 | | -Pass: finalizes a non-pointer non-allocatable object at the END statement |
127 | | -Pass: finalizes a non-pointer non-allocatable object at the end of a block construct |
128 | | -Pass: finalizes a function reference on the RHS of an intrinsic assignment |
129 | | -Pass: finalizes a specification expression function result |
130 | | -Fail: finalizes an intent(out) derived type dummy argument |
131 | | -Pass: finalizes an allocatable component object |
132 | | -``` |
133 | | - |
134 | | -IBM |
135 | | ---- |
| 40 | + % fpm test |
| 41 | +Project is up to date |
| 42 | +
|
| 43 | + The compiler |
| 44 | + Fail: finalizes a non-allocatable object on the LHS of an intrinsic assignment |
| 45 | + Fail: finalizes an allocated allocatable LHS of an intrinsic assignment |
| 46 | + Pass: finalizes a target when the associated pointer is deallocated |
| 47 | + Pass: finalizes an object upon explicit deallocation |
| 48 | + Pass: finalizes a non-pointer non-allocatable object at the END statement |
| 49 | + Pass: finalizes a non-pointer non-allocatable object at END BLOCK statement |
| 50 | + Fail: finalizes a function reference on the RHS of an intrinsic assignment |
| 51 | + Fail: finalizes a specification expression function result |
| 52 | + Pass: finalizes an intent(out) derived type dummy argument |
| 53 | + Pass: finalizes an allocatable component object |
| 54 | +
|
| 55 | + A smart_pointer |
| 56 | + (skipped copy of declared reference due to a gfortran bug that would cause a segmentation fault) |
| 57 | + Pass: creates a resource when constructed |
| 58 | + Pass: removes the resource when the object goes out of scope |
| 59 | + Fail: copy points to the same resource as the original |
| 60 | + Fail: has zero references after a shallow copy goes out of scope |
| 61 | +``` |
| 62 | + |
| 63 | +### IBM |
136 | 64 | - Version: IBM Open XL Fortran for AIX 17.1.0 |
137 | 65 | - Result: 1 test failure |
138 | | - |
139 | | -In order to for the tests to complete in a way that reports all of the results, |
140 | | -place an exclamation mark (`!`) at the beginning of the following line in the |
141 | | -`compile_me_only.f90` file: |
142 | | -``` |
143 | | -,test_result_t("finalizes a specification expression function result", specification_expression()) & |
144 | 66 | ``` |
145 | | -which removes the one failing test. Compiling and executing the same file then |
146 | | - |
147 | | -``` |
148 | | -xlf2003_r compile_me_only.f90 |
149 | | -./a.out |
| 67 | +$ fpm test --archiver ar --compiler xlf2008_r --flag -DXLF |
| 68 | +<WARN> Unknown compiler xlf2008_r requested! Defaults for this compiler might be incorrect |
| 69 | +Project is up to date |
| 70 | + |
| 71 | + The compiler |
| 72 | + Pass: finalizes a non-allocatable object on the LHS of an intrinsic assignment |
| 73 | + Pass: finalizes an allocated allocatable LHS of an intrinsic assignment |
| 74 | + Pass: finalizes a target when the associated pointer is deallocated |
| 75 | + Pass: finalizes an object upon explicit deallocation |
| 76 | + Pass: finalizes a non-pointer non-allocatable object at the END statement |
| 77 | + Pass: finalizes a non-pointer non-allocatable object at END BLOCK statement |
| 78 | + Pass: finalizes a function reference on the RHS of an intrinsic assignment |
| 79 | + Pass: finalizes a specification expression function result |
| 80 | + Pass: finalizes an intent(out) derived type dummy argument |
| 81 | + Pass: finalizes an allocatable component object |
| 82 | + |
| 83 | + A smart_pointer |
| 84 | + Pass: creates a resource when constructed |
| 85 | + Pass: removes the resource when the object goes out of scope |
| 86 | + Pass: copy points to the same resource as the original |
| 87 | + Fail: has zero references after a shallow copy goes out of scope |
| 88 | +
|
| 89 | +``` |
| 90 | + |
| 91 | +### Intel |
| 92 | +- Version: 2021.7.0 Build 20220726_000000 |
| 93 | +- Result: 1 test failure. |
| 94 | +``` |
| 95 | + % fpm test --compiler ifort |
| 96 | +Project is up to date |
| 97 | + |
| 98 | + The compiler |
| 99 | + |
150 | 100 | Pass: finalizes a non-allocatable object on the LHS of an intrinsic assignment |
151 | | - Pass: finalizes an allocated allocatable LHS of an intrinsic assignment |
152 | | - Pass: finalizes a target when the associated pointer is deallocated |
153 | | - Pass: finalizes an object upon explicit deallocation |
154 | | - Pass: finalizes a non-pointer non-allocatable object at the END statement |
155 | | - Pass: finalizes a non-pointer non-allocatable object at the end of a block construct |
156 | | - Pass: finalizes a function reference on the RHS of an intrinsic assignment |
157 | | - Pass: finalizes an intent(out) derived type dummy argument |
158 | | - Pass: finalizes an allocatable component object |
159 | | -``` |
160 | | -**Fail:** Separately compiling `specification_expression_finalization.f90` with |
161 | | -`xlf2003_r` causes a core dump. This is a compiler bug that has been reported |
162 | | -via the Oak Ridge Leadership Computing Facility (OLCF) under ticket OLCFHELP-9069. |
163 | | - |
164 | | -AMD |
165 | | ---- |
166 | | -- Version tested: 13.0.0 (AOCC_3.2.0-Build#128 2021_11_12) |
167 | | -- Result: Fails to build due to an internal compiler error (ICE) |
168 | | - |
169 | | - |
170 | | -LLVM |
171 | | ----- |
| 101 | + Pass: finalizes an allocated allocatable LHS of an intrinsic assignment |
| 102 | + Pass: finalizes a target when the associated pointer is deallocated |
| 103 | + Pass: finalizes an object upon explicit deallocation |
| 104 | + Pass: finalizes a non-pointer non-allocatable object at the END statement |
| 105 | + Pass: finalizes a non-pointer non-allocatable object at END BLOCK statement |
| 106 | + Pass: finalizes a function reference on the RHS of an intrinsic assignment |
| 107 | + Pass: finalizes a specification expression function result |
| 108 | + Pass: finalizes an intent(out) derived type dummy argument |
| 109 | + Pass: finalizes an allocatable component object |
| 110 | + |
| 111 | + A smart_pointer |
| 112 | + Pass: creates a resource when constructed |
| 113 | + Pass: removes the resource when the object goes out of scope |
| 114 | + Pass: copy points to the same resource as the original |
| 115 | + Fail: has zero references after a shallow copy goes out of scope |
| 116 | +``` |
| 117 | + |
| 118 | +### LLVM |
172 | 119 | - Version tested: `git` commit `76911b5f75907eef53a30cc3` (9/20/2022) |
173 | 120 | - Result: Fails with the error message `not yet implemented: derived type finalization` |
174 | 121 |
|
175 | | -[NAG]: #nag |
176 | | -[GNU]: #gnu |
177 | | -[Cray]: #cray |
178 | | -[Intel]: #intel |
179 | | -[NVIDIA]: #nvidia |
180 | | -[IBM]: #ibm |
181 | | -[AMD]: #amd |
182 | | -[LLVM]: #llvm |
| 122 | +### NAG |
| 123 | +- Version: 7.1 (Build 7113) |
| 124 | +- Result: 0 test failures. :trophy: |
| 125 | +``` |
| 126 | + % fpm test --compiler nagfor --flag -fpp |
| 127 | +Project is up to date |
| 128 | +
|
| 129 | + The compiler |
| 130 | + Pass: finalizes a non-allocatable object on the LHS of an intrinsic assignment |
| 131 | + Pass: finalizes an allocated allocatable LHS of an intrinsic assignment |
| 132 | + Pass: finalizes a target when the associated pointer is deallocated |
| 133 | + Pass: finalizes an object upon explicit deallocation |
| 134 | + Pass: finalizes a non-pointer non-allocatable object at the END statement |
| 135 | + Pass: finalizes a non-pointer non-allocatable object at END BLOCK statement |
| 136 | + Pass: finalizes a function reference on the RHS of an intrinsic assignment |
| 137 | + Pass: finalizes a specification expression function result |
| 138 | + Pass: finalizes an intent(out) derived type dummy argument |
| 139 | + Pass: finalizes an allocatable component object |
| 140 | +
|
| 141 | + A smart_pointer |
| 142 | + Pass: creates a resource when constructed |
| 143 | + Pass: removes the resource when the object goes out of scope |
| 144 | + Pass: copy points to the same resource as the original |
| 145 | + Pass: has zero references after a shallow copy goes out of scope |
| 146 | +``` |
| 147 | + |
| 148 | +### NVIDIA |
| 149 | +- Version: 22.7-0 64-bit target on x86-64 Linux -tp zen3 |
| 150 | +- Result: 2 test failures |
| 151 | + |
183 | 152 | [specification_expression_finalization.f90]: ../example/test-support/specification_expression_finalization.f90 |
| 153 | +[compiler_test_m.f90]: ./compiler_test_m.f90 |
| 154 | +[sp_smart_pointer_test_m.f90]: ./sp_smart_pointer_test_m.F90 |
0 commit comments