new file mode 100644
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+/* { dg-additional-options "-Wno-psabi" } */
+
+#define vect8 __attribute__((vector_size(8)))
+
+vect8 int __attribute__((noipa))
+f(int a)
+{
+ int b;
+ vect8 int t={1,1};
+ if(a) return t;
+ return (vect8 int){0, b};
+}
+
+int main ()
+{
+ if (f(0)[0] != 0)
+ __builtin_abort ();
+ return 0;
+}
@@ -762,6 +762,17 @@ likely_value (gimple *stmt)
continue;
if (is_gimple_min_invariant (op))
has_constant_operand = true;
+ else if (TREE_CODE (op) == CONSTRUCTOR)
+ {
+ unsigned j;
+ tree val;
+ FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (op), j, val)
+ if (CONSTANT_CLASS_P (val))
+ {
+ has_constant_operand = true;
+ break;
+ }
+ }
}
if (has_constant_operand)