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

* [Bug c++/46538] [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 [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 ` rguenth at gcc dot gnu.org
  2010-11-20  8:18 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-18 12:46 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.3.6


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

* [Bug c++/46538] [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 [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
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-20  8:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-20 08:15:39 UTC ---
Author: jakub
Date: Sat Nov 20 08:15:33 2010
New Revision: 166974

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166974
Log:
    PR c++/46538
    * decl.c (cp_make_fname_decl): Return error_mark_node if
    current_binding_level has already sk_function_parms kind.

    * g++.dg/other/error34.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/other/error34.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/46538] [4.3/4.4./4.5 Regression] ICE: SIGSEGV in cp_make_fname_decl (decl.c:3690) on invalid code when using __PRETTY_FUNCTION__
  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 ` jakub at gcc dot gnu.org
  2010-11-25 16:25 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-20  9:05 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2010.11.20 08:18:43
                 CC|                            |jakub at gcc dot gnu.org
      Known to work|                            |4.6.0
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |
            Summary|[4.3/4.4./4.5/4.6           |[4.3/4.4./4.5 Regression]
                   |Regression] ICE: SIGSEGV in |ICE: SIGSEGV in
                   |cp_make_fname_decl          |cp_make_fname_decl
                   |(decl.c:3690) on invalid    |(decl.c:3690) on invalid
                   |code when using             |code when using
                   |__PRETTY_FUNCTION__         |__PRETTY_FUNCTION__
     Ever Confirmed|0                           |1
      Known to fail|4.6.0                       |


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

* [Bug c++/46538] [4.3/4.4./4.5 Regression] ICE: SIGSEGV in cp_make_fname_decl (decl.c:3690) on invalid code when using __PRETTY_FUNCTION__
  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
                   ` (2 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-25 16:25 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |error-recovery
           Priority|P3                          |P5


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

* [Bug c++/46538] [4.3/4.4./4.5 Regression] ICE: SIGSEGV in cp_make_fname_decl (decl.c:3690) on invalid code when using __PRETTY_FUNCTION__
  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
                   ` (3 preceding siblings ...)
  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
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-07 15:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-07 15:20:30 UTC ---
Author: jakub
Date: Tue Dec  7 15:20:25 2010
New Revision: 167543

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167543
Log:
    Backport from mainline
    2010-11-20  Jakub Jelinek  <jakub@redhat.com>

    PR c++/46538
    * decl.c (cp_make_fname_decl): Return error_mark_node if
    current_binding_level has already sk_function_parms kind.

    * g++.dg/other/error34.C: New test.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/g++.dg/other/error34.C
Modified:
    branches/gcc-4_5-branch/gcc/cp/ChangeLog
    branches/gcc-4_5-branch/gcc/cp/decl.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


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

* [Bug c++/46538] [4.3/4.4 Regression] ICE: SIGSEGV in cp_make_fname_decl (decl.c:3690) on invalid code when using __PRETTY_FUNCTION__
  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
                   ` (4 preceding siblings ...)
  2010-12-07 15:20 ` jakub at gcc dot gnu.org
@ 2010-12-07 18:58 ` jakub at gcc dot gnu.org
  2011-06-23 18:10 ` [Bug c++/46538] [4.3 " paolo.carlini at oracle dot com
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-07 18:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-07 18:58:20 UTC ---
Author: jakub
Date: Tue Dec  7 18:58:18 2010
New Revision: 167559

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167559
Log:
    Backport from mainline
    2010-11-20  Jakub Jelinek  <jakub@redhat.com>

    PR c++/46538
    * decl.c (cp_make_fname_decl): Return error_mark_node if
    current_binding_level has already sk_function_parms kind.

    * g++.dg/other/error34.C: New test.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/other/error34.C
Modified:
    branches/gcc-4_4-branch/gcc/cp/ChangeLog
    branches/gcc-4_4-branch/gcc/cp/decl.c
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


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

* [Bug c++/46538] [4.3 Regression] ICE: SIGSEGV in cp_make_fname_decl (decl.c:3690) on invalid code when using __PRETTY_FUNCTION__
  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
                   ` (5 preceding siblings ...)
  2010-12-07 18:58 ` [Bug c++/46538] [4.3/4.4 " jakub at gcc dot gnu.org
@ 2011-06-23 18:10 ` paolo.carlini at oracle dot com
  6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-06-23 18:10 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to work|                            |4.4.6
         Resolution|                            |FIXED
            Summary|[4.3/4.4 Regression] ICE:   |[4.3 Regression] ICE:
                   |SIGSEGV in                  |SIGSEGV in
                   |cp_make_fname_decl          |cp_make_fname_decl
                   |(decl.c:3690) on invalid    |(decl.c:3690) on invalid
                   |code when using             |code when using
                   |__PRETTY_FUNCTION__         |__PRETTY_FUNCTION__

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-06-23 18:09:43 UTC ---
Fixed in 4.4.6.


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