aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2001-04-02 23:23:28 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2001-04-02 23:23:28 +0200
commitcaf4d6e06910095bd455d53f72a6094fff41c66c (patch)
treef35b018ad67eed675319354f29d76af391ff1341
parent0003efa0b39dc5265f401acd9790dea95ad2a121 (diff)
downloadgcc-caf4d6e06910095bd455d53f72a6094fff41c66c.zip
gcc-caf4d6e06910095bd455d53f72a6094fff41c66c.tar.gz
gcc-caf4d6e06910095bd455d53f72a6094fff41c66c.tar.bz2
lex.c (ffelex_hash_): Avoid eating one whole line after #line.
* lex.c (ffelex_hash_): Avoid eating one whole line after #line. * g77.f-torture/compile/20010321-1.f: New test. From-SVN: r41015
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/f/lex.c6
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/g77.f-torture/compile/20010321-1.f8
4 files changed, 23 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5453873..ac5b432 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-02 Jakub Jelinek <jakub@redhat.com>
+
+ * lex.c (ffelex_hash_): Avoid eating one whole line after
+ #line.
+
2001-04-02 Zack Weinberg <zackw@stanford.edu>
* genattr.c, gencheck.c, gencodes.c, genconfig.c, genflags.c,
diff --git a/gcc/f/lex.c b/gcc/f/lex.c
index ea0ef05..d5aaa158 100644
--- a/gcc/f/lex.c
+++ b/gcc/f/lex.c
@@ -1412,6 +1412,12 @@ ffelex_hash_ (FILE *finput)
input_filename = old_input_filename;
error ("Use `#line ...' instead of `# ...' in first line");
}
+ if (c == '\n' || c == EOF)
+ {
+ if (token != NULL && !ffelex_kludge_flag_)
+ ffelex_token_kill (token);
+ return c;
+ }
}
else
error ("invalid #-line");
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 8a7dcb6..febf327 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,9 @@
2001-04-02 Jakub Jelinek <jakub@redhat.com>
+ * g77.f-torture/compile/20010321-1.f: New test.
+
+2001-04-02 Jakub Jelinek <jakub@redhat.com>
+
* gcc.c-torture/compile/20010329-1.c: New test.
2001-04-02 Jakub Jelinek <jakub@redhat.com>
diff --git a/gcc/testsuite/g77.f-torture/compile/20010321-1.f b/gcc/testsuite/g77.f-torture/compile/20010321-1.f
new file mode 100644
index 0000000..3f3b560
--- /dev/null
+++ b/gcc/testsuite/g77.f-torture/compile/20010321-1.f
@@ -0,0 +1,8 @@
+# 1 "20010321-1.f"
+ SUBROUTINE TWOEXP
+# 1 "include/implicit.h" 1 3
+ IMPLICIT DOUBLE PRECISION (A-H)
+# 3 "20010321-1.f" 2 3
+ LOGICAL ANTI
+ ANTI = .FALSE.
+ END