modula2: Simplify REAL/LONGREAL/SHORTREAL node creation.
[official-gcc.git] / gcc / testsuite / gfortran.dg / class_36.f03
blob6911f3f04b6bb26d403571406b90ab1505ce9bef
1 ! { dg-do compile }
3 ! PR 47572: [OOP] Invalid: Allocatable polymorphic with init expression.
5 ! Contributed by Edmondo Giovannozzi <edmondo.giovannozzi@gmail.com>
6 ! cf. http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/763785b16883ed68
8 program scalar_allocation
9   type test
10     real :: a
11   end type
12   class (test), allocatable :: b = test(3.4)  ! { dg-error "cannot have an initializer" }
13   print *,allocated(b)
14 end program