re PR fortran/13826 (Derived types in DATA statements not PARAMETERs)
authorTobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
Sat, 15 May 2004 18:10:06 +0000 (20:10 +0200)
committerTobias Schlüter <tobi@gcc.gnu.org>
Sat, 15 May 2004 18:10:06 +0000 (20:10 +0200)
testsuite:
PR fortran/13826
PR fortran/13940
* gfortran.fortran-torture/compile/data_1.f90: New test.
(add second test)

fortran:
* primary.c (match_boz_constant): Use gfc_notify_std() for
issuing a warning or an error.

From-SVN: r81892

gcc/fortran/ChangeLog
gcc/fortran/primary.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.fortran-torture/compile/data_1.f90

index 16ea447..549b82d 100644 (file)
@@ -1,5 +1,10 @@
 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
 
+       * primary.c (match_boz_constant): Use gfc_notify_std() for
+       issuing a warning or an error.
+
+2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
+
        PR fortran/13826
        * primary.c (match_structure_constructor): Rename ...
        (gfc_match_structure_constructor): ... to this. Make non-static.
index d10a462..0e7e7e7 100644 (file)
@@ -255,9 +255,12 @@ match_boz_constant (gfc_expr ** result)
       rname = "octal";
       break;
     case 'x':
-      if (pedantic)
-       gfc_warning_now ("Hexadecimal constant at %C uses non-standard "
-                        "syntax. Use \"Z\" instead.");
+      if (pedantic
+         && (gfc_notify_std (GFC_STD_GNU, "Extension: Hexadecimal "
+                            "constant at %C uses non-standard syntax.")
+             == FAILURE))
+       goto backup;
+
       /* Fall through.  */
     case 'z':
       radix = 16;
index d23aed2..c1a37d6 100644 (file)
@@ -1,6 +1,7 @@
 2004-05-15  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
 
        PR fortran/13826
+       PR fortran/13940
        * gfortran.fortran-torture/compile/data_1.f90: New test.
 
 2004-05-15  Ulrich Weigand  <uweigand@de.ibm.com>
index fa8ab9f..e3d65ef 100644 (file)
@@ -5,3 +5,7 @@ END TYPE
 TYPE(a) :: y
 DATA y /a(1.)/ ! used to give an error about non-PARAMETER
 END
+! this tests the fix for PR 13940
+SUBROUTINE a
+DATA i /x'f95f95f9'/
+END