AVR: tree-optimization/115307 - Work around isinf bloat from early passes.
[official-gcc.git] / gcc / testsuite / gfortran.dg / implicit_class_1.f90
blob2e2270b91766f73020a6829303b1a21e4ee328d9
1 ! { dg-do run }
2 ! { dg-skip-if "" { powerpc-ibm-aix* } }
4 ! PR 56500: [OOP] "IMPLICIT CLASS(...)" wrongly rejected
6 ! Contributed by Reinhold Bader <Reinhold.Bader@lrz.de>
8 ! Add dump-fortran-original to check, if the patch preventing a gfortran
9 ! segfault is working correctly. No cleanup needed, because the dump
10 ! goes to stdout.
11 ! { dg-options "-fdump-fortran-original" }
12 ! { dg-allow-blank-lines-in-output 1 }
13 ! { dg-prune-output "Namespace:.*-{42}" }
15 program upimp
16 implicit class(foo) (a-b)
17 implicit class(*) (c)
18 type :: foo
19 integer :: i
20 end type
21 allocatable :: aaf, caf
23 allocate(aaf, source=foo(2))
24 select type (aaf)
25 type is (foo)
26 if (aaf%i /= 2) STOP 1
27 class default
28 STOP 2
29 end select
31 allocate(caf, source=foo(3))
32 select type (caf)
33 type is (foo)
34 if (caf%i /= 3) STOP 3
35 class default
36 STOP 4
37 end select
39 contains
40 subroutine gloo(x)
41 implicit class(*) (a-z)
42 end
43 end program