diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/initialization_23.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/initialization_23.f90 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/initialization_23.f90 b/gcc/testsuite/gfortran.dg/initialization_23.f90 new file mode 100644 index 000000000..cc2aca4e2 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/initialization_23.f90 @@ -0,0 +1,17 @@ +! { dg-do compile } +! +! PR 40875: The error was missed and an ICE ensued. +! +! Contributed by Michael Richmond <michael.a.richmond@nasa.gov> +! + MODULE cdf_aux_mod + PUBLIC + TYPE :: one_parameter + CHARACTER :: name + END TYPE one_parameter + CHARACTER, PARAMETER :: the_alpha = one_parameter('c') ! { dg-error "Can't convert TYPE" } + CHARACTER, PARAMETER :: the_beta = (/one_parameter('c')/) ! { dg-error "Incompatible ranks" } + END MODULE cdf_aux_mod + +! { dg-final { cleanup-modules "cdf_aux_mod" } } + |