Skip to content

Commit 9be431a

Browse files
authored
Merge pull request #56 from sourceryinstitute/update-test-and-readme
fix(test): update docs & rm gfortran workaround
2 parents a3cc10c + fc00113 commit 9be431a

File tree

3 files changed

+35
-28
lines changed

3 files changed

+35
-28
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -67,18 +67,19 @@ summarizes the observed compiler behaviors:
6767
| _Compiler_ | _Test failures_ | _Version tested_ |
6868
| :--- | :---: | :--- |
6969
| AMD | N.A. (see Note 1.) | `flang` 13.0.0 (AOCC_3.2.0-Build\#128 2021\_11\_12) |
70-
| Cray | >= 3 (see Note 3.) | `ftn` 13.0.1 |
71-
| GCC | 6 | `gfortran` 12.2.0 |
72-
| IBM | 1 | `xlf2008_r` 17.1.0 on AIX |
73-
| Intel | 1 | `ifort` 2021.7.0 Build 20220726_000000 |
74-
| LLVM | N.A. (see Note 2.) | `git` commit `f5253058144aca1e9fcacd` (9/20/2022)
75-
| NAG :trophy: | 0 | `nagfor` 7.1 Build 7113 |
76-
| NVIDIA | 2 | `nvfortran` 22.7-0 |
70+
| Cray | >= 3 (see Note 2.) | `ftn` 13.0.1 |
71+
| GCC :trophy: | 0 (see Note 3.) | `gfortran` 13.0.1 20230321 (experimental) |
72+
| IBM | 1 | `xlf2008_r` 17.1.0 on AIX |
73+
| Intel | 1 | `ifort` 2021.7.0 Build 20220726_000000 |
74+
| LLVM | N.A. (see Note 4.) | `git` commit `f5253058144aca1e9fcacd` (9/20/2022)
75+
| NAG :trophy: | 0 | `nagfor` 7.1 Build 7113 |
76+
| NVIDIA | 2 | `nvfortran` 22.7-0 |
7777

7878
**Notes**
7979
1. Fails to build due to an internal compiler error (ICE).
80-
2. Fails to build due to type finalization not yet being supported.
8180
2. Fails to build due to `fpm` issue [767]. See [test/README.md#cray] for a lower bound on the Cray compiler test failures.
81+
3. See [test/README.md#gnu](./test/README.md#gnu) for instructions on building a current GCC from source.
82+
4. Fails to build due to type finalization not yet being supported.
8283

8384
See the [test suite README.md](./test/README.md) for more details on each compiler's test
8485
results.

test/README.md

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Summary
1515

1616
* [AMD](#amd): unsupported (fails to build Smart-Pointers)
1717
* [Cray](#cray): partial support (3 test failures)
18-
* [GCC](#gnu): partial support (6 test failures)
18+
* [GCC](#gnu): full support :trophy:
1919
* [IBM](#ibm): partial support (1 test failure)
2020
* [Intel](#intel): partial support (1 test failure)
2121
* [LLVM](#llvm): unsupported (fails to build Smart-Pointers)
@@ -57,31 +57,43 @@ ftn compile_me_only.f90
5757
The number of unit test failures for the remainder of the Smart-Pointers test suite is unknown.
5858

5959
### GCC
60-
- Version: 12.2.0
61-
- Result: 4 test failures.
60+
- Version: 13.0.1 20230321 (experimental)
61+
- Result: 0 test failures.
6262
```
6363
% fpm test
6464
Project is up to date
6565
6666
The compiler
67-
Fail: finalizes a non-allocatable object on the LHS of an intrinsic assignment
68-
Fail: finalizes an allocated allocatable LHS of an intrinsic assignment
67+
Pass: finalizes a non-allocatable object on the LHS of an intrinsic assignment
68+
Pass: finalizes an allocated allocatable LHS of an intrinsic assignment
6969
Pass: finalizes a target when the associated pointer is deallocated
7070
Pass: finalizes an object upon explicit deallocation
7171
Pass: finalizes a non-pointer non-allocatable object at the END statement
7272
Pass: finalizes a non-pointer non-allocatable object at END BLOCK statement
73-
Fail: finalizes a function reference on the RHS of an intrinsic assignment
74-
Fail: finalizes a specification expression function result
73+
Pass: finalizes a function reference on the RHS of an intrinsic assignment
74+
Pass: finalizes a specification expression function result
7575
Pass: finalizes an intent(out) derived type dummy argument
7676
Pass: finalizes an allocatable component object
7777
7878
A smart_pointer
79-
(skipped copy of declared reference due to a gfortran bug that would cause a segmentation fault)
8079
Pass: creates a resource when constructed
8180
Pass: removes the resource when the object goes out of scope
82-
Fail: copy points to the same resource as the original
83-
Fail: has zero references after a shallow copy goes out of scope
81+
Pass: copy points to the same resource as the original
82+
Pass: has zero references after a shallow copy goes out of scope
83+
```
84+
85+
The above gfortran version was built from source using commands of the following form:
86+
```
87+
git clone [email protected]:sourceryinstitute/opencoarrays
88+
cd opencoarrays
89+
./install.sh -p gcc -b master -j <num-threads>
90+
export LD_LIBRARY_PATH="${PWD}/prerequisites/installations/lib"
91+
export PATH="${PWD}/prerequisites/installations/bin:$PATH"
8492
```
93+
after replacing `<num-threads>` with the desired number of threads for an accelerated,
94+
multithreaded build. Producing the above test results requires GCC commit
95+
[d7caf313525a46f200d7f5db1ba893f853774aee], which reduced the number of gfortran test
96+
failures from six to zero.
8597

8698
### IBM
8799
- Version: IBM Open XL Fortran for AIX 17.1.0
@@ -176,3 +188,4 @@ Project is up to date
176188
[compiler_test_m.f90]: ./compiler_test_m.f90
177189
[sp_smart_pointer_test_m.f90]: ./sp_smart_pointer_test_m.F90
178190
[branch]: https://github.com/BerkeleyLab/llvm-test-suite/tree/fortran-type-finalization/Fortran/UnitTests/finalization
191+
[d7caf313525a46f200d7f5db1ba893f853774aee]: https://github.com/gcc-mirror/gcc/commit/5889c7bd46a45dc07ffb77ec0d698e18e0b99840

test/sp_smart_pointer_test_m.F90

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,9 @@ function check_copy() result(test_passes)
103103
block
104104
type(object_t) :: declared, reference_to_declared
105105

106-
if (scan(compiler_version(),"GCC ")==1) then
107-
test_passes = associated(original%ref, reference%ref) .and. .false. ! intentional failure due to the message below
108-
print *, " (skipped copy of declared reference due to a gfortran bug that would cause a segmentation fault)"
109-
else
110-
#ifndef __GFORTRAN__
111-
declared = object_t() ! compiling with gfortran generates a runtime error even when this line doesn't execute
112-
#endif
113-
reference_to_declared = declared
114-
test_passes = associated(original%ref, reference%ref) .and. associated(declared%ref, reference_to_declared%ref)
115-
end if
106+
declared = object_t() ! compiling with gfortran generates a runtime error even when this line doesn't execute
107+
reference_to_declared = declared
108+
test_passes = associated(original%ref, reference%ref) .and. associated(declared%ref, reference_to_declared%ref)
116109
end block
117110
#ifndef XLF
118111
end associate

0 commit comments

Comments
 (0)