Bug 22269 - [4.1 Regression] ICE in tree-ssa-reassoc with uninitialized variables
Summary: [4.1 Regression] ICE in tree-ssa-reassoc with uninitialized variables
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.1.0
: P2 minor
Target Milestone: 4.1.0
Assignee: Andrew Pinski
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2005-07-01 16:03 UTC by Andrew Pinski
Modified: 2005-07-01 21:58 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-07-01 20:54:17


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2005-07-01 16:03:16 UTC
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);
}
Comment 1 Andrew Pinski 2005-07-01 16:04:15 UTC
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.
Comment 2 Andrew Pinski 2005-07-01 20:54:17 UTC
I think I have a fix, waiting for word from "Daniel Berlin" to double check the intent of the code.
Comment 3 Andrew Pinski 2005-07-01 21:58:10 UTC
Fixed.
Comment 4 GCC Commits 2005-07-01 22:01:31 UTC
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