This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/15224] New: Attribute mode causes ICE when applied to enums
- From: "rakdver at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Apr 2004 11:05:23 -0000
- Subject: [Bug c/15224] New: Attribute mode causes ICE when applied to enums
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code
typedef enum {a, b} __attribute__((__mode__(__QI__))) x;
causes gcc to crash when checking is enabled:
uuu.c:1: internal compiler error: tree check: expected enumeral_type, have
integer_type in finish_enum, at c-decl.c:5474
When checking is disabled, the signed_char_type_node is rewritten, thus caused
misscompilation.
The above code is actually probably illegal (mode attribute is only documented
for variables, not for types), but gcc should behave more sanely.
--
Summary: Attribute mode causes ICE when applied to enums
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rakdver at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15224