File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ include(testing)
55
66project (gfortran-bug Fortran)
77
8+ add_compiler_test(SOURCES gfortran-20200501.f90 COMPILE_ONLY LABELS PR94909)
89add_compiler_test(SOURCES gfortran-20200402-file1.f90 gfortran-20200402-file2.f90
910 LINK_ONLY LABELS PR94463)
1011add_compiler_test(SOURCES gfortran-20190202.f90 RUN_ONLY LABELS PR89174)
Original file line number Diff line number Diff line change 1+ ! ! https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94909
2+ ! !
3+ ! ! REJECTS VALID CODE
4+ ! !
5+ ! ! There is no recursion here.
6+ ! !
7+ ! ! $ gfortran --version
8+ ! ! GNU Fortran (GCC) 9.3.0
9+ ! !
10+ ! ! $ gfortran -c gfortran-20200501.f90
11+ ! ! gfortran-20200501.f90:13:10:
12+ ! !
13+ ! ! 13 | dot = a%dot_(b)
14+ ! ! | 1
15+ ! ! Error: Function 'dot' at (1) cannot be called recursively, as it is not RECURSIVE
16+ ! !
17+
18+ module example
19+
20+ type, abstract :: foo
21+ contains
22+ procedure :: dot
23+ procedure (dot), deferred :: dot_
24+ end type
25+
26+ contains
27+
28+ function dot (a , b )
29+ class(foo) :: a, b
30+ dot = a% dot_(b)
31+ end function
32+
33+ end module
You can’t perform that action at this time.
0 commit comments