===================================================================
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-gimple" } */
+
+typedef int veci __attribute__ ((vector_size (4 * sizeof (int))));
+
+int c;
+
+void f (veci *a)
+{
+ *a = *a + ++c;
+}
+
+/* { dg-final { scan-tree-dump-times " \\\+ 1" 1 "gimple" } } */
+/* { dg-final { cleanup-tree-dump "gimple" } } */
Property changes on: gcc/testsuite/c-c++-common/vector-scalar-2.c
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision URL
Added: svn:eol-style
+ native
===================================================================
@@ -3966,29 +3966,31 @@ cp_build_binary_op (location_t location,
enum stv_conv convert_flag = scalar_to_vector (location, code, op0, op1,
complain & tf_error);
switch (convert_flag)
{
case stv_error:
return error_mark_node;
case stv_firstarg:
{
op0 = convert (TREE_TYPE (type1), op0);
+ op0 = save_expr (op0);
op0 = build_vector_from_val (type1, op0);
type0 = TREE_TYPE (op0);
code0 = TREE_CODE (type0);
converted = 1;
break;
}
case stv_secondarg:
{
op1 = convert (TREE_TYPE (type0), op1);
+ op1 = save_expr (op1);
op1 = build_vector_from_val (type0, op1);
type1 = TREE_TYPE (op1);
code1 = TREE_CODE (type1);
converted = 1;
break;
}
default:
break;
}
}