summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-20 22:19:25 +0000
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>2009-04-20 22:19:25 +0000
commit379349afe02368c081a89097c110455c5bfb8499 (patch)
treefa047a0604946f1ae59476b1360c96b121b14e6b
parent9ab71c6b292bda7d4826e8f20cf2c45dc0d86ba0 (diff)
downloadgcc-379349afe02368c081a89097c110455c5bfb8499.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146460 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/scanner.c5
-rw-r--r--gcc/testsuite/ChangeLog7
-rw-r--r--gcc/testsuite/gfortran.dg/continuation_11.f9015
4 files changed, 30 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index d230333bc3c..6a2cd5ffaf7 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -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
diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c
index 1e7ec966efe..cff988367cd 100644
--- a/gcc/fortran/scanner.c
+++ b/gcc/fortran/scanner.c
@@ -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;
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 1b0914c27fd..8eea619dc8e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 00000000000..d8cd46b8a17
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/continuation_11.f90
@@ -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