$ /apa/gnu/Linux-RH-7.2/gcc/gcc-4.0.0/bin/gcc -O3 -march=pentium4 -mfpmath=sse -fomit-frame-pointer -ffast-math -std=c99 -fshort-enums -Wall -Wno-unused BlockRegion.i /home/compwork/monat/Open64-1-7-0-B-Linux/CVSTop-LAO2/LAO_PRO/lao/PFA/BlockRegion.xcc: In function 'BlockRegion_findInvariants': /home/compwork/monat/Open64-1-7-0-B-Linux/CVSTop-LAO2/LAO_PRO/lao/PFA/BlockRegion.xcc:1017: internal compiler error: in c_common_type, at c-typeck.c:531 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Created attachment 9207 [details] Preprocessed input file to reproduce bug
Confirmed, reduced testcase: typedef enum { IssueItemFlag_Discard = 0x1 } IssueItemFlag; void BlockRegion_findInvariants(IssueItemFlag invariant, unsigned char a) { a |= invariant; } Only -fshort-enums is needed to reproduce the bug.
Testing a patch.
Subject: Bug 22311 CVSROOT: /cvs/gcc Module name: gcc Changes by: jsm28@gcc.gnu.org 2005-08-01 01:29:07 Modified files: gcc : ChangeLog c-typeck.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/gcc.dg: pr22311-1.c Log message: PR c/22311 * c-typeck.c (build_binary_op): Use common_type wrapper on shortened types. (common_type): Update comment. testsuite: * gcc.dg/pr22311-1.c : New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9619&r2=2.9620 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&r1=1.472&r2=1.473 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5861&r2=1.5862 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr22311-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
Subject: Bug 22311 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-4_0-branch Changes by: jsm28@gcc.gnu.org 2005-08-01 01:34:14 Modified files: gcc : ChangeLog c-typeck.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/gcc.dg: pr22311-1.c Log message: PR c/22311 * c-typeck.c (build_binary_op): Use common_type wrapper on shortened types. (common_type): Update comment. testsuite: * gcc.dg/pr22311-1.c : New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.343&r2=2.7592.2.344 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.419.2.10&r2=1.419.2.11 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.313&r2=1.5084.2.314 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr22311-1.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
Fixed.