re PR fortran/32124 (Execution stops with stat= in ALLOCATE)
authorTobias Burnus <burnus@net-b.de>
Mon, 28 May 2007 22:07:23 +0000 (00:07 +0200)
committerTobias Burnus <burnus@gcc.gnu.org>
Mon, 28 May 2007 22:07:23 +0000 (00:07 +0200)
2007-05-28  Tobias Burnus  <burnus@net-b.de>

       PR fortran/32124
       * gfortran.dg/allocate_stat_1.f90: New.

From-SVN: r125148

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/allocate_stat_1.f90 [new file with mode: 0644]

index a71bc7a..863a060 100644 (file)
@@ -1,3 +1,8 @@
+2007-05-28  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/32124
+       * gfortran.dg/allocate_stat_1.f90: New.
+
 2007-05-28  Brooks Moses  <brooks.moses@codesourcery.com>
 
        PR fortran/31972
diff --git a/gcc/testsuite/gfortran.dg/allocate_stat_1.f90 b/gcc/testsuite/gfortran.dg/allocate_stat_1.f90
new file mode 100644 (file)
index 0000000..a9c681a
--- /dev/null
@@ -0,0 +1,17 @@
+! { dg-do run }
+! Check whether uppon failure no run-time error is issued.
+! PR fortran/32124
+!
+program mem
+  implicit none
+  real(8), allocatable :: A(:,:,:,:)
+  integer :: status
+
+  status = 0
+  allocate(A(huge(0),huge(0),huge(0),huge(0)),stat=status) ! this should fail
+  if(status == 0) call abort()
+
+  status = 0
+  deallocate(A,stat=status)
+  if(status == 0) call abort()
+end program mem