Debian Codegraph @

gcc/testsuite/gfortran.dg/pr101514.f90

raw
1 ! { dg-do compile }
2 ! PR fortran/101514 - ICE: out of memory allocating ... bytes
3
4 subroutine s
5 type t1
6 integer :: a(..) ! { dg-error "must have an explicit shape" }
7 end type
8 type t2
9 integer :: a(*) ! { dg-error "must have an explicit shape" }
10 end type
11 type t3
12 integer :: a(:) ! { dg-error "must have an explicit shape" }
13 end type
14 type t4
15 integer :: a(0:) ! { dg-error "must have an explicit shape" }
16 end type
17 type t5
18 integer, allocatable :: a(:)
19 end type
20 type t6
21 integer, pointer :: a(:)
22 end type
23 type(t1) :: a1
24 type(t2) :: a2
25 type(t3) :: a3
26 type(t4) :: a4
27 type(t5) :: a5
28 type(t6) :: a6
29 a1 = transfer(1, a1)
30 a2 = transfer(1, a2)
31 a3 = transfer(1, a3)
32 a4 = transfer(1, a4)
33 a5 = transfer(1, a5)
34 a6 = transfer(1, a6)
35 end