PR 123745 was fixed by
r16-6742-g939dd2324e0f1c7cac4 but
this adds another testcase which shows the same issue.
Pushed as obvious after testing the testcase on x86_64-linux-gnu.
PR tree-optimization/123745
gcc/testsuite/ChangeLog:
* gcc.dg/torture/pr123745-1.c: New test.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
--- /dev/null
+/* { dg-do compile } */
+/* PR tree-optimization/123745 */
+
+struct b {
+ unsigned long c;
+ unsigned long d;
+};
+void l(struct b *);
+typedef int v4i __attribute__((vector_size(4*sizeof(int))));
+v4i t;
+v4i t1;
+void m(int n) {
+ struct b o;
+ v4i t2 = t;
+ t1 = t2;
+ o.d = 1LU << n;
+ unsigned long g = t2[0];
+ o.c = g << n;
+ l(&o);
+}