1! { dg-do compile } 2! 3! PR 47572: [OOP] Invalid: Allocatable polymorphic with init expression. 4! 5! Contributed by Edmondo Giovannozzi <edmondo.giovannozzi@gmail.com> 6! cf. http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/763785b16883ed68 7 8program 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) 14end program 15