diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-11-07 14:33:37 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-11-07 14:33:37 +0100 |
commit | dca167984aeca670ff2c7ad7eebc8a66256b086f (patch) | |
tree | 04db102b5a6c0fb6e79c7b477f6333ed80abc756 | |
parent | a98152285e49156026d0b70bacfe562a6f9d3ac2 (diff) | |
download | gcc-dca167984aeca670ff2c7ad7eebc8a66256b086f.zip gcc-dca167984aeca670ff2c7ad7eebc8a66256b086f.tar.gz gcc-dca167984aeca670ff2c7ad7eebc8a66256b086f.tar.bz2 |
re PR target/77834 (ICE: in make_decl_rtl, at varasm.c:1311 with -O -ftree-pre -mstringop-strategy=libcall)
PR target/77834
* alias.c (nonoverlapping_memrefs_p): If one decl is
FUNCTION_DECL or LABEL_DECL and the other is not, return 1.
From-SVN: r241905
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/alias.c | 10 |
2 files changed, 15 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9714a07..34e88da 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-11-07 Jakub Jelinek <jakub@redhat.com> + + PR target/77834 + * alias.c (nonoverlapping_memrefs_p): If one decl is + FUNCTION_DECL or LABEL_DECL and the other is not, return 1. + 2016-11-07 Richard Biener <rguenther@suse.de> PR target/78229 diff --git a/gcc/alias.c b/gcc/alias.c index fd3dec4..1ea2417 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -2755,6 +2755,14 @@ nonoverlapping_memrefs_p (const_rtx x, const_rtx y, bool loop_invariant) || TREE_CODE (expry) == CONST_DECL) return 1; + /* If one decl is known to be a function or label in a function and + the other is some kind of data, they can't overlap. */ + if ((TREE_CODE (exprx) == FUNCTION_DECL + || TREE_CODE (exprx) == LABEL_DECL) + != (TREE_CODE (expry) == FUNCTION_DECL + || TREE_CODE (expry) == LABEL_DECL)) + return 1; + /* If either of the decls doesn't have DECL_RTL set (e.g. marked as living in multiple places), we can't tell anything. Exception are FUNCTION_DECLs for which we can create DECL_RTL on demand. */ @@ -2804,7 +2812,7 @@ nonoverlapping_memrefs_p (const_rtx x, const_rtx y, bool loop_invariant) /* Offset based disambiguation not appropriate for loop invariant */ if (loop_invariant) - return 0; + return 0; /* Offset based disambiguation is OK even if we do not know that the declarations are necessarily different |