public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/46538] New: [4.3/4.4./4.5/4.6 Regression] ICE: SIGSEGV in cp_make_fname_decl (decl.c:3690) on invalid code when using __PRETTY_FUNCTION__
@ 2010-11-18 12:45 zsojka at seznam dot cz
  2010-11-18 12:46 ` [Bug c++/46538] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2010-11-18 12:45 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.3/4.4./4.5/4.6 Regression] ICE: SIGSEGV in
                    cp_make_fname_decl (decl.c:3690) on invalid code when
                    using __PRETTY_FUNCTION__
           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 -----
S():str(__PRETTY_FUNCTION__) {}
----------------------

Output with valgrind:
$ gcc testcase.C
testcase.C:1:3: error: ISO C++ forbids declaration of 'S' with no type
[-fpermissive]
testcase.C: In function 'int S()':
testcase.C:1:5: error: only constructors take member initializers
==12873== Invalid read of size 1
==12873==    at 0x503CE7: cp_make_fname_decl (decl.c:3690)
==12873==    by 0x662D44: fname_decl (c-common.c:856)
==12873==    by 0x602FD5: finish_fname (semantics.c:2289)
==12873==    by 0x5A7DA3: cp_parser_primary_expression (parser.c:3781)
==12873==    by 0x5A7FBF: cp_parser_postfix_expression (parser.c:5137)
==12873==    by 0x5A8C7B: cp_parser_unary_expression (parser.c:6109)
==12873==    by 0x5A95D7: cp_parser_binary_expression (parser.c:6779)
==12873==    by 0x5A9ADA: cp_parser_assignment_expression (parser.c:6995)
==12873==    by 0x5ABBAE: cp_parser_parenthesized_expression_list
(parser.c:5703)
==12873==    by 0x5B1C7B: cp_parser_ctor_initializer_opt_and_function_body
(parser.c:10667)
==12873==    by 0x5B24B1: cp_parser_function_definition_after_declarator
(parser.c:19647)
==12873==    by 0x5B3C9B: cp_parser_init_declarator (parser.c:19576)
==12873==  Address 0x74 is not stack'd, malloc'd or (recently) free'd
==12873== 
cc1plus: 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:
r166868 - crash
3.3.6, 4.1.2, 4.2.4, 4.3.5, 4.4.5, 4.5.1 - bails out (release/no checking)
3.4.6, 4.0.4 - OK (release/no checking)


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

end of thread, other threads:[~2011-06-23 18:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-18 12:45 [Bug c++/46538] New: [4.3/4.4./4.5/4.6 Regression] ICE: SIGSEGV in cp_make_fname_decl (decl.c:3690) on invalid code when using __PRETTY_FUNCTION__ zsojka at seznam dot cz
2010-11-18 12:46 ` [Bug c++/46538] " rguenth at gcc dot gnu.org
2010-11-20  8:18 ` jakub at gcc dot gnu.org
2010-11-20  9:05 ` [Bug c++/46538] [4.3/4.4./4.5 " jakub at gcc dot gnu.org
2010-11-25 16:25 ` rguenth at gcc dot gnu.org
2010-12-07 15:20 ` jakub at gcc dot gnu.org
2010-12-07 18:58 ` [Bug c++/46538] [4.3/4.4 " jakub at gcc dot gnu.org
2011-06-23 18:10 ` [Bug c++/46538] [4.3 " paolo.carlini at oracle dot com

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