public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29727]  New: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member
@ 2006-11-05 20:22 reichelt at gcc dot gnu dot org
  2006-11-05 23:19 ` [Bug c++/29727] " reichelt at gcc dot gnu dot org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-11-05 20:22 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet triggers an ICE since GCC 3.3:

=================================================
template<int> struct A
{
  static int a[1];
};

template<int N> int A<N>::a[1] = { X: 0 };

void foo()
{
  A<0>::a;
}
=================================================

bug.cc: In instantiation of 'int A<0>::a [1]':
bug.cc:10:   instantiated from here
bug.cc:6: error: 'X' was not declared in this scope
bug.cc:6: internal compiler error: in reshape_init_array_1, at cp/decl.c:4350
Please submit a full bug report, [etc.]


-- 
           Summary: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer
                    for template member
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, 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=29727


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

* [Bug c++/29727] [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member
  2006-11-05 20:22 [Bug c++/29727] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member reichelt at gcc dot gnu dot org
@ 2006-11-05 23:19 ` reichelt at gcc dot gnu dot org
  2006-11-12 20:36 ` mmitchel at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-11-05 23:19 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.4


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


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

* [Bug c++/29727] [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member
  2006-11-05 20:22 [Bug c++/29727] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member reichelt at gcc dot gnu dot org
  2006-11-05 23:19 ` [Bug c++/29727] " reichelt at gcc dot gnu dot org
@ 2006-11-12 20:36 ` mmitchel at gcc dot gnu dot org
  2006-11-26  0:19 ` pinskia at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-11-12 20:36 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4


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


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

