nvptx, libgfortran: Switch out of "minimal" mode
[official-gcc.git] / gcc / testsuite / gfortran.dg / associate_43.f90
bloba1460efc371903190998e3311300e9854c1fbc9b
1 ! { dg-do run }
3 ! Check that PR83146 remains fixed.
5 ! Contributed by Neil Carlson <neil.n.carlson@gmail.com>
7 type foo
8 integer n
9 end type
10 type bar
11 type(foo) array(2)
12 end type
14 type(bar) b
15 integer :: m=0
17 b%array(1)%n = 42
18 b%array(2)%n = 43
20 call assoc(1)
21 m = 1
22 call assoc(2)
23 contains
24 subroutine assoc (n)
25 integer :: n
26 associate (n_array => b%array%n)
27 select case (n_array(n))
28 case (42)
29 if (m .ne. 0) stop 1
30 case default
31 if (m .eq. 0) stop 2
32 end select
33 end associate
34 end subroutine assoc
35 end