OSDN Git Service

2008-01-21 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Jan 2008 16:21:45 +0000 (16:21 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Jan 2008 16:21:45 +0000 (16:21 +0000)
PR middle-end/34856
* tree-cfg.c (verify_expr): Allow all invariant expressions
instead of just constant class ones as reference argument.
* tree-ssa-loop-im.c (for_each_index): Handle CONSTRUCTOR
like any other constant.
* tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.

* gcc.c-torture/compile/pr34856.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131696 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr34856.c [new file with mode: 0644]
gcc/tree-cfg.c
gcc/tree-ssa-loop-im.c
gcc/tree-ssa-sccvn.c

index 4263dab..2786579 100644 (file)
@@ -1,3 +1,12 @@
+2008-01-21  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/34856
+       * tree-cfg.c (verify_expr): Allow all invariant expressions
+       instead of just constant class ones as reference argument.
+       * tree-ssa-loop-im.c (for_each_index): Handle CONSTRUCTOR
+       like any other constant.
+       * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.
+
 2008-01-21  H.J. Lu  <hongjiu.lu@intel.com>
 
        * regmove.c (fixup_match_1): Update call crossed frequencies.
index 42a24a9..8d8bc99 100644 (file)
@@ -1,5 +1,10 @@
 2008-01-21  Richard Guenther  <rguenther@suse.de>
 
+       PR middle-end/34856
+       * gcc.c-torture/compile/pr34856.c: New testcase.
+
+2008-01-21  Richard Guenther  <rguenther@suse.de>
+
        PR c/34885
        * gcc.c-torture/compile/pr34885.c: New testcase.
 
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr34856.c b/gcc/testsuite/gcc.c-torture/compile/pr34856.c
new file mode 100644 (file)
index 0000000..a2f4369
--- /dev/null
@@ -0,0 +1,17 @@
+#undef __vector
+#define __vector __attribute__((vector_size(16) ))
+typedef __vector signed char qword;
+typedef __vector unsigned int VU32;
+extern short g[192 +16];
+void f(qword);
+void f1 (unsigned ctr)
+{
+  VU32 pin;
+  pin = (VU32){(__SIZE_TYPE__)&g[16]};
+  do {
+   f((qword)pin);
+   ctr--;
+  }
+while(ctr);
+}
+
index c702502..ffb4983 100644 (file)
@@ -3304,7 +3304,7 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
          t = TREE_OPERAND (t, 0);
        }
 
-      if (!CONSTANT_CLASS_P (t) && !is_gimple_lvalue (t))
+      if (!is_gimple_min_invariant (t) && !is_gimple_lvalue (t))
        {
          error ("invalid reference prefix");
          return t;
index 83ad70c..262ad97 100644 (file)
@@ -205,6 +205,7 @@ for_each_index (tree *addr_p, bool (*cbck) (tree, tree *, void *), void *data)
        case INTEGER_CST:
        case REAL_CST:
        case FIXED_CST:
+       case CONSTRUCTOR:
          return true;
 
        case TARGET_MEM_REF:
index d7b8c8a..8380ebb 100644 (file)
@@ -552,6 +552,7 @@ copy_reference_ops_from_ref (tree ref, VEC(vn_reference_op_s, heap) **result)
        case COMPLEX_CST:
        case VECTOR_CST:
        case REAL_CST:
+       case CONSTRUCTOR:
        case VALUE_HANDLE:
        case VAR_DECL:
        case PARM_DECL: