public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/36405]  New: [4.3/4.4 regression] ICE with typeid of member function
@ 2008-06-01 10:24 reichelt at gcc dot gnu dot org
  2008-06-01 10:24 ` [Bug c++/36405] " reichelt at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-06-01 10:24 UTC (permalink / raw)
  To: gcc-bugs

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

================================
#include<typeinfo>

struct A
{
  void foo()
  {
    typeid(foo).name();
  }
};
================================

bug.cc: In member function 'void A::foo()':
bug.cc:7: internal compiler error: in write_type, at cp/mangle.c:1695
Please submit a full bug report, [etc.]

Before GCC 4.3.0 the compiler used to generate a valid error message:

bug.cc: In member function 'void A::foo()':
bug.cc:7: error: invalid use of member (did you forget the '&' ?)


-- 
           Summary: [4.3/4.4 regression] ICE with typeid of member function
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: 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=36405


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

* [Bug c++/36405] [4.3/4.4 regression] ICE with typeid of member function
  2008-06-01 10:24 [Bug c++/36405] New: [4.3/4.4 regression] ICE with typeid of member function reichelt at gcc dot gnu dot org
@ 2008-06-01 10:24 ` reichelt at gcc dot gnu dot org
  2008-06-06 15:05 ` rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-06-01 10:24 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.3.1


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


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

* [Bug c++/36405] [4.3/4.4 regression] ICE with typeid of member function
  2008-06-01 10:24 [Bug c++/36405] New: [4.3/4.4 regression] ICE with typeid of member function reichelt at gcc dot gnu dot org
  2008-06-01 10:24 ` [Bug c++/36405] " reichelt at gcc dot gnu dot org
@ 2008-06-06 15:05 ` rguenth at gcc dot gnu dot org
  2008-06-06 20:29 ` rguenth at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-06 15:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2008-06-06 14:59 -------
4.3.1 is being released, adjusting target milestone.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.1                       |4.3.2


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


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

* [Bug c++/36405] [4.3/4.4 regression] ICE with typeid of member function
  2008-06-01 10:24 [Bug c++/36405] New: [4.3/4.4 regression] ICE with typeid of member function reichelt at gcc dot gnu dot org
  2008-06-01 10:24 ` [Bug c++/36405] " reichelt at gcc dot gnu dot org
  2008-06-06 15:05 ` rguenth at gcc dot gnu dot org
@ 2008-06-06 20:29 ` rguenth at gcc dot gnu dot org
  2008-06-11 14:28 ` jakub at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-06 20:29 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

* [Bug c++/36405] [4.3/4.4 regression] ICE with typeid of member function
  2008-06-01 10:24 [Bug c++/36405] New: [4.3/4.4 regression] ICE with typeid of member function reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-06-06 20:29 ` rguenth at gcc dot gnu dot org
@ 2008-06-11 14:28 ` jakub at gcc dot gnu dot org
  2008-06-11 16:59 ` paolo dot carlini at oracle dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-06-11 14:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2008-06-11 14:27 -------
Caused by PR29928.


-- 


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


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

* [Bug c++/36405] [4.3/4.4 regression] ICE with typeid of member function
  2008-06-01 10:24 [Bug c++/36405] New: [4.3/4.4 regression] ICE with typeid of member function reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-06-11 14:28 ` jakub at gcc dot gnu dot org
@ 2008-06-11 16:59 ` paolo dot carlini at oracle dot com
  2008-06-12 10:06 ` jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-06-11 16:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from paolo dot carlini at oracle dot com  2008-06-11 16:58 -------
Ok...


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |paolo dot carlini at oracle
                   |dot org                     |dot com
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-06-11 16:58:45
               date|                            |


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


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

* [Bug c++/36405] [4.3/4.4 regression] ICE with typeid of member function
  2008-06-01 10:24 [Bug c++/36405] New: [4.3/4.4 regression] ICE with typeid of member function reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2008-06-11 16:59 ` paolo dot carlini at oracle dot com
@ 2008-06-12 10:06 ` jakub at gcc dot gnu dot org
  2008-06-12 10:20 ` paolo dot carlini at oracle dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-06-12 10:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2008-06-12 10:05 -------
Created an attachment (id=15754)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15754&action=view)
gcc44-pr36405.patch

I think the right fix is to ensure the type is complete in all cases but
VOID_TYPE.  For ARRAY_TYPEs just make sure the element type is complete.


-- 


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


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

* [Bug c++/36405] [4.3/4.4 regression] ICE with typeid of member function
  2008-06-01 10:24 [Bug c++/36405] New: [4.3/4.4 regression] ICE with typeid of member function reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2008-06-12 10:06 ` jakub at gcc dot gnu dot org
