public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28338]  New: [4.0/4.1/4.2 regression] ICE/rejects-valid with references
@ 2006-07-11  9:39 reichelt at gcc dot gnu dot org
  2006-07-11  9:39 ` [Bug c++/28338] " 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 @ 2006-07-11  9:39 UTC (permalink / raw)
  To: gcc-bugs

The following valid code snippet triggers an ICE since GCC 3.4.0:

=======================================
void foo()
{
  { static const int& i = 0; }
  { static const int& i = 0; }
}
=======================================

bug.cc:4: error: redefinition of 'int _ZGRZ3foovE1i'
bug.cc:3: error: 'int _ZGRZ3foovE1i' previously declared here
bug.cc: In function 'void foo()':
bug.cc:4: internal compiler error: in layout_decl, at stor-layout.c:305
Please submit a full bug report, [etc.]

In addition the error message before the ICE is bogus, since the code
is valid. The error message was introduced in GCC 3.1.


-- 
           Summary: [4.0/4.1/4.2 regression] ICE/rejects-valid with
                    references
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, rejects-valid, 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=28338


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

* [Bug c++/28338] [4.0/4.1/4.2 regression] ICE/rejects-valid with references
  2006-07-11  9:39 [Bug c++/28338] New: [4.0/4.1/4.2 regression] ICE/rejects-valid with references reichelt at gcc dot gnu dot org
@ 2006-07-11  9:39 ` reichelt at gcc dot gnu dot org
  2006-07-11 11:19 ` pinskia 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 @ 2006-07-11  9:39 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=28338


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

* [Bug c++/28338] [4.0/4.1/4.2 regression] ICE/rejects-valid with references
  2006-07-11  9:39 [Bug c++/28338] New: [4.0/4.1/4.2 regression] ICE/rejects-valid with references reichelt at gcc dot gnu dot org
  2006-07-11  9:39 ` [Bug c++/28338] " reichelt at gcc dot gnu dot org
@ 2006-07-11 11:19 ` pinskia at gcc dot gnu dot org
  2006-07-17  3:13 ` mmitchel at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-07-11 11:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-07-11 11:19 -------
>From the look of it, someone forgets to have an unique identifier for the
temporary variables (for references).  Right now it is semi unique but only to
the other functions.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-07-11 11:19:00
               date|                            |


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


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

* [Bug c++/28338] [4.0/4.1/4.2 regression] ICE/rejects-valid with references
  2006-07-11  9:39 [Bug c++/28338] New: [4.0/4.1/4.2 regression] ICE/rejects-valid with references reichelt at gcc dot gnu dot org
  2006-07-11  9:39 ` [Bug c++/28338] " reichelt at gcc dot gnu dot org
  2006-07-11 11:19 ` pinskia at gcc dot gnu dot org
@ 2006-07-17  3:13 ` mmitchel at gcc dot gnu dot org
  2006-07-19 18:00 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-07-17  3:13 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


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

* [Bug c++/28338] [4.0/4.1/4.2 regression] ICE/rejects-valid with references
  2006-07-11  9:39 [Bug c++/28338] New: [4.0/4.1/4.2 regression] ICE/rejects-valid with references reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-07-17  3:13 ` mmitchel at gcc dot gnu dot org
@ 2006-07-19 18:00 ` mmitchel at gcc dot gnu dot org
  2006-07-19 22:49 ` mmitchel at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-07-19 18:00 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/28338] [4.0/4.1/4.2 regression] ICE/rejects-valid with references
  2006-07-11  9:39 [Bug c++/28338] New: [4.0/4.1/4.2 regression] ICE/rejects-valid with references reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-07-19 18:00 ` mmitchel at gcc dot gnu dot org
@ 2006-07-19 22:49 ` mmitchel at gcc dot gnu dot org
  2006-07-19 22:51 ` [Bug c++/28338] [4.0/4.1 " mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-07-19 22:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from mmitchel at gcc dot gnu dot org  2006-07-19 22:49 -------
Subject: Bug 28338

Author: mmitchel
Date: Wed Jul 19 22:49:20 2006
New Revision: 115600

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115600
Log:
        PR c++/28338
        * decl.c (layout_var_decl): Don't call push_local_name here.
        (initialize_artificial_var): Assert artificiality.
        (cp_finish_decl): Call push_local_name here.
        PR c++/28338
        * g++.dg/init/ref13.C: New test.

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


-- 


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


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

* [Bug c++/28338] [4.0/4.1 regression] ICE/rejects-valid with references
  2006-07-11  9:39 [Bug c++/28338] New: [4.0/4.1/4.2 regression] ICE/rejects-valid with references reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-07-19 22:49 ` mmitchel at gcc dot gnu dot org
