public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31372]  New: [4.3 Regression] Segfault in cp/parser.c: cp_parser_parameter_declaration
@ 2007-03-27  9:54 tbm at cyrius dot com
  2007-03-27  9:55 ` [Bug c++/31372] " tbm at cyrius dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: tbm at cyrius dot com @ 2007-03-27  9:54 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3998 bytes --]

The following segfault happens with 4.3 SVN 20070318 and 
20070326, works with 20070303.

(sid)4967:tbm@coconut: ~] /usr/lib/gcc-snapshot/bin/g++
democracyplayer-fasttypes.cc
democracyplayer-fasttypes.cc:2: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.1/README.Bugs>.
zsh: exit 1     /usr/lib/gcc-snapshot/bin/g++ democracyplayer-fasttypes.cc
(sid)4968:tbm@coconut: ~] cat democracyplayer-fasttypes.cc

template < class U >
  void foo (U (*), long ...)
  {
  }




Program received signal SIGSEGV, Segmentation fault.
cp_parser_parameter_declaration (parser=0x2b3a15801730, template_parm_p=0 '\0',
    parenthesized_p=0x7fff959c8227 "") at
/home/tbm/scratch/gcc/gcc/cp/parser.c:12934
12934         if (DECL_P (type))
(gdb) where
#0  cp_parser_parameter_declaration (parser=0x2b3a15801730, template_parm_p=0
'\0',
    parenthesized_p=0x7fff959c8227 "") at
/home/tbm/scratch/gcc/gcc/cp/parser.c:12934
#1  0x00000000004c1c88 in cp_parser_parameter_declaration_clause
(parser=0x2b3a15801730)
    at /home/tbm/scratch/gcc/gcc/cp/parser.c:12740
#2  0x00000000004c232b in cp_parser_declarator (parser=0x2b3a15801730,
    dcl_kind=CP_PARSER_DECLARATOR_NAMED, ctor_dtor_or_conv_p=0x7fff959c8360,
    parenthesized_p=<value optimized out>, member_p=0 '\0')
    at /home/tbm/scratch/gcc/gcc/cp/parser.c:11967
#3  0x00000000004c77ab in cp_parser_init_declarator (parser=0x2b3a15801730,
    decl_specifiers=0x7fff959c83c0, checks=0x0, function_definition_allowed_p=1
'\001',
    member_p=1 '\001', declares_class_or_enum=0,
function_definition_p=0x7fff959c841f "")
    at /home/tbm/scratch/gcc/gcc/cp/parser.c:11476
#4  0x00000000004c939c in cp_parser_single_declaration (parser=0x2b3a15801730,
checks=0x0,
    member_p=1 '\001', friend_p=<value optimized out>) at
/home/tbm/scratch/gcc/gcc/cp/parser.c:16375
#5  0x00000000004c962e in cp_parser_template_declaration_after_export
(parser=0x2b3a15801730,
    member_p=208 'â–’') at /home/tbm/scratch/gcc/gcc/cp/parser.c:16234
#6  0x00000000004b30e9 in cp_parser_member_declaration (parser=0x2b3a15801730)
    at /home/tbm/scratch/gcc/gcc/cp/parser.c:14206
#7  0x00000000004b44d2 in cp_parser_type_specifier (parser=0x2b3a15801730,
    flags=<value optimized out>, decl_specs=0x7fff959c86a0, is_declaration=1
'\001',
    declares_class_or_enum=0x7fff959c8640, is_cv_qualifier=<value optimized
out>)
    at /home/tbm/scratch/gcc/gcc/cp/parser.c:14137
#8  0x00000000004bdc3a in cp_parser_decl_specifier_seq (parser=0x2b3a15801730,
    flags=CP_PARSER_FLAGS_OPTIONAL, decl_specs=0x7fff959c86a0,
declares_class_or_enum=0x7fff959c86f8)
    at /home/tbm/scratch/gcc/gcc/cp/parser.c:7827
#9  0x00000000004c91f3 in cp_parser_single_declaration (parser=0x2b3a15801730,
checks=0x0,
    member_p=0 '\0', friend_p=0x7fff959c8757 "") at
/home/tbm/scratch/gcc/gcc/cp/parser.c:16319
#10 0x00000000004c962e in cp_parser_template_declaration_after_export
(parser=0x2b3a15801730,
    member_p=208 'â–’') at /home/tbm/scratch/gcc/gcc/cp/parser.c:16234
#11 0x00000000004caf0a in cp_parser_declaration (parser=0x2b3a15801730)
    at /home/tbm/scratch/gcc/gcc/cp/parser.c:7370
#12 0x00000000004ca646 in cp_parser_declaration_seq_opt (parser=0x2b3a15801730)
    at /home/tbm/scratch/gcc/gcc/cp/parser.c:7293
#13 0x00000000004cae8d in cp_parser_declaration (parser=0x2b3a15801730)
    at /home/tbm/scratch/gcc/gcc/cp/parser.c:11028


-- 
           Summary: [4.3 Regression] Segfault in cp/parser.c:
                    cp_parser_parameter_declaration
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tbm at cyrius dot com


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


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

* [Bug c++/31372] [4.3 Regression] Segfault in cp/parser.c: cp_parser_parameter_declaration
  2007-03-27  9:54 [Bug c++/31372] New: [4.3 Regression] Segfault in cp/parser.c: cp_parser_parameter_declaration tbm at cyrius dot com
@ 2007-03-27  9:55 ` tbm at cyrius dot com
  2007-03-27 14:10 ` doug dot gregor at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: tbm at cyrius dot com @ 2007-03-27  9:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from tbm at cyrius dot com  2007-03-27 10:54 -------
Most likely caused by

2007-03-09  Douglas Gregor  <doug.gregor@gmail.com>

        PR c++/20599
...


-- 

tbm at cyrius dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dgregor at gcc dot gnu dot
                   |                            |org


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


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

* [Bug c++/31372] [4.3 Regression] Segfault in cp/parser.c: cp_parser_parameter_declaration
  2007-03-27  9:54 [Bug c++/31372] New: [4.3 Regression] Segfault in cp/parser.c: cp_parser_parameter_declaration tbm at cyrius dot com
  2007-03-27  9:55 ` [Bug c++/31372] " tbm at cyrius dot com
