diff options
Diffstat (limited to 'gcc-4.8/gcc/testsuite/gfortran.dg/derived_external_function_1.f90')
-rw-r--r-- | gcc-4.8/gcc/testsuite/gfortran.dg/derived_external_function_1.f90 | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/gfortran.dg/derived_external_function_1.f90 b/gcc-4.8/gcc/testsuite/gfortran.dg/derived_external_function_1.f90 new file mode 100644 index 000000000..7421c4c0f --- /dev/null +++ b/gcc-4.8/gcc/testsuite/gfortran.dg/derived_external_function_1.f90 @@ -0,0 +1,27 @@ +! { dg-do run } +! +! PR fortran/58771 +! +! Contributed by Vittorio Secca <zeccav@gmail.com> +! +! ICEd on the write statement with f() because the derived type backend +! declaration not built. +! +module m + type t + integer(4) g + end type +end + +type(t) function f() result(ff) + use m + ff%g = 42 +end + + use m + character (20) :: line1, line2 + type(t) f + write (line1, *) f() + write (line2, *) 42_4 + if (line1 .ne. line2) call abort +end |