Bug 25357 - [4.0 Regression] ICE in typeid
Summary: [4.0 Regression] ICE in typeid
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.4.5
: P1 normal
Target Milestone: 4.1.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code, monitored
: 26417 27591 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-12-12 04:01 UTC by Mark Loeser
Modified: 2007-02-03 16:08 UTC (History)
7 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work: 4.2.0 4.1.0 4.1.1 4.1.2 2.95.3 4.2.0
Known to fail: 3.3.6 3.4.5 4.0.0 4.0.2
Last reconfirmed: 2006-10-21 21:32:50


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Loeser 2005-12-12 04:01:00 UTC
The following code fails on 3.3.6 and 3.4.5.  It does work on 4.0.2 and 4.1.0, so I'm not sure if a fix would be backported to the 3.4 branch.

#include <typeinfo>

using namespace std;

class A
{
public:
        A ();
        virtual int a() = 0;
};

int main(void)
{
        A *B;

        typeid(typeid(*B)).name();
}
Comment 1 Andrew Pinski 2005-12-12 04:30:28 UTC
Confirmed, only a 3.4 regression.
Comment 2 Volker Reichelt 2005-12-12 22:49:43 UTC
I also get an ICE on the 4.0 branch as of today (and 4.0.0 - 4.0.2):

bug.cc: In function 'int main()':
bug.cc:16: internal compiler error: in create_tmp_var, at gimplify.c:368
Please submit a full bug report, [etc.]
Comment 3 Mark Loeser 2006-01-04 09:23:55 UTC
I'm seeing the same 4.0 regression on mainline as well.
Comment 4 Andrew Pinski 2006-01-04 12:40:11 UTC
(In reply to comment #3)
> I'm seeing the same 4.0 regression on mainline as well.
Are you sure?
I don't see it on "4.2.0 20060103"  unless it happens after that.

Comment 5 Mark Loeser 2006-01-15 08:09:10 UTC
Mainline is fine.  I accidently installed 4.0 over 4.2.
Comment 6 Mark Mitchell 2006-01-15 22:57:45 UTC
ICE on valid; P1.
Comment 7 Andrew Pinski 2006-02-22 14:09:45 UTC
*** Bug 26417 has been marked as a duplicate of this bug. ***
Comment 8 Andrew Pinski 2006-05-13 21:21:11 UTC
*** Bug 27591 has been marked as a duplicate of this bug. ***
Comment 9 Dinar Temirbulatov 2006-07-11 19:59:30 UTC
fix posted here http://gcc.gnu.org/ml/gcc-patches/2006-07/msg00144.html
Comment 10 Gabriel Dos Reis 2007-02-03 16:08:10 UTC
Fixed in GCC-4.1.0 ad higher.