2018-11-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/79351
* tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
empty CONSTRUCTORs ensure the store is at a constant position.
* gcc.dg/torture/pr79351.c: New testcase.
From-SVN: r266556
+2018-11-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/79351
+ * tree-ssa-sccvn.c (vn_reference_lookup_3): For assignments from
+ empty CONSTRUCTORs ensure the store is at a constant position.
+
2018-11-26 Iain Sandoe <iain@sandoe.co.uk>
Backport from mainline
+2018-11-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/79351
+ * gcc.dg/torture/pr79351.c: New testcase.
+
2018-11-26 Andreas Krebbel <krebbel@linux.ibm.com>
Backport from mainline
--- /dev/null
+/* { dg-do run } */
+
+static struct state {
+ int k;
+ int dummy;
+} states[256];
+
+__attribute((noinline))
+static void
+ismatch(int n)
+{
+ for (int j=0; j<n; j++) {
+ states[j] = (struct state){0};
+ for (int i = 0; i <= j; i++) {
+ states[i].k++;
+ }
+ }
+}
+
+int
+main()
+{
+ ismatch(2);
+ if (states[0].k != 2)
+ __builtin_abort();
+}
base2 = get_ref_base_and_extent (gimple_assign_lhs (def_stmt),
&offset2, &size2, &maxsize2, &reverse);
if (maxsize2 != -1
+ && maxsize2 == size2
&& operand_equal_p (base, base2, 0)
&& offset2 <= offset
&& offset2 + size2 >= offset + maxsize)