public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/31138]  New: [4.3 regression] ICE with ellipsis
@ 2007-03-11 22:09 reichelt at gcc dot gnu dot org
  2007-03-11 22:09 ` [Bug c++/31138] " reichelt at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-03-11 22:09 UTC (permalink / raw)
  To: gcc-bugs

The following valid code snippet triggers an ICE on mainline:

=====================
void foo(long ...);
=====================

bug.cc:1: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]

The same thing happens for the following invalid variation:

=====================
void foo(const ...);
=====================


-- 
           Summary: [4.3 regression] ICE with ellipsis
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, ice-on-invalid-code, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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


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

* [Bug c++/31138] [4.3 regression] ICE with ellipsis
  2007-03-11 22:09 [Bug c++/31138] New: [4.3 regression] ICE with ellipsis reichelt at gcc dot gnu dot org
@ 2007-03-11 22:09 ` reichelt at gcc dot gnu dot org
  2007-03-11 23:01 ` reichelt at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-03-11 22:09 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.3.0


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


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

* [Bug c++/31138] [4.3 regression] ICE with ellipsis
  2007-03-11 22:09 [Bug c++/31138] New: [4.3 regression] ICE with ellipsis reichelt at gcc dot gnu dot org
  2007-03-11 22:09 ` [Bug c++/31138] " reichelt at gcc dot gnu dot org
@ 2007-03-11 23:01 ` reichelt at gcc dot gnu dot org
  2007-03-11 23:19 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-03-11 23:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from reichelt at gcc dot gnu dot org  2007-03-11 23:01 -------
I guess this is also related to your patch for variadic templates, Douglas,
but I might be wrong:

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

        PR c++/20599
        * typeck.c (check_return_expr): Check for bare parameter packs.
        (comptypes): Compare template parameter packs and
        type pack expansions.
        ...


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |doug dot gregor at gmail dot
                   |                            |com


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


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

* [Bug c++/31138] [4.3 regression] ICE with ellipsis
  2007-03-11 22:09 [Bug c++/31138] New: [4.3 regression] ICE with ellipsis reichelt at gcc dot gnu dot org
  2007-03-11 22:09 ` [Bug c++/31138] " reichelt at gcc dot gnu dot org
  2007-03-11 23:01 ` reichelt at gcc dot gnu dot org
@ 2007-03-11 23:19 ` pinskia at gcc dot gnu dot org
  2007-03-11 23:51 ` schwab at suse dot de
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-03-11 23:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2007-03-11 23:19 -------
How is the first one valid?  I thought you always needed a comma before the
ellipsis for variable argument functions (I know in C you need it for sure).


-- 


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


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

* [Bug c++/31138] [4.3 regression] ICE with ellipsis
  2007-03-11 22:09 [Bug c++/31138] New: [4.3 regression] ICE with ellipsis reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-03-11 23:19 ` pinskia at gcc dot gnu dot org
@ 2007-03-11 23:51 ` schwab at suse dot de
  2007-03-27 14:12 ` doug dot gregor at gmail dot com
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: schwab at suse dot de @ 2007-03-11 23:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from schwab at suse dot de  2007-03-11 23:51 -------
In C++ the comma before ... is optional.

   Where syntactically correct, &#8220;, ...&#8221; is synonymous with
&#8220;...&#8221;.


-- 


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


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

* [Bug c++/31138] [4.3 regression] ICE with ellipsis
  2007-03-11 22:09 [Bug c++/31138] New: [4.3 regression] ICE with ellipsis reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-03-11 23:51 ` schwab at suse dot de
@ 2007-03-27 14:12 ` doug dot gregor at gmail dot com
  2007-03-27 14:18 ` tbm at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: doug dot gregor at gmail dot com @ 2007-03-27 14:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from doug dot gregor at gmail dot com  2007-03-27 15:12 -------
Patch here:

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


-- 


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


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

* [Bug c++/31138] [4.3 regression] ICE with ellipsis
  2007-03-11 22:09 [Bug c++/31138] New: [4.3 regression] ICE with ellipsis reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2007-03-27 14:12 ` doug dot gregor at gmail dot com
