[Bug c/15224] New: Attribute mode causes ICE when applied to enums

rakdver at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Apr 30 11:52:00 GMT 2004


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



More information about the Gcc-bugs mailing list