]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR tree-optimization/22269 (ICE in tree-ssa-reassoc with uninitialized variables)
authorAndrew Pinski <pinskia@physics.uc.edu>
Fri, 1 Jul 2005 22:01:17 +0000 (22:01 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Fri, 1 Jul 2005 22:01:17 +0000 (15:01 -0700)
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.

From-SVN: r101519

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr22269.c [new file with mode: 0644]
gcc/tree-ssa-reassoc.c

index 70be419535677b6749d5eba1b85c264a8fdaf600..8236a2fd3505ce790fab0cd69400649ee1ceb0f8 100644 (file)
@@ -1,3 +1,9 @@
+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-06-29  Daniel Berlin  <dberlin@dberlin.org>
 
        Fix PR tree-optimization/22071
index 47001d30381168199a21824cd35a6d6587c8a718..32ef7e1e2134340d73b7ada9505bfaab3e9fdbb4 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-01  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR tree-opt/22269
+       * gcc.c-torture/compile/pr22269.c: New test.
+
 2005-06-30  Diego Novillo  <dnovillo@redhat.com>
 
        PR 21584
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr22269.c b/gcc/testsuite/gcc.c-torture/compile/pr22269.c
new file mode 100644 (file)
index 0000000..bfcf209
--- /dev/null
@@ -0,0 +1,16 @@
+/* We used to ICE in tree-ssa-reassoc because we did look at the correct operand to
+   see if it was a SSA_NAME.  */
+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);
+}
index 5f0e8fc6187a132e97590ee4cc952040201e99d3..395c5495455505ffff62834614853f74e99f9ef8 100644 (file)
@@ -406,7 +406,7 @@ should_transpose (tree rhs ATTRIBUTE_UNUSED,
 
   /* Also, see if the LHS's high ranked op should be switched with our
      RHS simply because it is greater in rank than our current RHS.  */
-  if (TREE_CODE (TREE_OPERAND (lhsdefop, 0)) == SSA_NAME)
+  if (TREE_CODE (TREE_OPERAND (lhsdefop, highrankop)) == SSA_NAME)
     {
       tree iop = SSA_NAME_DEF_STMT (TREE_OPERAND (lhsdefop, highrankop));
       if (TREE_CODE (iop) == MODIFY_EXPR)