From: Roger Sayle Date: Sun, 2 Jul 2006 16:05:28 +0000 (+0000) Subject: re PR middle-end/27428 (ICE with goto in erroneous code) X-Git-Tag: releases/gcc-4.0.4~565 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=16bff2c1ed57d586263766eec154ee87f312f947;p=thirdparty%2Fgcc.git re PR middle-end/27428 (ICE with goto in erroneous code) PR middle-end/27428 * c-lex.c (c_lex_with_flags) : Increment errorcount to indicate the cpplib has issued an error message for us. * gcc.dg/pr27428-1.c: New test case. From-SVN: r115133 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 28e9af85031d..457ca8216932 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-07-02 Roger Sayle + + PR middle-end/27428 + * c-lex.c (c_lex_with_flags) : Increment errorcount + to indicate the cpplib has issued an error message for us. + 2006-06-23 Richard Guenther PR middle-end/28045 diff --git a/gcc/c-lex.c b/gcc/c-lex.c index f5425ce49e90..2a7bd3008dcd 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -362,6 +362,7 @@ c_lex_with_flags (tree *value, 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 1636861d44f0..8ac222ca81a9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-07-02 Roger Sayle + + PR middle-end/27428 + * gcc.dg/pr27428-1.c: New test case. + 2006-06-25 Lee Millward PR c++/27821 diff --git a/gcc/testsuite/gcc.dg/pr27428-1.c b/gcc/testsuite/gcc.dg/pr27428-1.c new file mode 100644 index 000000000000..93a221c84746 --- /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" } +} +