@ 2007-03-27 14:18 ` tbm at gcc dot gnu dot org
  2007-03-28 14:31 ` dgregor at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: tbm at gcc dot gnu dot org @ 2007-03-27 14:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from tbm at gcc dot gnu dot org  2007-03-27 15:18 -------
*** Bug 31372 has been marked as a duplicate of this bug. ***


-- 

tbm at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tbm at cyrius dot com


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


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

* [Bug c++/31138] [4.3 regression] ICE with ellipsis
  2007-03-11 22:09 [Bug c++/31138] New: [4.3 regression] ICE with ellipsis reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2007-03-27 14:18 ` tbm at gcc dot gnu dot org
@ 2007-03-28 14:31 ` dgregor at gcc dot gnu dot org
  2007-03-31 12:42 ` dgregor at gcc dot gnu dot org
  2007-03-31 12:44 ` dgregor at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2007-03-28 14:31 UTC (permalink / raw)
  To: gcc-bugs



-- 

dgregor at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |dgregor at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-03-28 15:31:26
               date|                            |


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


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

* [Bug c++/31138] [4.3 regression] ICE with ellipsis
  2007-03-11 22:09 [Bug c++/31138] New: [4.3 regression] ICE with ellipsis reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2007-03-28 14:31 ` dgregor at gcc dot gnu dot org
@ 2007-03-31 12:42 ` dgregor at gcc dot gnu dot org
  2007-03-31 12:44 ` dgregor at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2007-03-31 12:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dgregor at gcc dot gnu dot org  2007-03-31 13:41 -------
Subject: Bug 31138

Author: dgregor
Date: Sat Mar 31 13:41:30 2007
New Revision: 123380

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123380
Log:
2007-03-31  Douglas Gregor  <doug.gregor@gmail.com>

        PR c++/31138
        PR c++/31140
        PR c++/31141
        * parser.c (declarator_can_be_parameter_pack): New.
        (cp_parser_template_parameter): Only parse the `...' if the
        declarator can be a parameter pack.
        (cp_parser_parameter_declaration): Ditto. Also, handle when TYPE
        is NULL.
        * pt.c (find_parameter_packs_r): Look into the bounds on integer
        types (they could be used as array bounds). 
        (check_for_bare_parameter_packs): Deal with TEMPLATE_PARM_INDEX.
        (tsubst_pack_expansion): Handle failure to expand parameter
        packs.

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

        * g++.dg/parser/pr31138.C: New.
        * g++.dg/parser/pr31140.C: New.
        * g++.dg/parser/pr31141.C: New.


Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/31138] [4.3 regression] ICE with ellipsis
  2007-03-11 22:09 [Bug c++/31138] New: [4.3 regression] ICE with ellipsis reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2007-03-31 12:42 ` dgregor at gcc dot gnu dot org
@ 2007-03-31 12:44 ` dgregor at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2007-03-31 12:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from dgregor at gcc dot gnu dot org  2007-03-31 13:43 -------
Fixed in mainline compiler


-- 

dgregor at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

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

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-11 22:09 [Bug c++/31138] New: [4.3 regression] ICE with ellipsis reichelt at gcc dot gnu dot org
2007-03-11 22:09 ` [Bug c++/31138] " reichelt at gcc dot gnu dot org
2007-03-11 23:01 ` reichelt at gcc dot gnu dot org
2007-03-11 23:19 ` pinskia at gcc dot gnu dot org
2007-03-11 23:51 ` schwab at suse dot de
2007-03-27 14:12 ` doug dot gregor at gmail dot com
2007-03-27 14:18 ` tbm at gcc dot gnu dot org
2007-03-28 14:31 ` dgregor at gcc dot gnu dot org
2007-03-31 12:42 ` dgregor at gcc dot gnu dot org
2007-03-31 12:44 ` dgregor at gcc dot gnu dot 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).