[gcc]
2016-12-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/78695
* config/rs6000/rs6000.c (find_alignment_op): Discard from
consideration any artificial definition.
[gcc/testsuite]
2016-12-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR target/78695
* gcc.target/powerpc/swaps-stack-protector.c: New test.
From-SVN: r243534
+2016-12-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR target/78695
+ * config/rs6000/rs6000.c (find_alignment_op): Discard from
+ consideration any artificial definition.
+
2016-12-11 Iain Sandoe <iain@codesourcery.com>
* configure.ac (CROSS directory tests): Remove the assumption that
if (!base_def_link || base_def_link->next)
break;
+ /* With stack-protector code enabled, and possibly in other
+ circumstances, there may not be an associated insn for
+ the def. */
+ if (DF_REF_IS_ARTIFICIAL (base_def_link->ref))
+ break;
+
rtx_insn *and_insn = DF_REF_INSN (base_def_link->ref);
and_operation = alignment_mask (and_insn);
if (and_operation != 0)
+2016-12-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR target/78695
+ * gcc.target/powerpc/swaps-stack-protector.c: New test.
+
2016-12-11 Uros Bizjak <ubizjak@gmail.com>
PR target/70799
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-fstack-protector -O3" } */
+
+/* PR78695: This code used to ICE in rs6000.c:find_alignment_op because
+ the stack protector address definition isn't associated with an insn. */
+
+void *a();
+long b() {
+ char c[1];
+ char *d = a(), *e = c;
+ long f = e ? b(e) : 0;
+ if (f > 54)
+ f = 1;
+ while (f--)
+ *d++ = *e++;
+}