public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/37553] New: ICE in build_c_cast
@ 2008-09-17 6:26 patrakov at gmail dot com
2008-09-17 21:04 ` [Bug c++/37553] [4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: patrakov at gmail dot com @ 2008-09-17 6:26 UTC (permalink / raw)
To: gcc-bugs
This code triggers an ICE in gcc-4.3.1 on i686 when compiled with g++:
typedef unsigned int ui32;
__extension__ typedef unsigned long long int ui64;
typedef ui32 __attribute__ ((__may_alias__)) ui32a;
typedef ui64 __attribute__ ((__may_alias__)) ui64a;
union u_u32
{
ui32a v;
} __attribute__ ((__may_alias__));
union u_u64
{
ui64a v;
struct
{
union u_u32 lo32, hi32;
} u;
} __attribute__ ((__may_alias__));
void
out_long (ui64 longVal)
{
if ((*(union u_u64 *) &longVal).u.lo32.v < 0x10000000ul)
{
if ((ui32) ((*(union u_u64 *) &longVal).u.lo32.v) < 0x4000u)
{
/* do something useful */
}
}
}
longs3.c: In function 'void out_long(ui64)':
longs3.c:24: internal compiler error: in build_c_cast, at cp/typeck.c:5631
--
Summary: ICE in build_c_cast
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: patrakov at gmail dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37553
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/37553] [4.3/4.4 Regression] ICE in build_c_cast
2008-09-17 6:26 [Bug c++/37553] New: ICE in build_c_cast patrakov at gmail dot com
@ 2008-09-17 21:04 ` pinskia at gcc dot gnu dot org
2008-09-20 14:50 ` rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-17 21:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-09-17 21:02 -------
I get a different internal compiler error:
t.cc:24: internal compiler error: canonical types differ for identical types
ui32 and ui32a
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2008-09-17 21:02:56
date| |
Summary|ICE in build_c_cast |[4.3/4.4 Regression] ICE in
| |build_c_cast
Target Milestone|--- |4.3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37553
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/37553] [4.3/4.4 Regression] ICE in build_c_cast
2008-09-17 6:26 [Bug c++/37553] New: ICE in build_c_cast patrakov at gmail dot com
2008-09-17 21:04 ` [Bug c++/37553] [4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
@ 2008-09-20 14:50 ` rguenth at gcc dot gnu dot org
2008-09-24 4:38 ` doug dot gregor at gmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-09-20 14:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2008-09-20 14:49 -------
ui32 and ui32a are identical (they are identical in middle-end terms), but
ui32 * and ui32a * would not be identical. Sounds weird, but the way
may_alias is designed make it so. A 32bit target is required to trigger
the ICE.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.2.4
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37553
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/37553] [4.3/4.4 Regression] ICE in build_c_cast
2008-09-17 6:26 [Bug c++/37553] New: ICE in build_c_cast patrakov at gmail dot com
2008-09-17 21:04 ` [Bug c++/37553] [4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
2008-09-20 14:50 ` rguenth at gcc dot gnu dot org
@ 2008-09-24 4:38 ` doug dot gregor at gmail dot com
2008-09-24 6:02 ` doug dot gregor at gmail dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: doug dot gregor at gmail dot com @ 2008-09-24 4:38 UTC (permalink / raw)
To: gcc-bugs
--
doug dot gregor at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |doug dot gregor at gmail dot
|dot org |com
Status|NEW |ASSIGNED
Last reconfirmed|2008-09-17 21:02:56 |2008-09-24 04:37:04
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37553
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/37553] [4.3/4.4 Regression] ICE in build_c_cast
2008-09-17 6:26 [Bug c++/37553] New: ICE in build_c_cast patrakov at gmail dot com
` (2 preceding siblings ...)
2008-09-24 4:38 ` doug dot gregor at gmail dot com
@ 2008-09-24 6:02 ` doug dot gregor at gmail dot com
2008-10-14 15:06 ` dgregor at gcc dot gnu dot org
2008-10-14 16:05 ` doug dot gregor at gmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: doug dot gregor at gmail dot com @ 2008-09-24 6:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from doug dot gregor at gmail dot com 2008-09-24 06:01 -------
Patch here: http://gcc.gnu.org/ml/gcc-patches/2008-09/msg01667.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37553
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/37553] [4.3/4.4 Regression] ICE in build_c_cast
2008-09-17 6:26 [Bug c++/37553] New: ICE in build_c_cast patrakov at gmail dot com
` (3 preceding siblings ...)
2008-09-24 6:02 ` doug dot gregor at gmail dot com
@ 2008-10-14 15:06 ` dgregor at gcc dot gnu dot org
2008-10-14 16:05 ` doug dot gregor at gmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2008-10-14 15:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from dgregor at gcc dot gnu dot org 2008-10-14 15:05 -------
Subject: Bug 37553
Author: dgregor
Date: Tue Oct 14 15:03:51 2008
New Revision: 141111
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141111
Log:
2008-10-14 Douglas Gregor <doug.gregor@gmail.com>
PR c++/37553
* tree.c (build_type_attribute_qual_variant): Hash on the
unqualified type, and don't overwrite an existing
(type_hash_eq): Make the TYPE_NAME of the types significant, to
allow distinguishing between wchar_t and its underlying type. This
also means that we'll retain a little more typedef information.
2008-10-14 Douglas Gregor <doug.gregor@gmail.com>
PR c++/37553
* g++.dg/ext/alias-canon2.C: New.
Added:
trunk/gcc/testsuite/g++.dg/ext/alias-canon2.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37553
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/37553] [4.3/4.4 Regression] ICE in build_c_cast
2008-09-17 6:26 [Bug c++/37553] New: ICE in build_c_cast patrakov at gmail dot com
` (4 preceding siblings ...)
2008-10-14 15:06 ` dgregor at gcc dot gnu dot org
@ 2008-10-14 16:05 ` doug dot gregor at gmail dot com
5 siblings, 0 replies; 7+ messages in thread
From: doug dot gregor at gmail dot com @ 2008-10-14 16:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from doug dot gregor at gmail dot com 2008-10-14 16:03 -------
Fixed on mainline
--
doug dot gregor at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|4.3.3 |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37553
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-10-14 16:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-17 6:26 [Bug c++/37553] New: ICE in build_c_cast patrakov at gmail dot com
2008-09-17 21:04 ` [Bug c++/37553] [4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
2008-09-20 14:50 ` rguenth at gcc dot gnu dot org
2008-09-24 4:38 ` doug dot gregor at gmail dot com
2008-09-24 6:02 ` doug dot gregor at gmail dot com
2008-10-14 15:06 ` dgregor at gcc dot gnu dot org
2008-10-14 16:05 ` doug dot gregor at gmail dot com
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).