diff options
Diffstat (limited to 'gcc/testsuite/gfortran.fortran-torture/execute/der_init_2.f90')
-rw-r--r-- | gcc/testsuite/gfortran.fortran-torture/execute/der_init_2.f90 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/der_init_2.f90 b/gcc/testsuite/gfortran.fortran-torture/execute/der_init_2.f90 new file mode 100644 index 000000000..d0448a55b --- /dev/null +++ b/gcc/testsuite/gfortran.fortran-torture/execute/der_init_2.f90 @@ -0,0 +1,15 @@ +! PR 15314 +! We were looking at the type of the initialization expression, not the type +! of the field. +program der_init_2 + implicit none + type foo + integer :: a(3) = 42 + integer :: b = 123 + end type + + type (foo) :: v + + if ((v%b .ne. 123) .or. any (v%a .ne. 42)) call abort (); +end program + |