OSDN Git Service

2010-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 Jun 2010 04:46:38 +0000 (04:46 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 Jun 2010 04:46:38 +0000 (04:46 +0000)
PR fortran/44371
* gfortran.dg/error_stop_1.f08: New test.
* gfortran.dg/error_stop_2.f08: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160134 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/error_stop_1.f08 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/error_stop_2.f08 [new file with mode: 0644]

index 05e5fdc..19452bb 100644 (file)
@@ -1,3 +1,9 @@
+2010-06-01  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR fortran/44371
+       * gfortran.dg/error_stop_1.f08: New test.
+       * gfortran.dg/error_stop_2.f08: New test.
+
 2010-06-01  Jason Merrill  <jason@redhat.com>
 
        DR 990
diff --git a/gcc/testsuite/gfortran.dg/error_stop_1.f08 b/gcc/testsuite/gfortran.dg/error_stop_1.f08
new file mode 100644 (file)
index 0000000..80a19b1
--- /dev/null
@@ -0,0 +1,5 @@
+! { dg-do run }
+program stopper
+  real, dimension(5,5,5) :: i
+  error stop size(i) ! { dg-shouldfail "ERROR STOP 125" }
+end program stopper
diff --git a/gcc/testsuite/gfortran.dg/error_stop_2.f08 b/gcc/testsuite/gfortran.dg/error_stop_2.f08
new file mode 100644 (file)
index 0000000..be0255a
--- /dev/null
@@ -0,0 +1,10 @@
+! { dg-do compile }
+! PR44371 STOP parsing rejects valid code.
+  real, dimension(5,5,5) :: i
+  character(1) c, y
+  y = 'y'
+  read(y,*) c
+  if (c=='x') stop size(i); if (c=='X') stop
+
+  if (c=='y') stop size(i) if (c=='Y') stop ! { dg-error "Syntax error in STOP" }
+  end