public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/47435] New: [4.6 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code
@ 2011-01-24 13:57 zsojka at seznam dot cz
  2011-01-24 14:49 ` [Bug c/47435] " hjl.tools at gmail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: zsojka at seznam dot cz @ 2011-01-24 13:57 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47435

           Summary: [4.6 Regression] ICE: SIGSEGV in c_finish_case
                    (c-typeck.c:8859) on invalid code
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz


Created attachment 23097
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23097
reduced testcase

Compiler output:
$ gcc testcase.c
testcase.c: In function 'foo':
testcase.c:5:5: error: a label can only be part of a statement and a
declaration is not a statement
testcase.c:5:5: error: unknown type name 'x'
testcase.c:6:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before
'}' token
testcase.c:4:5: error: label at end of compound statement
==28038== Invalid read of size 8
==28038==    at 0x513058: c_finish_case (c-typeck.c:8859)
==28038==    by 0x535EF4: c_parser_statement_after_labels (c-parser.c:4626)
==28038==    by 0x5372A7: c_parser_compound_statement_nostart (c-parser.c:4109)
==28038==    by 0x538838: c_parser_compound_statement (c-parser.c:3946)
==28038==    by 0x534F0A: c_parser_declaration_or_fndef (c-parser.c:1719)
==28038==    by 0x539F8D: c_parser_external_declaration (c-parser.c:1332)
==28038==    by 0x53AB67: c_parse_file (c-parser.c:1220)
==28038==    by 0x574804: c_common_parse_file (c-opts.c:1071)
==28038==    by 0x8DD507: toplev_main (toplev.c:579)
==28038==    by 0x62FEBBC: (below main) (in /lib64/libc-2.11.2.so)
==28038==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==28038== 
testcase.c:6:3: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


Output - 4.5:
$ gcc testcase.c testcase.c: In function 'foo':
testcase.c:5:5: error: 'x' undeclared (first use in this function)
testcase.c:5:5: note: each undeclared identifier is reported only once for each
function it appears in
testcase.c:5:7: error: expected ';' before 'y'

The diagnostics given by 4.5 was probably more helpful.

Tested revisions:
r169155 - crash
4.5 r168785 - OK


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2014-06-12 12:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-24 13:57 [Bug c/47435] New: [4.6 Regression] ICE: SIGSEGV in c_finish_case (c-typeck.c:8859) on invalid code zsojka at seznam dot cz
2011-01-24 14:49 ` [Bug c/47435] " hjl.tools at gmail dot com
2011-01-24 14:55 ` bonzini at gnu dot org
2011-01-24 16:24 ` jakub at gcc dot gnu.org
2011-03-25 19:56 ` [Bug c/47435] [4.6/4.7 " jakub at gcc dot gnu.org
2011-06-27 15:44 ` jakub at gcc dot gnu.org
2011-10-26 17:23 ` jakub at gcc dot gnu.org
2012-03-01 14:55 ` jakub at gcc dot gnu.org
2012-06-13 13:46 ` [Bug c/47435] [4.6/4.7/4.8 " bsreram85 at gmail dot com
2013-04-12 15:17 ` [Bug c/47435] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
2013-12-05  6:28 ` [Bug c/47435] [4.7 " mpolacek at gcc dot gnu.org
2014-06-12 12:59 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).