public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/40373]  New: [4.3/4.4/4.5 Regression] ICE with invalid destructor call
@ 2009-06-07 20:50 reichelt at gcc dot gnu dot org
  2009-06-07 20:50 ` [Bug c++/40373] " 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 @ 2009-06-07 20:50 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet triggers an ICE:

======================================
struct A;
namespace { struct A; }

struct B {};

template<typename T> void foo(T t)
{
  t.~A();
}

void bar()
{
  foo(B());
}
======================================

bug.cc: In function 'void foo(T)':
bug.cc:8:6: error: reference to 'A' is ambiguous
bug.cc:1:8: error: candidates are: struct A
bug.cc:2:20: error:                 struct<unnamed>::A
bug.cc: In function 'void foo(T) [with T = B]':
bug.cc:13:10:   instantiated from here
bug.cc:8:3: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in check_dtor_name, at cp/call.c:247
Please submit a full bug report, [etc.]

The bug affects the trunk, the 4.4 branch, and the 4.3 branch.
The bug was introduced on the 4.3 branch after the release of GCC 4.3.3.


-- 
           Summary: [4.3/4.4/4.5 Regression] ICE with invalid destructor
                    call
           Product: gcc
           Version: 4.5.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=40373


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

* [Bug c++/40373] [4.3/4.4/4.5 Regression] ICE with invalid destructor call
  2009-06-07 20:50 [Bug c++/40373] New: [4.3/4.4/4.5 Regression] ICE with invalid destructor call reichelt at gcc dot gnu dot org
@ 2009-06-07 20:50 ` reichelt at gcc dot gnu dot org
  2009-06-08 14:01 ` hjl dot tools at gmail dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2009-06-07 20:50 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.3.4


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


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

* [Bug c++/40373] [4.3/4.4/4.5 Regression] ICE with invalid destructor call
  2009-06-07 20:50 [Bug c++/40373] New: [4.3/4.4/4.5 Regression] ICE with invalid destructor call reichelt at gcc dot gnu dot org
  2009-06-07 20:50 ` [Bug c++/40373] " reichelt at gcc dot gnu dot org
@ 2009-06-08 14:01 ` hjl dot tools at gmail dot com
  2009-06-08 14:47 ` jakub at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-06-08 14:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from hjl dot tools at gmail dot com  2009-06-08 14:01 -------
It is caused by revision 143502:

http://gcc.gnu.org/ml/gcc-cvs/2009-01/msg00515.html


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at redhat dot com
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-06-08 14:01:21
               date|                            |


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


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

* [Bug c++/40373] [4.3/4.4/4.5 Regression] ICE with invalid destructor call
  2009-06-07 20:50 [Bug c++/40373] New: [4.3/4.4/4.5 Regression] ICE with invalid destructor call reichelt at gcc dot gnu dot org
  2009-06-07 20:50 ` [Bug c++/40373] " reichelt at gcc dot gnu dot org
  2009-06-08 14:01 ` hjl dot tools at gmail dot com
@ 2009-06-08 14:47 ` jakub at gcc dot gnu dot org
  2009-06-08 15:42 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-06-08 14:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2009-06-08 14:47 -------
Created an attachment (id=17967)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17967&action=view)
gcc45-pr40373.patch

Possible fix.


-- 


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


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

* [Bug c++/40373] [4.3/4.4/4.5 Regression] ICE with invalid destructor call
  2009-06-07 20:50 [Bug c++/40373] New: [4.3/4.4/4.5 Regression] ICE with invalid destructor call reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-06-08 14:47 ` jakub at gcc dot gnu dot org
@ 2009-06-08 15:42 ` rguenth at gcc dot gnu dot org
  2009-06-08 16:19 ` jason at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-06-08 15:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2009-06-08 15:42 -------
WONTFIX for 4.3/4.4 branches.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P5
   Target Milestone|4.3.4                       |4.5.0


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


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

* [Bug c++/40373] [4.3/4.4/4.5 Regression] ICE with invalid destructor call
  2009-06-07 20:50 [Bug c++/40373] New: [4.3/4.4/4.5 Regression] ICE with invalid destructor call reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-06-08 15:42 ` rguenth at gcc dot gnu dot org
@ 2009-06-08 16:19 ` jason at gcc dot gnu dot org
  2009-06-08 16:48 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-06-08 16:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jason at gcc dot gnu dot org  2009-06-08 16:19 -------
I think it should be fixed in 4.3/4.4 since the bug wasn't present in 4.3.3 and
the fix is trivial.


