+2012-09-30 Janus Weil <janus@gcc.gnu.org>
+
+ * gfortran.dg/allocate_derived_1.f90: Re-enable class array checks,
+ partially reverting r170092.
+ * gfortran.dg/class_7.f03: Ditto.
+ * gfortran.dg/coarray_14.f90: Ditto.
+ * gfortran.dg/typebound_proc_13.f03: Ditto.
+
2012-09-29 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54738
real :: r
end type
-! FIXME: uncomment and dejagnuify the lines below once class arrays are enabled
-! class(t1),dimension(:),allocatable :: x
+ class(t1),dimension(:),allocatable :: x
type(t2),dimension(:),allocatable :: y
-! class(t3),dimension(:),allocatable :: z
+ class(t3),dimension(:),allocatable :: z
-! allocate( x(1))
-! allocate(t1 :: x(2))
-! allocate(t2 :: x(3))
-! allocate(t3 :: x(4))
-! allocate(tx :: x(5)) ! { "Error in type-spec at" }
-! allocate(u0 :: x(6)) ! { "may not be ABSTRACT" }
-! allocate(v1 :: x(7)) ! { "is type incompatible with typespec" }
+ allocate( x(1))
+ allocate(t1 :: x(2))
+ allocate(t2 :: x(3))
+ allocate(t3 :: x(4))
+ allocate(tx :: x(5)) ! { dg-error "Error in type-spec at" }
+ allocate(u0 :: x(6)) ! { dg-error "may not be ABSTRACT" }
+ allocate(v1 :: x(7)) ! { dg-error "is type incompatible with typespec" }
allocate( y(1))
allocate(t1 :: y(2)) ! { dg-error "is type incompatible with typespec" }
allocate(t2 :: y(3))
allocate(t3 :: y(3)) ! { dg-error "is type incompatible with typespec" }
-! allocate( z(1))
-! allocate(t1 :: z(2)) ! { "is type incompatible with typespec" }
-! allocate(t2 :: z(3)) ! { "is type incompatible with typespec" }
-! allocate(t3 :: z(4))
+ allocate( z(1))
+ allocate(t1 :: z(2)) ! { dg-error "is type incompatible with typespec" }
+ allocate(t2 :: z(3)) ! { dg-error "is type incompatible with typespec" }
+ allocate(t3 :: z(4))
end
end type t0
type t
integer :: i
-! FIXME: uncomment and dejagnuify once class arrays are enabled
-! class(t0), allocatable :: foo(3) ! { "deferred shape" }
+ class(t0), allocatable :: foo(3) ! { dg-error "deferred shape" }
end type t
! PR41608: Would ICE on missing type decl
program myTest
type t
end type t
-type(t), allocatable :: a[:]
+class(t), allocatable :: a[:]
allocate (t :: a) ! { dg-error "Coarray specification required in ALLOCATE statement" }
allocate (t :: a[*]) ! OK
end program myTest
TYPE t2
CONTAINS
-! FIXME: uncomment and dejagnuify once class arrays are enabled
-! PROCEDURE, PASS :: nonscalar ! { "must be scalar" }
+ PROCEDURE, PASS :: nonscalar ! { dg-error "must be scalar" }
PROCEDURE, PASS :: is_pointer ! { dg-error "must not be POINTER" }
PROCEDURE, PASS :: is_allocatable ! { dg-error "must not be ALLOCATABLE" }
END TYPE t2
SUBROUTINE myproc ()
END SUBROUTINE myproc
-! SUBROUTINE nonscalar (me)
-! CLASS(t2), INTENT(IN) :: me(:)
-! END SUBROUTINE nonscalar
+ SUBROUTINE nonscalar (me)
+ CLASS(t2), INTENT(IN) :: me(:)
+ END SUBROUTINE nonscalar
SUBROUTINE is_pointer (me)
CLASS(t2), POINTER, INTENT(IN) :: me