public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27820]  New: [4.0/4.1/4.2 regression] ICE with duplicate label
@ 2006-05-30 12:27 reichelt at gcc dot gnu dot org
  2006-05-30 13:51 ` [Bug c++/27820] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-30 12:27 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet causes an ICE since GCC 4.0.0:

=======================
void foo()
{
    L: L: ;
}
=======================

bug.cc: In function 'void foo()':
bug.cc:3: error: duplicate label 'L'
bug.cc:3: internal compiler error: in record_in_finally_tree, at tree-eh.c:211
Please submit a full bug report, [etc.]

Only the C++ frontend is affected.


-- 
           Summary: [4.0/4.1/4.2 regression] ICE with duplicate label
           Product: gcc
           Version: 4.2.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=27820


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

* [Bug c++/27820] [4.0/4.1/4.2 regression] ICE with duplicate label
  2006-05-30 12:27 [Bug c++/27820] New: [4.0/4.1/4.2 regression] ICE with duplicate label reichelt at gcc dot gnu dot org
@ 2006-05-30 13:51 ` pinskia at gcc dot gnu dot org
  2006-05-30 13:51 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-30 13:51 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor


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


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

* [Bug c++/27820] [4.0/4.1/4.2 regression] ICE with duplicate label
  2006-05-30 12:27 [Bug c++/27820] New: [4.0/4.1/4.2 regression] ICE with duplicate label reichelt at gcc dot gnu dot org
  2006-05-30 13:51 ` [Bug c++/27820] " pinskia at gcc dot gnu dot org
@ 2006-05-30 13:51 ` pinskia at gcc dot gnu dot org
  2006-05-31  2:33 ` bangerth at dealii dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-30 13:51 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

* [Bug c++/27820] [4.0/4.1/4.2 regression] ICE with duplicate label
  2006-05-30 12:27 [Bug c++/27820] New: [4.0/4.1/4.2 regression] ICE with duplicate label reichelt at gcc dot gnu dot org
  2006-05-30 13:51 ` [Bug c++/27820] " pinskia at gcc dot gnu dot org
  2006-05-30 13:51 ` pinskia at gcc dot gnu dot org
@ 2006-05-31  2:33 ` bangerth at dealii dot org
  2006-06-02  2:32 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: bangerth at dealii dot org @ 2006-05-31  2:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from bangerth at dealii dot org  2006-05-31 02:32 -------
Confirmed


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-05-31 02:32:56
               date|                            |


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


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

* [Bug c++/27820] [4.0/4.1/4.2 regression] ICE with duplicate label
  2006-05-30 12:27 [Bug c++/27820] New: [4.0/4.1/4.2 regression] ICE with duplicate label reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-05-31  2:33 ` bangerth at dealii dot org
@ 2006-06-02  2:32 ` pinskia at gcc dot gnu dot org
  2006-06-02  2:36 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-02  2:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-06-02 02:32 -------
The C front-end does not add the duplicated label to the IR while the C++
front-end does.


-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

* [Bug c++/27820] [4.0/4.1/4.2 regression] ICE with duplicate label
  2006-05-30 12:27 [Bug c++/27820] New: [4.0/4.1/4.2 regression] ICE with duplicate label reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-06-02  2:32 ` pinskia at gcc dot gnu dot org
@ 2006-06-02  2:36 ` pinskia at gcc dot gnu dot org
  2006-06-04 19:42 ` mmitchel at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-02  2:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-06-02 02:35 -------
  if (DECL_INITIAL (decl) != NULL_TREE)
    error ("duplicate label %qD", decl);
  else

Maybe adding into the if condition:
  POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, error_mark_node);

This might work but I have not tested it at all.


-- 


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


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

* [Bug c++/27820] [4.0/4.1/4.2 regression] ICE with duplicate label
  2006-05-30 12:27 [Bug c++/27820] New: [4.0/4.1/4.2 regression] ICE with duplicate label reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-06-02  2:36 ` pinskia at gcc dot gnu dot org
@ 2006-06-04 19:42 ` mmitchel at gcc dot gnu dot org
  2006-06-30 18:40 ` lmillward at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-04 19:42 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


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

* [Bug c++/27820] [4.0/4.1/4.2 regression] ICE with duplicate label
  2006-05-30 12:27 [Bug c++/27820] New: [4.0/4.1/4.2 regression] ICE with duplicate label reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-06-04 19:42 ` mmitchel at gcc dot gnu dot org
@ 2006-06-30 18:40 ` lmillward at gcc dot gnu dot org
  2006-07-07 17:57 ` lmillward at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: lmillward at gcc dot gnu dot org @ 2006-06-30 18:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from lmillward at gcc dot gnu dot org  2006-06-30 18:37 -------
Propopsed patch: http://gcc.gnu.org/ml/gcc-patches/2006-06/msg01525.html


-- 

lmillward at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |lmillward at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-05-31 02:32:56         |2006-06-30 18:37:24
               date|                            |


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


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

* [Bug c++/27820] [4.0/4.1/4.2 regression] ICE with duplicate label
  2006-05-30 12:27 [Bug c++/27820] New: [4.0/4.1/4.2 regression] ICE with duplicate label reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-06-30 18:40 ` lmillward at gcc dot gnu dot org