* [Bug c++/29727] [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member
  2006-11-05 20:22 [Bug c++/29727] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member reichelt at gcc dot gnu dot org
  2006-11-05 23:19 ` [Bug c++/29727] " reichelt at gcc dot gnu dot org
  2006-11-12 20:36 ` mmitchel at gcc dot gnu dot org
@ 2006-11-26  0:19 ` pinskia at gcc dot gnu dot org
  2007-02-03 20:49 ` gdr at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-11-26  0:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-11-26 00:19 -------
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-11-26 00:19:12
               date|                            |


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


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

* [Bug c++/29727] [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member
  2006-11-05 20:22 [Bug c++/29727] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-11-26  0:19 ` pinskia at gcc dot gnu dot org
@ 2007-02-03 20:49 ` gdr at gcc dot gnu dot org
  2007-02-03 21:03 ` pinskia at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 20:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from gdr at gcc dot gnu dot org  2007-02-03 20:49 -------
won't fix in GCC-4.0.x.  Adjusting milestone.


-- 

gdr at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.4                       |4.1.3


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


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

* [Bug c++/29727] [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member
  2006-11-05 20:22 [Bug c++/29727] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-02-03 20:49 ` gdr at gcc dot gnu dot org
@ 2007-02-03 21:03 ` pinskia at gcc dot gnu dot org
  2007-02-14  9:27 ` mmitchel at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-02-03 21:03 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.3                       |4.1.2


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


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

* [Bug c++/29727] [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member
  2006-11-05 20:22 [Bug c++/29727] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2007-02-03 21:03 ` pinskia at gcc dot gnu dot org
@ 2007-02-14  9:27 ` mmitchel at gcc dot gnu dot org
  2007-07-23 21:32 ` [Bug c++/29727] [4.2/4.3 " reichelt at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14  9:27 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.2                       |4.1.3


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


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

* [Bug c++/29727] [4.2/4.3 regression] ICE on invalid initializer for template member
  2006-11-05 20:22 [Bug c++/29727] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2007-02-14  9:27 ` mmitchel at gcc dot gnu dot org
@ 2007-07-23 21:32 ` reichelt at gcc dot gnu dot org
  2007-09-25 14:54 ` pcarlini at suse dot de
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-07-23 21:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from reichelt at gcc dot gnu dot org  2007-07-23 21:31 -------
The bug disappeared on the 4.1 branch (already in GCC 4.1.2).
It is still present on the 4.2 branch and mainline.


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.0/4.1/4.2/4.3 regression]|[4.2/4.3 regression] ICE on
                   |ICE on invalid initializer  |invalid initializer for
                   |for template member         |template member
   Target Milestone|4.1.3                       |4.2.2


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


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

* [Bug c++/29727] [4.2/4.3 regression] ICE on invalid initializer for template member
  2006-11-05 20:22 [Bug c++/29727] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2007-07-23 21:32 ` [Bug c++/29727] [4.2/4.3 " reichelt at gcc dot gnu dot org
@ 2007-09-25 14:54 ` pcarlini at suse dot de
  2007-10-09 19:28 ` mmitchel at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pcarlini at suse dot de @ 2007-09-25 14:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pcarlini at suse dot de  2007-09-25 14:54 -------
When fixing this bug we also want to make sure we do not reject this valid
variant:

template<int> struct A
{
  struct S { int X; };
  static S a;
};

template<int N> typename A<N>::S A<N>::a = { X : 1 };

void foo()
{
  A<0>::a;
}


-- 

pcarlini at suse dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pcarlini at suse dot de
           Keywords|                            |rejects-valid


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


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

* [Bug c++/29727] [4.2/4.3 regression] ICE on invalid initializer for template member
  2006-11-05 20:22 [Bug c++/29727] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2007-09-25 14:54 ` pcarlini at suse dot de
@ 2007-10-09 19:28 ` mmitchel at gcc dot gnu dot org
  2008-02-01 16:56 ` jsm28 at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-10-09 19:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from mmitchel at gcc dot gnu dot org  2007-10-09 19:22 -------
Change target milestone to 4.2.3, as 4.2.2 has been released.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.2                       |4.2.3


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


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

* [Bug c++/29727] [4.2/4.3 regression] ICE on invalid initializer for template member
  2006-11-05 20:22 [Bug c++/29727] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member reichelt at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2007-10-09 19:28 ` mmitchel at gcc dot gnu dot org
@ 2008-02-01 16:56 ` jsm28 at gcc dot gnu dot org
  2008-05-19 20:26 ` [Bug c++/29727] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-02-01 16:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jsm28 at gcc dot gnu dot org  2008-02-01 16:53 -------
4.2.3 is being released now, changing milestones of open bugs to 4.2.4.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.3                       |4.2.4


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


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

* [Bug c++/29727] [4.2/4.3/4.4 regression] ICE on invalid initializer for template member
  2006-11-05 20:22 [Bug c++/29727] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member reichelt at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2008-02-01 16:56 ` jsm28 at gcc dot gnu dot org
@ 2008-05-19 20:26 ` jsm28 at gcc dot gnu dot org
  2008-10-05  7:29 ` simartin at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-05-19 20:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jsm28 at gcc dot gnu dot org  2008-05-19 20:22 -------
4.2.4 is being released, changing milestones to 4.2.5.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.4                       |4.2.5


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


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

* [Bug c++/29727] [4.2/4.3/4.4 regression] ICE on invalid initializer for template member
  2006-11-05 20:22 [Bug c++/29727] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member reichelt at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2008-05-19 20:26 ` [Bug c++/29727] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
@ 2008-10-05  7:29 ` simartin at gcc dot gnu dot org
  2009-03-27  7:18 ` andreasmeier80 at gmx dot de
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: simartin at gcc dot gnu dot org @ 2008-10-05  7:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from simartin at gcc dot gnu dot org  2008-10-05 07:27 -------
PR37736 opened for the reject valid case (it's a different bug).

Patch for the ICE submitted here:
  http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00134.html


-- 

simartin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simartin at gcc dot gnu dot
                   |                            |org
         AssignedTo|unassigned at gcc dot gnu   |simartin at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-11-26 00:19:12         |2008-10-05 07:27:47
               date|                            |


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


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

* [Bug c++/29727] [4.2/4.3/4.4 regression] ICE on invalid initializer for template member
  2006-11-05 20:22 [Bug c++/29727] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member reichelt at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2008-10-05  7:29 ` simartin at gcc dot gnu dot org
@ 2009-03-27  7:18 ` andreasmeier80 at gmx dot de
  2009-03-27 13:12 ` hjl at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: andreasmeier80 at gmx dot de @ 2009-03-27  7:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from andreasmeier80 at gmx dot de  2009-03-27 07:18 -------
Approved: http://gcc.gnu.org/ml/gcc-patches/2009-03/msg01080.html


-- 


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


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

* [Bug c++/29727] [4.2/4.3/4.4 regression] ICE on invalid initializer for template member
  2006-11-05 20:22 [Bug c++/29727] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member reichelt at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2009-03-27  7:18 ` andreasmeier80 at gmx dot de
@ 2009-03-27 13:12 ` hjl at gcc dot gnu dot org
  2009-03-31 20:06 ` [Bug c++/29727] [4.3 " jsm28 at gcc dot gnu dot org
  2009-04-22 15:23 ` rguenth at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: hjl at gcc dot gnu dot org @ 2009-03-27 13:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from hjl at gcc dot gnu dot org  2009-03-27 13:11 -------
Subject: Bug 29727

Author: hjl
Date: Fri Mar 27 13:11:29 2009
New Revision: 145104

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145104
Log:
gcc/cp/

2009-03-27  Simon Martin  <simartin@users.sourceforge.net>

        PR c++/29727
        * decl.c (check_array_designated_initializer): Handle error_mark_node.

gcc/testsuite/

2009-03-27  Simon Martin  <simartin@users.sourceforge.net>

        PR c++/29727
        * g++.dg/init/error2.C: New test.

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


-- 


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


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

* [Bug c++/29727] [4.3 regression] ICE on invalid initializer for template member
  2006-11-05 20:22 [Bug c++/29727] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member reichelt at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2009-03-27 13:12 ` hjl at gcc dot gnu dot org
@ 2009-03-31 20:06 ` jsm28 at gcc dot gnu dot org
  2009-04-22 15:23 ` rguenth at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-31 20:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from jsm28 at gcc dot gnu dot org  2009-03-31 20:06 -------
Closing 4.2 branch.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.2/4.3 regression] ICE on |[4.3 regression] ICE on
                   |invalid initializer for     |invalid initializer for
                   |template member             |template member
   Target Milestone|4.2.5                       |4.3.4


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


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

* [Bug c++/29727] [4.3 regression] ICE on invalid initializer for template member
  2006-11-05 20:22 [Bug c++/29727] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member reichelt at gcc dot gnu dot org
                   ` (14 preceding siblings ...)
  2009-03-31 20:06 ` [Bug c++/29727] [4.3 " jsm28 at gcc dot gnu dot org
@ 2009-04-22 15:23 ` rguenth at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-22 15:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from rguenth at gcc dot gnu dot org  2009-04-22 15:23 -------
WONTFIX for 4.3.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
      Known to fail|                            |4.3.3
         Resolution|                            |FIXED
   Target Milestone|4.3.4                       |4.4.0


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


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

end of thread, other threads:[~2009-04-22 15:23 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-05 20:22 [Bug c++/29727] New: [4.0/4.1/4.2/4.3 regression] ICE on invalid initializer for template member reichelt at gcc dot gnu dot org
2006-11-05 23:19 ` [Bug c++/29727] " reichelt at gcc dot gnu dot org
2006-11-12 20:36 ` mmitchel at gcc dot gnu dot org
2006-11-26  0:19 ` pinskia at gcc dot gnu dot org
2007-02-03 20:49 ` gdr at gcc dot gnu dot org
2007-02-03 21:03 ` pinskia at gcc dot gnu dot org
2007-02-14  9:27 ` mmitchel at gcc dot gnu dot org
2007-07-23 21:32 ` [Bug c++/29727] [4.2/4.3 " reichelt at gcc dot gnu dot org
2007-09-25 14:54 ` pcarlini at suse dot de
2007-10-09 19:28 ` mmitchel at gcc dot gnu dot org
2008-02-01 16:56 ` jsm28 at gcc dot gnu dot org
2008-05-19 20:26 ` [Bug c++/29727] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
2008-10-05  7:29 ` simartin at gcc dot gnu dot org
2009-03-27  7:18 ` andreasmeier80 at gmx dot de
2009-03-27 13:12 ` hjl at gcc dot gnu dot org
2009-03-31 20:06 ` [Bug c++/29727] [4.3 " jsm28 at gcc dot gnu dot org
2009-04-22 15:23 ` rguenth 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).