2009-10-17 Janus Weil <janus@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_6.f03
blob2f3ff62a6fad1c4dc821efeb2812ee0161c25e23
1 ! { dg-do run }
3 ! PR 41629: [OOP] gimplification error on valid code
5 ! Contributed by Janus Weil <janus@gcc.gnu.org>
7   type t1
8     integer :: comp
9   end type
11   type(t1), target :: a
13   class(t1) :: x
14   pointer :: x       ! This is valid
16   a%comp = 3
17   x => a
18   print *,x%comp
19   if (x%comp/=3) call abort()
21 end