diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/alloc_comp_initializer_3.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/alloc_comp_initializer_3.f90 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_initializer_3.f90 b/gcc/testsuite/gfortran.dg/alloc_comp_initializer_3.f90 new file mode 100644 index 000000000..014b069e5 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/alloc_comp_initializer_3.f90 @@ -0,0 +1,15 @@ +! { dg-do compile } +! +! PR fortran/50050 +! Out of bound whilst releasing initialization of allocate object +! +! Contributed by someone <sigurdkn@gmail.com> + +program bug + implicit none + type foo + integer, pointer :: a => null() + end type + type(foo), dimension(:,:), allocatable :: data + allocate(data(1:1,1)) ! This used to lead to an ICE +end program |