]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
allocate_derived_1.f90: Re-enable class array checks, partially reverting r170092.
authorJanus Weil <janus@gcc.gnu.org>
Sun, 30 Sep 2012 14:54:28 +0000 (16:54 +0200)
committerJanus Weil <janus@gcc.gnu.org>
Sun, 30 Sep 2012 14:54:28 +0000 (16:54 +0200)
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.

From-SVN: r191867

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/allocate_derived_1.f90
gcc/testsuite/gfortran.dg/class_7.f03
gcc/testsuite/gfortran.dg/coarray_14.f90
gcc/testsuite/gfortran.dg/typebound_proc_13.f03

index 8578075ec2d64d070cf7fd16d49751d0fbbdb953..2934e0ad14b03be887e90972ede22908bb547128 100644 (file)
@@ -1,3 +1,11 @@
+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
index 648012431acf244a2ff09af9d4a4b43c3deada1f..d2c65ffa38bd790df3f5e71bd5c880937221588d 100644 (file)
   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
 
index d7f1c835ef4272546dc3b0c123891402ba1ec89b..99fbf6fc69bb49ad008e742b839779aeb6fc5e5d 100644 (file)
@@ -9,8 +9,7 @@
   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
index 3097eede7571d082fa1970a9fc4e297b345f13c2..d7eb6b6be02dd063534c865a589958ec984056fa 100644 (file)
@@ -47,7 +47,7 @@ end subroutine test
 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
index af486ff7684de3a63d0242f517470e2e1026a78f..98caac69245ab3b5dbd4fa33c9368e7873dc0aaf 100644 (file)
@@ -16,8 +16,7 @@ MODULE m
 
   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
@@ -27,9 +26,9 @@ CONTAINS
   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