public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/46282] New: [4.6 Regression] ICE: SIGSEGV in grokbitfield (decl2.c:1054) in C++0x mode on invalid code
@ 2010-11-02 23:04 zsojka at seznam dot cz
  2010-11-03  0:26 ` [Bug c++/46282] [4.6 Regression] [C++0x] ICE: SIGSEGV in grokbitfield (decl2.c:1054) paolo.carlini at oracle dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2010-11-02 23:04 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.6 Regression] ICE: SIGSEGV in grokbitfield
                    (decl2.c:1054) in C++0x mode on invalid code
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz


---- testcase.C ----
template<int>
class A
{
  A : i() {}
  int i;
};
--------------------

Related valgrind output:
$ gcc testcase.C -std=c++0x
testcase.C:4:9: error: there are no arguments to 'i' that depend on a template
parameter, so a declaration of 'i' must be available [-fpermissive]
testcase.C:4:9: note: (if you use '-fpermissive', G++ will accept your code,
but allowing the use of an undeclared name is deprecated)
==10499== Invalid read of size 2
==10499==    at 0x55336E: grokbitfield (decl2.c:1054)
==10499==    by 0x59013B: cp_parser_member_declaration (parser.c:17645)
==10499==    by 0x572F13: cp_parser_type_specifier (parser.c:17392)
==10499==    by 0x574787: cp_parser_decl_specifier_seq (parser.c:9890)
==10499==    by 0x58CACA: cp_parser_single_declaration (parser.c:19787)
==10499==    by 0x58D04D: cp_parser_template_declaration_after_export
(parser.c:19700)
==10499==    by 0x591DA9: cp_parser_declaration (parser.c:9369)
==10499==    by 0x5904B9: cp_parser_declaration_seq_opt (parser.c:9299)
==10499==    by 0x592144: c_parse_file (parser.c:3432)
==10499==    by 0x667B69: c_common_parse_file (c-opts.c:1162)
==10499==    by 0x9D42FF: toplev_main (toplev.c:919)
==10499==    by 0x6376BBC: (below main) (in /lib64/libc-2.11.2.so)
==10499==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==10499== 
testcase.C:4:9: 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.

Tested revisions:
r166210 - crash
r166153 - OK


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

end of thread, other threads:[~2011-03-01 22:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-02 23:04 [Bug c++/46282] New: [4.6 Regression] ICE: SIGSEGV in grokbitfield (decl2.c:1054) in C++0x mode on invalid code zsojka at seznam dot cz
2010-11-03  0:26 ` [Bug c++/46282] [4.6 Regression] [C++0x] ICE: SIGSEGV in grokbitfield (decl2.c:1054) paolo.carlini at oracle dot com
2010-11-03 11:00 ` rguenth at gcc dot gnu.org
2010-11-03 12:52 ` jakub at gcc dot gnu.org
2011-03-01  6:30 ` jason at gcc dot gnu.org
2011-03-01 22:44 ` jason at gcc dot gnu.org
2011-03-01 22:47 ` jason 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).