This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]