Bug 35319 - [4.3/4.4 regression] ICE throwing fixed-point types
Summary: [4.3/4.4 regression] ICE throwing fixed-point types
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.4.0
: P2 normal
Target Milestone: 4.4.0
Assignee: Jason Merrill
URL:
Keywords: ice-on-invalid-code, monitored
Depends on:
Blocks:
 
Reported: 2008-02-23 18:16 UTC by Volker Reichelt
Modified: 2009-02-19 07:03 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail: 4.3.0
Last reconfirmed: 2008-12-04 19:23:33


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2008-02-23 18:16:23 UTC
The following valid code snippet triggers an ICE on mainline and 4.3 branch
when compiled with -O:

===============
void foo()
{
  throw 0r;
}
===============

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

The code was invalid before GCC 4.3.0 and was simply rejected.
Comment 1 Volker Reichelt 2008-02-23 18:17:35 UTC
The code also ICEs without "-O".
Comment 2 Andrew Pinski 2008-03-30 00:20:30 UTC
This is most likely because there is no way to mangle fixed point types at all.  So really I don't think this should be a P2 or marked as a regression until the ABI has been finialized
Comment 3 Richard Biener 2008-06-06 14:59:02 UTC
4.3.1 is being released, adjusting target milestone.
Comment 4 Joseph S. Myers 2008-08-27 22:03:22 UTC
4.3.2 is released, changing milestones to 4.3.3.
Comment 5 Steven Bosscher 2008-11-22 17:44:35 UTC
Is there a mangling convention now for fixed-point types, or not?
If not, we should make this a sorry() and resolve this bug as SUSPENDED for now.
If there is, well, you know, we should add it ;-)
Comment 6 Jason Merrill 2008-12-10 22:13:06 UTC
Subject: Bug 35319

Author: jason
Date: Wed Dec 10 22:11:44 2008
New Revision: 142661

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142661
Log:
        PR c++/35319
        * mangle.c (write_builtin_type): Add mangling for decimal floating
        point and fixed point types.
        (write_type): Pass FIXED_POINT_TYPE along.
        * cp-demangle.c (cplus_demangle_type): Support fixed-point types.
        (d_print_comp, d_dump): Likewise.

Added:
    trunk/gcc/testsuite/g++.dg/ext/fixed2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/mangle.c
    trunk/gcc/testsuite/ChangeLog
    trunk/include/ChangeLog
    trunk/include/demangle.h
    trunk/libiberty/ChangeLog
    trunk/libiberty/cp-demangle.c

Comment 7 Volker Reichelt 2008-12-18 09:17:29 UTC
Fixed on mainline.
Comment 8 Jason Merrill 2008-12-22 02:33:16 UTC
The fix isn't suitable for 4.3.
Comment 9 Volker Reichelt 2009-02-19 07:03:08 UTC
Fixed-point constants are rejected by the C++ frontend since the patch for PR39059.