-- 


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


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

* [Bug c++/40373] [4.3/4.4/4.5 Regression] ICE with invalid destructor call
  2009-06-07 20:50 [Bug c++/40373] New: [4.3/4.4/4.5 Regression] ICE with invalid destructor call reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2009-06-08 16:19 ` jason at gcc dot gnu dot org
@ 2009-06-08 16:48 ` jakub at gcc dot gnu dot org
  2009-06-08 16:49 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-06-08 16:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2009-06-08 16:48 -------
Subject: Bug 40373

Author: jakub
Date: Mon Jun  8 16:48:11 2009
New Revision: 148282

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=148282
Log:
        PR c++/40373
        * call.c (check_dtor_name): Return false even if
        get_type_value (name) is error_mark_node.

        * g++.dg/template/dtor7.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/template/dtor7.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/call.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/40373] [4.3/4.4/4.5 Regression] ICE with invalid destructor call
  2009-06-07 20:50 [Bug c++/40373] New: [4.3/4.4/4.5 Regression] ICE with invalid destructor call reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2009-06-08 16:48 ` jakub at gcc dot gnu dot org
@ 2009-06-08 16:49 ` jakub at gcc dot gnu dot org
  2009-06-08 17:03 ` jakub at gcc dot gnu dot org
  2009-06-08 17:03 ` jakub at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-06-08 16:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jakub at gcc dot gnu dot org  2009-06-08 16:49 -------
Subject: Bug 40373

Author: jakub
Date: Mon Jun  8 16:49:17 2009
New Revision: 148283

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=148283
Log:
        PR c++/40373
        * call.c (check_dtor_name): Return false even if
        get_type_value (name) is error_mark_node.

        * g++.dg/template/dtor7.C: New test.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/g++.dg/template/dtor7.C
Modified:
    branches/gcc-4_4-branch/gcc/cp/ChangeLog
    branches/gcc-4_4-branch/gcc/cp/call.c
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/40373] [4.3/4.4/4.5 Regression] ICE with invalid destructor call
  2009-06-07 20:50 [Bug c++/40373] New: [4.3/4.4/4.5 Regression] ICE with invalid destructor call reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2009-06-08 17:03 ` jakub at gcc dot gnu dot org
@ 2009-06-08 17:03 ` jakub at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-06-08 17:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jakub at gcc dot gnu dot org  2009-06-08 17:02 -------
Subject: Bug 40373

Author: jakub
Date: Mon Jun  8 17:02:17 2009
New Revision: 148284

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=148284
Log:
        PR c++/40373
        * call.c (check_dtor_name): Return false even if
        get_type_value (name) is error_mark_node.

        * g++.dg/template/dtor7.C: New test.

Added:
    branches/gcc-4_3-branch/gcc/testsuite/g++.dg/template/dtor7.C
Modified:
    branches/gcc-4_3-branch/gcc/cp/ChangeLog
    branches/gcc-4_3-branch/gcc/cp/call.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/40373] [4.3/4.4/4.5 Regression] ICE with invalid destructor call
  2009-06-07 20:50 [Bug c++/40373] New: [4.3/4.4/4.5 Regression] ICE with invalid destructor call reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2009-06-08 16:49 ` jakub at gcc dot gnu dot org
@ 2009-06-08 17:03 ` jakub at gcc dot gnu dot org
  2009-06-08 17:03 ` jakub at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-06-08 17:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jakub at gcc dot gnu dot org  2009-06-08 17:03 -------
Fixed for 4.3/4.4/4.5.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.5.0                       |4.3.4


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


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

end of thread, other threads:[~2009-06-08 17:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-07 20:50 [Bug c++/40373] New: [4.3/4.4/4.5 Regression] ICE with invalid destructor call reichelt at gcc dot gnu dot org
2009-06-07 20:50 ` [Bug c++/40373] " reichelt at gcc dot gnu dot org
2009-06-08 14:01 ` hjl dot tools at gmail dot com
2009-06-08 14:47 ` jakub at gcc dot gnu dot org
2009-06-08 15:42 ` rguenth at gcc dot gnu dot org
2009-06-08 16:19 ` jason at gcc dot gnu dot org
2009-06-08 16:48 ` jakub at gcc dot gnu dot org
2009-06-08 16:49 ` jakub at gcc dot gnu dot org
2009-06-08 17:03 ` jakub at gcc dot gnu dot org
2009-06-08 17:03 ` jakub 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).