Skip to content

Commit f4b7cdb

Browse files
committed
New gfortran bug test case
1 parent f60d1c2 commit f4b7cdb

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

gfortran-bugs/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ include(testing)
55

66
project(gfortran-bug Fortran)
77

8+
add_compiler_test(SOURCES gfortran-20201204a.f90 RUN_ONLY LABELS PR98141)
9+
add_compiler_test(SOURCES gfortran-20201204b.f90 RUN_ONLY LABELS PR98141)
810
add_compiler_test(SOURCES gfortran-20200501.f90 COMPILE_ONLY LABELS PR94909)
911
add_compiler_test(SOURCES gfortran-20200402-file1.f90 gfortran-20200402-file2.f90
1012
LINK_ONLY LABELS PR94463)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
program main
2+
class(*), allocatable :: a, b, c
3+
character(len=0) :: s
4+
allocate(a, source=s) !! No problem
5+
allocate(character(len=0)::b)
6+
allocate(c, source=b) !! Segfault
7+
end program
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
program main
2+
class(*), allocatable :: a, b
3+
allocate(a, source='') !! No problem
4+
allocate(b, source=a) !! Segfault
5+
end program

0 commit comments

Comments
 (0)