Debian Codegraph @

gcc/testsuite/gfortran.dg/pr106946.f90

raw
1 ! { dg-do compile }
2 ! PR fortran/106946
3 ! ICE in resolve_component on invalid CLASS declaration with missing comma.
4 !
5 ! The bad declarations below should diagnose and continue without leaving
6 ! behind dangling CLASS container symbols in the surrounding namespace.
7
8 program p
9 type :: u
10 end type
11
12 type :: v
13 end type
14
15 type :: w
16 end type
17
18 type :: t1
19 class(u), allocatable :: a b ! { dg-error "Syntax error in data declaration" }
20 end type
21
22 type :: t2
23 class(v), pointer :: p q ! { dg-error "Syntax error in data declaration" }
24 end type
25
26 type :: t3
27 class(w), allocatable :: ok
28 class(w), allocatable :: x y ! { dg-error "Syntax error in data declaration" }
29 end type
30 end