Debian Codegraph @

gcc/testsuite/gfortran.dg/alloc_alloc_expr_3.f90

raw
1 ! { dg-do compile }
2 !
3 ! PR fortran/34714 - ICE on invalid
4 ! Testcase contributed by Martin Reinecke <martin AT mpa-garching DOT mpg DOT de>
5 !
6
7 module foo
8 type bar
9 logical, pointer, dimension(:) :: baz
10 end type
11 contains
12
13 function func1()
14 type(bar) func1
15 allocate(func1%baz(1))
16 end function
17
18 function func2()
19 type(bar) func2
20 allocate(func1%baz(1)) ! { dg-error "is not a variable" }
21 end function
22
23 end module foo