@ 2006-07-19 22:51 ` mmitchel at gcc dot gnu dot org
  2006-07-20  2:55 ` [Bug c++/28338] [4.0 " mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-07-19 22:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from mmitchel at gcc dot gnu dot org  2006-07-19 22:51 -------
Fixed in 4.2.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.0/4.1/4.2 regression]    |[4.0/4.1 regression]
                   |ICE/rejects-valid with      |ICE/rejects-valid with
                   |references                  |references


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


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

* [Bug c++/28338] [4.0/4.1 regression] ICE/rejects-valid with references
  2006-07-11  9:39 [Bug c++/28338] New: [4.0/4.1/4.2 regression] ICE/rejects-valid with references reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-07-20  2:55 ` [Bug c++/28338] [4.0 " mmitchel at gcc dot gnu dot org
@ 2006-07-20  2:55 ` mmitchel at gcc dot gnu dot org
  2007-02-03 18:00 ` [Bug c++/28338] [4.0 " gdr at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-07-20  2:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from mmitchel at gcc dot gnu dot org  2006-07-20 02:55 -------
Subject: Bug 28338

Author: mmitchel
Date: Thu Jul 20 02:55:24 2006
New Revision: 115606

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115606
Log:
        PR c++/28338
        * decl.c (layout_var_decl): Don't call push_local_name here.
        (initialize_artificial_var): Assert artificiality.
        (cp_finish_decl): Call push_local_name here.
        PR c++/28338
        * g++.dg/init/ref13.C: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/init/ref13.C
Modified:
    branches/gcc-4_1-branch/gcc/cp/ChangeLog
    branches/gcc-4_1-branch/gcc/cp/decl.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/28338] [4.0 regression] ICE/rejects-valid with references
  2006-07-11  9:39 [Bug c++/28338] New: [4.0/4.1/4.2 regression] ICE/rejects-valid with references reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-07-19 22:51 ` [Bug c++/28338] [4.0/4.1 " mmitchel at gcc dot gnu dot org
@ 2006-07-20  2:55 ` mmitchel at gcc dot gnu dot org
  2006-07-20  2:55 ` [Bug c++/28338] [4.0/4.1 " mmitchel at gcc dot gnu dot org
  2007-02-03 18:00 ` [Bug c++/28338] [4.0 " gdr at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-07-20  2:55 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|mark at codesourcery dot com|unassigned at gcc dot gnu
                   |                            |dot org
             Status|ASSIGNED                    |NEW
            Summary|[4.0/4.1 regression]        |[4.0 regression]
                   |ICE/rejects-valid with      |ICE/rejects-valid with
                   |references                  |references


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


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

* [Bug c++/28338] [4.0 regression] ICE/rejects-valid with references
  2006-07-11  9:39 [Bug c++/28338] New: [4.0/4.1/4.2 regression] ICE/rejects-valid with references reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2006-07-20  2:55 ` [Bug c++/28338] [4.0/4.1 " mmitchel at gcc dot gnu dot org
@ 2007-02-03 18:00 ` gdr at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: gdr at gcc dot gnu dot org @ 2007-02-03 18:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from gdr at gcc dot gnu dot org  2007-02-03 18:00 -------
Fixed in GCC-4.1.2.


-- 

gdr at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.0.4                       |4.1.2


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


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

end of thread, other threads:[~2007-02-03 18:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-11  9:39 [Bug c++/28338] New: [4.0/4.1/4.2 regression] ICE/rejects-valid with references reichelt at gcc dot gnu dot org
2006-07-11  9:39 ` [Bug c++/28338] " reichelt at gcc dot gnu dot org
2006-07-11 11:19 ` pinskia at gcc dot gnu dot org
2006-07-17  3:13 ` mmitchel at gcc dot gnu dot org
2006-07-19 18:00 ` mmitchel at gcc dot gnu dot org
2006-07-19 22:49 ` mmitchel at gcc dot gnu dot org
2006-07-19 22:51 ` [Bug c++/28338] [4.0/4.1 " mmitchel at gcc dot gnu dot org
2006-07-20  2:55 ` [Bug c++/28338] [4.0 " mmitchel at gcc dot gnu dot org
2006-07-20  2:55 ` [Bug c++/28338] [4.0/4.1 " mmitchel at gcc dot gnu dot org
2007-02-03 18:00 ` [Bug c++/28338] [4.0 " gdr 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).