public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/43384]  New: [4.3/4.4/4.5 Regression] ICE: Segmentation fault with invalid K&R-like declaration related to labels
@ 2010-03-15 20:44 zsojka at seznam dot cz
  2010-03-16 11:49 ` [Bug c/43384] [4.3/4.4/4.5 Regression] ICE: Segmentation fault with invalid K&R-like code rguenth at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2010-03-15 20:44 UTC (permalink / raw)
  To: gcc-bugs

Command line:
gcc testcase.c

----- testcase.c -----
void c_direct(p)
void *p = &&lab;
{}
----------------------

3.3.6 gives:
$ gcc-3.3.6 testcase.c
testcase.c: In function `c_direct':
testcase.c:2: error: parameter `p' is initialized
testcase.c:2: error: label `lab' used but not defined

3.4.6 and newer give:
$ /mnt/svn/gcc-trunk/binary-157460-lto/bin/gcc testcase.c
testcase.c: In function 'c_direct':
testcase.c:2:1: error: parameter 'p' is initialized
testcase.c:2:1: internal compiler error: Segmentation fault
(or bail out, without checking)

Valgrind on trunk outputs:
$ valgrind --trace-children=yes /mnt/svn/gcc-trunk/binary-157460-lto/bin/gcc
testcase.c
==5200== Invalid read of size 4
==5200==    at 0x49B7EF: bind (c-decl.c:604)
==5200==    by 0x49B9C8: bind_label (c-decl.c:670)
==5200==    by 0x4A1A68: lookup_label (c-decl.c:3027)
==5200==    by 0x4F6035: finish_label_address_expr (c-common.c:5659)
==5200==    by 0x50C90C: c_parser_unary_expression (c-parser.c:5141)
==5200==    by 0x50D262: c_parser_cast_expression (c-parser.c:5043)
==5200==    by 0x50D404: c_parser_binary_expression (c-parser.c:4859)
==5200==    by 0x50DA5C: c_parser_conditional_expression (c-parser.c:4645)
==5200==    by 0x50DF6E: c_parser_expr_no_commas (c-parser.c:4565)
==5200==    by 0x511ADF: c_parser_declaration_or_fndef (c-parser.c:3073)
==5200==    by 0x511D75: c_parser_declaration_or_fndef (c-parser.c:1335)
==5200==    by 0x5163B7: c_parse_file (c-parser.c:1005)
==5200==  Address 0x28 is not stack'd, malloc'd or (recently) free'd


-- 
           Summary: [4.3/4.4/4.5 Regression] ICE: Segmentation fault with
                    invalid K&R-like declaration related to labels
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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


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

end of thread, other threads:[~2012-07-02 10:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-43384-4@http.gcc.gnu.org/bugzilla/>
2010-10-31  7:57 ` [Bug c/43384] [4.3/4.4/4.5/4.6 Regression] ICE: Segmentation fault with invalid K&R-like code simartin at gcc dot gnu.org
2010-11-06 21:59 ` simartin at gcc dot gnu.org
2010-11-06 22:07 ` [Bug c/43384] [4.3/4.4/4.5 " simartin at gcc dot gnu.org
2011-06-27 14:34 ` rguenth at gcc dot gnu.org
2012-03-13 14:18 ` [Bug c/43384] [4.5 " jakub at gcc dot gnu.org
2012-07-02 10:24 ` rguenth at gcc dot gnu.org
2010-03-15 20:44 [Bug c/43384] New: [4.3/4.4/4.5 Regression] ICE: Segmentation fault with invalid K&R-like declaration related to labels zsojka at seznam dot cz
2010-03-16 11:49 ` [Bug c/43384] [4.3/4.4/4.5 Regression] ICE: Segmentation fault with invalid K&R-like code rguenth at gcc dot gnu dot org
2010-03-17 15:19 ` rguenth at gcc dot gnu dot org
2010-03-24 13:49 ` zsojka at seznam dot cz

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).