This is reduced from PR 22266. int printf(const char*, ...); int main(int argv, char*argc) { int d1; int d2; int s1, s2; int b; ((d1)&=(int)0x0000ffffL, (d1)|=((int)(short)(0x344))<<16); ((d1)&=(int)0xffff0000UL, (d1)|=(int)(unsigned short)(0x4567)); ((d2)&=(int)0x0000ffffL, (d2)|=((int)(short)(0))<<16); ((d2)&=(int)0xffff0000UL, (d2)|=(int)(unsigned short)(0x3b9a)); printf(" dividend >>: %ld\n", d1); printf(" divisor >>: %ld\n", d2); }
The ICE is: t2.c: In function ‘main’: t2.c:2: internal compiler error: tree check: expected ssa_name, have integer_cst in should_transpose, at tree-ssa-reassoc.c:411 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions.
I think I have a fix, waiting for word from "Daniel Berlin" to double check the intent of the code.
Fixed.
Subject: Bug 22269 CVSROOT: /cvs/gcc Module name: gcc Changes by: pinskia@gcc.gnu.org 2005-07-01 22:01:17 Modified files: gcc : ChangeLog tree-ssa-reassoc.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/gcc.c-torture/compile: pr22269.c Log message: 2005-07-01 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/22269 * tree-ssa-reassoc.c (should_transpose): Fix which operand we check for SSA_NAME for. 2005-07-01 Andrew Pinski <pinskia@physics.uc.edu> PR tree-opt/22269 * gcc.c-torture/compile/pr22269.c: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9310&r2=2.9311 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-reassoc.c.diff?cvsroot=gcc&r1=2.3&r2=2.4 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5712&r2=1.5713 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/pr22269.c.diff?cvsroot=gcc&r1=NONE&r2=1.1