aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2006-06-29 21:57:23 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2006-06-29 21:57:23 +0000
commit8646f3df36e16529fb4400584b79dbcd94a03768 (patch)
tree3230a4cd9e54440adfdcd4b66a146f05d4a1aa38
parentf8c2645c2d21a86b81a2480e3ab18b8cea2bceee (diff)
downloadgcc-8646f3df36e16529fb4400584b79dbcd94a03768.zip
gcc-8646f3df36e16529fb4400584b79dbcd94a03768.tar.gz
gcc-8646f3df36e16529fb4400584b79dbcd94a03768.tar.bz2
re PR middle-end/27428 (ICE with goto in erroneous code)
PR middle-end/27428 * c-lex.c (c_lex_with_flags) <CPP_N_INVALID>: Increment errorcount to indicate the cpplib has issued an error message for us. * gcc.dg/pr27428-1.c: New test case. From-SVN: r115080
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/c-lex.c1
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr27428-1.c9
4 files changed, 21 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5a8cb4a..bd6e077 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2006-06-29 Roger Sayle <roger@eyesopen.com>
+
+ PR middle-end/27428
+ * c-lex.c (c_lex_with_flags) <CPP_N_INVALID>: Increment errorcount
+ to indicate the cpplib has issued an error message for us.
+
2006-06-29 Asher Langton <langton2@llnl.gov>
PR target/25765
diff --git a/gcc/c-lex.c b/gcc/c-lex.c
index ce231dd..108bc5c 100644
--- a/gcc/c-lex.c
+++ b/gcc/c-lex.c
@@ -364,6 +364,7 @@ c_lex_with_flags (tree *value, location_t *loc, unsigned char *cpp_flags)
case CPP_N_INVALID:
/* cpplib has issued an error. */
*value = error_mark_node;
+ errorcount++;
break;
case CPP_N_INTEGER:
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2f6fbe2..616a1ff 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2006-06-29 Roger Sayle <roger@eyesopen.com>
+
+ PR middle-end/27428
+ * gcc.dg/pr27428-1.c: New test case.
+
2006-06-29 Mike Stump <mrs@apple.com>
* gcc.dg/compat/struct-layout-1_generate.c: Don't use common
diff --git a/gcc/testsuite/gcc.dg/pr27428-1.c b/gcc/testsuite/gcc.dg/pr27428-1.c
new file mode 100644
index 0000000..93a221c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr27428-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+void foo()
+{
+ goto L;
+ if (0..) { L: ; } // { dg-error "too many decimal points" }
+}
+