@ 2007-03-27 14:10 ` doug dot gregor at gmail dot com
  2007-03-27 14:18 ` tbm at gcc dot gnu dot org
  2007-03-27 14:44 ` tbm at cyrius dot com
  3 siblings, 0 replies; 5+ messages in thread
From: doug dot gregor at gmail dot com @ 2007-03-27 14:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from doug dot gregor at gmail dot com  2007-03-27 15:10 -------
Does the following patch solve the problem?

  http://gcc.gnu.org/ml/gcc-patches/2007-03/msg00799.html


-- 


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


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

* [Bug c++/31372] [4.3 Regression] Segfault in cp/parser.c: cp_parser_parameter_declaration
  2007-03-27  9:54 [Bug c++/31372] New: [4.3 Regression] Segfault in cp/parser.c: cp_parser_parameter_declaration tbm at cyrius dot com
  2007-03-27  9:55 ` [Bug c++/31372] " tbm at cyrius dot com
  2007-03-27 14:10 ` doug dot gregor at gmail dot com
@ 2007-03-27 14:18 ` tbm at gcc dot gnu dot org
  2007-03-27 14:44 ` tbm at cyrius dot com
  3 siblings, 0 replies; 5+ messages in thread
From: tbm at gcc dot gnu dot org @ 2007-03-27 14:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from tbm at gcc dot gnu dot org  2007-03-27 15:18 -------


*** This bug has been marked as a duplicate of 31138 ***


-- 

tbm at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

* [Bug c++/31372] [4.3 Regression] Segfault in cp/parser.c: cp_parser_parameter_declaration
  2007-03-27  9:54 [Bug c++/31372] New: [4.3 Regression] Segfault in cp/parser.c: cp_parser_parameter_declaration tbm at cyrius dot com
                   ` (2 preceding siblings ...)
  2007-03-27 14:18 ` tbm at gcc dot gnu dot org
@ 2007-03-27 14:44 ` tbm at cyrius dot com
  3 siblings, 0 replies; 5+ messages in thread
From: tbm at cyrius dot com @ 2007-03-27 14:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from tbm at cyrius dot com  2007-03-27 15:44 -------
(In reply to comment #2)
> Does the following patch solve the problem?
> 
>   http://gcc.gnu.org/ml/gcc-patches/2007-03/msg00799.html

Yes, with the typo (TREDE) corrected this work.

Sorry, I thought I had seen this patch before but couldn't find it before I
opened this PR.


-- 


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


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

end of thread, other threads:[~2007-03-27 14:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-27  9:54 [Bug c++/31372] New: [4.3 Regression] Segfault in cp/parser.c: cp_parser_parameter_declaration tbm at cyrius dot com
2007-03-27  9:55 ` [Bug c++/31372] " tbm at cyrius dot com
2007-03-27 14:10 ` doug dot gregor at gmail dot com
2007-03-27 14:18 ` tbm at gcc dot gnu dot org
2007-03-27 14:44 ` tbm at cyrius 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).