]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR fortran/39811 (Bogus warning for valid continuation lines)
authorTobias Burnus <burnus@gcc.gnu.org>
Mon, 20 Apr 2009 22:19:25 +0000 (00:19 +0200)
committerTobias Burnus <burnus@gcc.gnu.org>
Mon, 20 Apr 2009 22:19:25 +0000 (00:19 +0200)
2009-04-20  Tobias Burnus  <burnus@net-b.de>

        PR fortran/39811
        * scanner.c (load_line): Fix bogus "&" compile-time diagnostic.

2009-04-20  Tobias Burnus  <burnus@net-b.de>

        PR fortran/39811
        * gfortran.dg/continuation_11.f90: New test.

From-SVN: r146460

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

index d230333bc3c8a886b9a0c4815e1f0050ab77c4ae..6a2cd5ffaf7eb54dae19a69e4ba903a7d40db120 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-20  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/39811
+       * scanner.c (load_line): Fix bogus "&" compile-time diagnostic.
+
 2009-04-20  Paul Thomas  <pault@gcc.gnu.org>
 
        PR fortran/39800
index 1e7ec966efec0009834fbe80efaa23205ecb7c6c..cff988367cda6a3d09b6085e5f1d82edec081a3b 100644 (file)
@@ -1404,7 +1404,10 @@ load_line (FILE *input, gfc_char_t **pbuf, int *pbuflen, const int *first_char)
       if (c == '&')
        {
          if (seen_ampersand)
-           seen_ampersand = 0;
+           {
+             seen_ampersand = 0;
+             seen_printable = 1;
+           }
          else
            seen_ampersand = 1;
        }
index 1b0914c27fd3a35b0a9c2e6b9d586596bd188165..8eea619dc8ec3b77c1750a099434dfa5386d7bac 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-20  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/39811
+       * gfortran.dg/continuation_11.f90: New test.
+
 2009-04-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
 
        PR c++/13358
@@ -9,7 +14,7 @@
        * g++.dg/warn/pr13358-3.C: New.
        * g++.dg/warn/pr13358-4.C: New.
 
-2009-04-20  Andrew Pinski <andrew_pinski@playstation.sony.com>
+2009-04-20  Andrew Pinski  <andrew_pinski@playstation.sony.com>
 
        * gcc.dg/framework-2.c: Fix up for non existent includes
        being fatal errors now.
diff --git a/gcc/testsuite/gfortran.dg/continuation_11.f90 b/gcc/testsuite/gfortran.dg/continuation_11.f90
new file mode 100644 (file)
index 0000000..d8cd46b
--- /dev/null
@@ -0,0 +1,15 @@
+! { dg-do run }
+! { dg-options "-Wall -pedantic" }
+! Before a bogus warning was printed
+!
+! PR fortran/39811
+!
+implicit none
+character(len=70) :: str
+write(str,'(a)') 'Print rather a lot of ampersands &&&&&
+   &&&&&
+   &&&&&'
+if (len(trim(str)) /= 44 &
+    .or. str /= 'Print rather a lot of ampersands &&&&&&&&&&&') &
+    call abort()
+end