re PR middle-end/69715 (ICE: in store_bit_field_1, at expmed.c:839)

2016-02-09  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69715
	* tree-ssa.c (execute_update_addresses_taken): Mark non-decl
	LHS on calls as non-rewritable.

	* gcc.dg/torture/pr69715.c: New testcase.

From-SVN: r233239
This commit is contained in:
Richard Biener 2016-02-09 08:35:22 +00:00 committed by Richard Biener
parent 2746ac67d6
commit 7e1e8a0ae1
4 changed files with 24 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2016-02-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/69715
* tree-ssa.c (execute_update_addresses_taken): Mark non-decl
LHS on calls as non-rewritable.
2016-02-09 Tom de Vries <tom@codesourcery.com>
PR lto/69707

View File

@ -1,3 +1,8 @@
2016-02-09 Richard Biener <rguenther@suse.de>
PR tree-optimization/69715
* gcc.dg/torture/pr69715.c: New testcase.
2016-02-08 Patrick Palka <ppalka@gcc.gnu.org>
PR c++/69139

View File

@ -0,0 +1,11 @@
/* { dg-do compile } */
struct __attribute__((may_alias)) S { long long low; int high; };
struct S foo (void);
long double
bar (void)
{
long double a;
*(struct S *)&a = foo ();
return a;
}

View File

@ -1436,7 +1436,8 @@ execute_update_addresses_taken (void)
tree lhs = gimple_get_lhs (stmt);
if (lhs
&& TREE_CODE (lhs) != SSA_NAME
&& non_rewritable_lvalue_p (lhs))
&& ((code == GIMPLE_CALL && ! DECL_P (lhs))
|| non_rewritable_lvalue_p (lhs)))
{
decl = get_base_address (lhs);
if (DECL_P (decl))