re PR tree-optimization/71872 (ICE in inchash::add_expr, at tree.c:7782 - OEP_ADDRESS_OF asserted for ADDR_EXPR applied to constant)
PR tree-optimization/71872 * tree-data-ref.c (get_references_in_stmt): Ignore references with is_gimple_constant get_base_address. * gcc.c-torture/compile/pr71872.c: New test. From-SVN: r238351
This commit is contained in:
parent
d62b809c11
commit
a241f8ca21
4 changed files with 28 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2016-07-14 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/71872
|
||||
* tree-data-ref.c (get_references_in_stmt): Ignore references
|
||||
with is_gimple_constant get_base_address.
|
||||
|
||||
2016-07-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
|
||||
|
||||
* config/arm/arm.h (TARGET_HAVE_LDACQ): Enable for ARMv8-M Mainline.
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2016-07-14 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/71872
|
||||
* gcc.c-torture/compile/pr71872.c: New test.
|
||||
|
||||
2016-07-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
|
||||
|
||||
* gcc.target/arm/atomic-comp-swap-release-acquire.c: Rename into ...
|
||||
|
|
15
gcc/testsuite/gcc.c-torture/compile/pr71872.c
Normal file
15
gcc/testsuite/gcc.c-torture/compile/pr71872.c
Normal file
|
@ -0,0 +1,15 @@
|
|||
/* PR tree-optimization/71872 */
|
||||
|
||||
struct __attribute__((may_alias)) S { int a; };
|
||||
|
||||
void
|
||||
foo (int *x, struct S *y)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
int a = 0;
|
||||
if (*x)
|
||||
*(struct S *) y = *(struct S *) &a;
|
||||
}
|
||||
}
|
|
@ -3868,7 +3868,8 @@ get_references_in_stmt (gimple *stmt, vec<data_ref_loc, va_heap> *references)
|
|||
if (DECL_P (op1)
|
||||
|| (REFERENCE_CLASS_P (op1)
|
||||
&& (base = get_base_address (op1))
|
||||
&& TREE_CODE (base) != SSA_NAME))
|
||||
&& TREE_CODE (base) != SSA_NAME
|
||||
&& !is_gimple_min_invariant (base)))
|
||||
{
|
||||
ref.ref = op1;
|
||||
ref.is_read = true;
|
||||
|
|
Loading…
Add table
Reference in a new issue