Commit 3113e92d by Bill Schmidt Committed by William Schmidt

re PR target/78695 (ICE (segfault) on powerpc64le-linux-gnu)

[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
parent 74edc8a9
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
......@@ -41433,6 +41433,12 @@ find_alignment_op (rtx_insn *insn, rtx base_reg)
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
......
/* { 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++;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment