[multiple changes]
authorTobias Burnus <burnus@gcc.gnu.org>
Wed, 17 Jul 2013 12:57:41 +0000 (14:57 +0200)
committerTobias Burnus <burnus@gcc.gnu.org>
Wed, 17 Jul 2013 12:57:41 +0000 (14:57 +0200)
2013-07-17  Mikael Morin  <mikael@gcc.gnu.org>
            Tobias Burnus  <burnus@net-b.de>

        PR fortran/57895
        * match.c (gfc_match_name): Ensure that the error
        message regarding -fdollar-ok gets printed.
        (gfc_match_common): Avoid multiple freeing.

2013-07-17  Tobias Burnus  <burnus@net-b.de>

        PR fortran/57895
        * gfortran.dg/dollar_sym_3.f: New.
        * gfortran.dg/dollar_sym_1.f90: Update dg-error.

From-SVN: r201008

gcc/fortran/ChangeLog
gcc/fortran/match.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/dollar_sym_1.f90
gcc/testsuite/gfortran.dg/dollar_sym_3.f [new file with mode: 0644]

index 0013101a544d1b54f7d3215dd51fd054b1a7aa15..6c977b9491c9ed6f16539e39f64e036b89cbb152 100644 (file)
@@ -1,3 +1,11 @@
+2013-07-17  Mikael Morin  <mikael@gcc.gnu.org>
+           Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/57895
+       * match.c (gfc_match_name): Ensure that the error
+       message regarding -fdollar-ok gets printed.
+       (gfc_match_common): Avoid multiple freeing.
+
 2013-07-16  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/57912
 
        PR fortran/37336
        * trans-decl.c (init_intent_out_dt): Call finalizer
-       when approriate.
+       when appropriate.
 
 2013-06-08  Tobias Burnus  <burnus@net-b.de>
 
 2013-04-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        PR fortran/56782
-       * frontend-passes.c (callback_reduction):  Dont't do
+       * frontend-passes.c (callback_reduction):  Don't do
        any simplification if there is only a single element
        which has an iterator.
 
index 2533584246b6a599186da4dc74d27df404a92014..7f30156624d79a229988420930e723d0af63c06a 100644 (file)
@@ -556,8 +556,8 @@ gfc_match_name (char *buffer)
 
   if (c == '$' && !gfc_option.flag_dollar_ok)
     {
-      gfc_error ("Invalid character '$' at %C. Use -fdollar-ok to allow it "
-                "as an extension");
+      gfc_fatal_error ("Invalid character '$' at %L. Use -fdollar-ok to allow "
+                      "it as an extension", &old_loc);
       return MATCH_ERROR;
     }
 
@@ -4520,10 +4520,6 @@ syntax:
   gfc_syntax_error (ST_COMMON);
 
 cleanup:
-  if (old_blank_common)
-    old_blank_common->common_next = NULL;
-  else
-    gfc_current_ns->blank_common.head = NULL;
   gfc_free_array_spec (as);
   return MATCH_ERROR;
 }
index 75f75de325b4365640707497691a4b355ddd6dca..2d6ece45d1ebf5fbeaf197742fed9b38994ccc86 100644 (file)
@@ -1,3 +1,9 @@
+2013-07-17  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/57895
+       * gfortran.dg/dollar_sym_3.f: New.
+       * gfortran.dg/dollar_sym_1.f90: Update dg-error.
+
 2013-07-16  Iain Sandoe  <iain@codesourcery.com>
 
        PR target/55654
index 37f0f888d621bab4da67a7d6b9597bb22131658f..6c0dfcb24d6a6745064f3cc9b4324db175785af4 100644 (file)
@@ -3,7 +3,7 @@
 ! Variable names containing $ signs
 ! 
       REAL*4 PLT$C_HOUSTPIX   ! { dg-error "Invalid character '\\$'" }
-      INTEGER PLT$C_COMMAND   ! { dg-error "Invalid character '\\$'" }
-      PARAMETER (PLT$B_OPC=0) ! { dg-error "Invalid character '\\$'" }
-      common /abc$def/ PLT$C_HOUSTPIX, PLT$C_COMMAND ! { dg-error "Invalid character '\\$'" }
+      INTEGER PLT$C_COMMAND   ! Unreachable as the error above is now fatal
+      PARAMETER (PLT$B_OPC=0) !  Unreachable as the error above is now fatal
+      common /abc$def/ PLT$C_HOUSTPIX, PLT$C_COMMAND !  Unreachable as the error above is now fatal
       end
diff --git a/gcc/testsuite/gfortran.dg/dollar_sym_3.f b/gcc/testsuite/gfortran.dg/dollar_sym_3.f
new file mode 100644 (file)
index 0000000..7cf2047
--- /dev/null
@@ -0,0 +1,10 @@
+! { dg-do compile }
+!
+! PR fortran/57895
+!
+! Contributed by Vittorio Zecca
+!
+c Segmentation fault in gfc_restore_last_undo_checkpoint
+      COMMON RADE3155V62$JUTMU9L9E(3,3,3), LADE314JUTMP9         ! { dg-error "Invalid character '\\$' at .1.. Use -fdollar-ok to allow it as an extension" }
+     +LHEDDJNTMP9L(3,3,3)                                                       
+      end