@ 2008-06-12 10:20 ` paolo dot carlini at oracle dot com
  2008-07-31 18:10 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-06-12 10:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from paolo dot carlini at oracle dot com  2008-06-12 10:19 -------
Sure, please go ahead with submitting your patch.


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|paolo dot carlini at oracle |unassigned at gcc dot gnu
                   |dot com                     |dot org
             Status|ASSIGNED                    |NEW


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


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

* [Bug c++/36405] [4.3/4.4 regression] ICE with typeid of member function
  2008-06-01 10:24 [Bug c++/36405] New: [4.3/4.4 regression] ICE with typeid of member function reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2008-06-12 10:20 ` paolo dot carlini at oracle dot com
@ 2008-07-31 18:10 ` jakub at gcc dot gnu dot org
  2008-07-31 19:05 ` jakub at gcc dot gnu dot org
  2008-07-31 20:21 ` jakub at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-07-31 18:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jakub at gcc dot gnu dot org  2008-07-31 18:08 -------
Subject: Bug 36405

Author: jakub
Date: Thu Jul 31 18:07:20 2008
New Revision: 138426

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138426
Log:
        PR c++/36405
        * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
        complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.

        * g++.dg/rtti/typeid8.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/rtti/typeid8.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/rtti.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/36405] [4.3/4.4 regression] ICE with typeid of member function
  2008-06-01 10:24 [Bug c++/36405] New: [4.3/4.4 regression] ICE with typeid of member function reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2008-07-31 18:10 ` jakub at gcc dot gnu dot org
@ 2008-07-31 19:05 ` jakub at gcc dot gnu dot org
  2008-07-31 20:21 ` jakub at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-07-31 19:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jakub at gcc dot gnu dot org  2008-07-31 19:04 -------
Subject: Bug 36405

Author: jakub
Date: Thu Jul 31 19:02:33 2008
New Revision: 138430

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138430
Log:
        PR c++/36405
        * rtti.c (get_tinfo_decl_dynamic, get_typeid): Call
        complete_type_or_else even for UNKNOWN_TYPE to get diagnostics.

        * g++.dg/rtti/typeid8.C: New test.

Added:
    branches/gcc-4_3-branch/gcc/testsuite/g++.dg/rtti/typeid8.C
Modified:
    branches/gcc-4_3-branch/gcc/cp/ChangeLog
    branches/gcc-4_3-branch/gcc/cp/rtti.c
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/36405] [4.3/4.4 regression] ICE with typeid of member function
  2008-06-01 10:24 [Bug c++/36405] New: [4.3/4.4 regression] ICE with typeid of member function reichelt at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2008-07-31 19:05 ` jakub at gcc dot gnu dot org
@ 2008-07-31 20:21 ` jakub at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-07-31 20:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jakub at gcc dot gnu dot org  2008-07-31 20:20 -------
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2008-07-31 20:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-01 10:24 [Bug c++/36405] New: [4.3/4.4 regression] ICE with typeid of member function reichelt at gcc dot gnu dot org
2008-06-01 10:24 ` [Bug c++/36405] " reichelt at gcc dot gnu dot org
2008-06-06 15:05 ` rguenth at gcc dot gnu dot org
2008-06-06 20:29 ` rguenth at gcc dot gnu dot org
2008-06-11 14:28 ` jakub at gcc dot gnu dot org
2008-06-11 16:59 ` paolo dot carlini at oracle dot com
2008-06-12 10:06 ` jakub at gcc dot gnu dot org
2008-06-12 10:20 ` paolo dot carlini at oracle dot com
2008-07-31 18:10 ` jakub at gcc dot gnu dot org
2008-07-31 19:05 ` jakub at gcc dot gnu dot org
2008-07-31 20:21 ` 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).