diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/alloc_comp_std.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/alloc_comp_std.f90 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_std.f90 b/gcc/testsuite/gfortran.dg/alloc_comp_std.f90 new file mode 100644 index 000000000..2ca7f0ac3 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/alloc_comp_std.f90 @@ -0,0 +1,14 @@ +! { dg-do compile } +! { dg-options "-std=f95" } +! +! Check that we don't accept allocatable components for -std=f95 (PR 20541) +! +program main + + type :: foo + integer, allocatable :: bar(:) ! { dg-error "ALLOCATABLE attribute" } + + integer :: x ! Just to avoid "extra" error messages about empty type. + end type foo + +end program main |