re PR fortran/32555 (Miscompilation of NIST testsuite)
authorTobias Burnus <burnus@net-b.de>
Sat, 30 Jun 2007 16:01:25 +0000 (18:01 +0200)
committerTobias Burnus <burnus@gcc.gnu.org>
Sat, 30 Jun 2007 16:01:25 +0000 (18:01 +0200)
2007-06-30  Tobias Burnus  <burnus@net-b.de>

PR fortran/32555
* io.c (check_format): Allow zero to precede the
P edit descriptor.

2007-06-30  Tobias Burnus  <burnus@net-b.de>

PR fortran/32555
* gfortran.dg/fmt_zero_check.f90: New.

From-SVN: r126152

gcc/fortran/ChangeLog
gcc/fortran/io.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/fmt_zero_check.f90 [new file with mode: 0644]

index 3786adcaec6fa663198790f04152ffa09e67287f..19ab39117fa8de31e5f4e047d0741e72f72bc36f 100644 (file)
@@ -1,3 +1,9 @@
+2007-06-30  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/32555
+       * io.c (check_format): Allow zero to precede the
+       P edit descriptor.
+
 2007-06-30  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/32472
index f9b5eac21d72cf364da528ae2132177b0d706689..e8f4debbd4e62c6d2d4f954616f12b06ca62d4c8 100644 (file)
@@ -487,6 +487,7 @@ format_item_1:
       goto format_item;
 
     case FMT_SIGNED_INT:
+    case FMT_ZERO:
       /* Signed integer can only precede a P format.  */
       t = format_lex ();
       if (t != FMT_P)
index 5a763456aea331bfdc48887aa2027060b22e5b71..d6a6dba26ebd8990261dbfb5b8587aa0f7c2f83f 100644 (file)
@@ -1,3 +1,8 @@
+2007-06-30  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/32555
+       * gfortran.dg/fmt_zero_check.f90: New.
+
 2007-06-30  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/30284
diff --git a/gcc/testsuite/gfortran.dg/fmt_zero_check.f90 b/gcc/testsuite/gfortran.dg/fmt_zero_check.f90
new file mode 100644 (file)
index 0000000..d8b6c5d
--- /dev/null
@@ -0,0 +1,6 @@
+! { dg-do compile }
+! PR fortran/32555
+!
+2050  FORMAT(0PF9.4)
+2050  FORMAT(0F9.4) ! { dg-error "Expected P edit descriptor" }
+end