@ 2006-07-07 17:57 ` lmillward at gcc dot gnu dot org
  2006-07-07 17:59 ` [Bug c++/27820] [4.0/4.1 " lmillward at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: lmillward at gcc dot gnu dot org @ 2006-07-07 17:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from lmillward at gcc dot gnu dot org  2006-07-07 17:57 -------
Subject: Bug 27820

Author: lmillward
Date: Fri Jul  7 17:57:12 2006
New Revision: 115265

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115265
Log:
        PR c++/27820
        * decl.c (define_label): Return error_mark_node on error.
        * semantics.c (finish_label_stmt): Don't call
        add_stmt for invalid labels.

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


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


-- 


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


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

* [Bug c++/27820] [4.0/4.1 regression] ICE with duplicate label
  2006-05-30 12:27 [Bug c++/27820] New: [4.0/4.1/4.2 regression] ICE with duplicate label reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2006-07-07 17:57 ` lmillward at gcc dot gnu dot org
@ 2006-07-07 17:59 ` lmillward at gcc dot gnu dot org
  2006-07-08 16:39 ` lmillward at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: lmillward at gcc dot gnu dot org @ 2006-07-07 17:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from lmillward at gcc dot gnu dot org  2006-07-07 17:59 -------
Fixed on mainline. Will apply to release branches once testing completes.


-- 

lmillward at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.0/4.1/4.2 regression] ICE|[4.0/4.1 regression] ICE
                   |with duplicate label        |with duplicate label


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


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

* [Bug c++/27820] [4.0/4.1 regression] ICE with duplicate label
  2006-05-30 12:27 [Bug c++/27820] New: [4.0/4.1/4.2 regression] ICE with duplicate label reichelt at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2006-07-07 17:59 ` [Bug c++/27820] [4.0/4.1 " lmillward at gcc dot gnu dot org
@ 2006-07-08 16:39 ` lmillward at gcc dot gnu dot org
  2006-07-08 16:45 ` lmillward at gcc dot gnu dot org
  2006-07-08 16:46 ` lmillward at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: lmillward at gcc dot gnu dot org @ 2006-07-08 16:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from lmillward at gcc dot gnu dot org  2006-07-08 16:39 -------
Subject: Bug 27820

Author: lmillward
Date: Sat Jul  8 16:39:20 2006
New Revision: 115283

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115283
Log:
        PR c++/27820
        * decl.c (define_label): Return error_mark_node on error.
        * semantics.c (finish_label_stmt): Don't call
        add_stmt for invalid labels.

        PR c++/27820
        * g++.dg/other/label1.C: New test.


Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/other/label1.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/cp/semantics.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/27820] [4.0/4.1 regression] ICE with duplicate label
  2006-05-30 12:27 [Bug c++/27820] New: [4.0/4.1/4.2 regression] ICE with duplicate label reichelt at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2006-07-08 16:39 ` lmillward at gcc dot gnu dot org
@ 2006-07-08 16:45 ` lmillward at gcc dot gnu dot org
  2006-07-08 16:46 ` lmillward at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: lmillward at gcc dot gnu dot org @ 2006-07-08 16:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from lmillward at gcc dot gnu dot org  2006-07-08 16:45 -------
Subject: Bug 27820

Author: lmillward
Date: Sat Jul  8 16:45:09 2006
New Revision: 115284

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115284
Log:
        PR c++/27820
        * decl.c (define_label): Return error_mark_node on error.
        * semantics.c (finish_label_stmt): Don't call
        add_stmt for invalid labels.

        PR c++/27820
        * g++.dg/other/label1.C: New test.


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


-- 


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


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

* [Bug c++/27820] [4.0/4.1 regression] ICE with duplicate label
  2006-05-30 12:27 [Bug c++/27820] New: [4.0/4.1/4.2 regression] ICE with duplicate label reichelt at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2006-07-08 16:45 ` lmillward at gcc dot gnu dot org
@ 2006-07-08 16:46 ` lmillward at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: lmillward at gcc dot gnu dot org @ 2006-07-08 16:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from lmillward at gcc dot gnu dot org  2006-07-08 16:46 -------
Fixed in 4.1.2 and 4.0.4.


-- 

lmillward at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2006-07-08 16:46 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-30 12:27 [Bug c++/27820] New: [4.0/4.1/4.2 regression] ICE with duplicate label reichelt at gcc dot gnu dot org
2006-05-30 13:51 ` [Bug c++/27820] " pinskia at gcc dot gnu dot org
2006-05-30 13:51 ` pinskia at gcc dot gnu dot org
2006-05-31  2:33 ` bangerth at dealii dot org
2006-06-02  2:32 ` pinskia at gcc dot gnu dot org
2006-06-02  2:36 ` pinskia at gcc dot gnu dot org
2006-06-04 19:42 ` mmitchel at gcc dot gnu dot org
2006-06-30 18:40 ` lmillward at gcc dot gnu dot org
2006-07-07 17:57 ` lmillward at gcc dot gnu dot org
2006-07-07 17:59 ` [Bug c++/27820] [4.0/4.1 " lmillward at gcc dot gnu dot org
2006-07-08 16:39 ` lmillward at gcc dot gnu dot org
2006-07-08 16:45 ` lmillward at gcc dot gnu dot org
2006-07-08 16:46 ` lmillward 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).