diff options
author | Richard Guenther <rguenther@suse.de> | 2011-02-02 09:59:23 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-02-02 09:59:23 +0000 |
commit | 5cbf5c20cf75fd44392400db11f3838aec114443 (patch) | |
tree | a4e3d45c5608a38ef7f2fedac53599b90299e9f4 /gcc/builtins.c | |
parent | aa8374708a2e5e47266b7e65f710506d237a38db (diff) | |
download | gcc-5cbf5c20cf75fd44392400db11f3838aec114443.zip gcc-5cbf5c20cf75fd44392400db11f3838aec114443.tar.gz gcc-5cbf5c20cf75fd44392400db11f3838aec114443.tar.bz2 |
re PR middle-end/47566 (ICE in vn_reference_lookup)
2011-02-02 Richard Guenther <rguenther@suse.de>
PR tree-optimization/47566
* builtins.c (builtin_save_expr): No SAVE_EXPR for SSA_NAMEs.
* gcc.dg/lto/20110201-1_0.c: New testcase.
From-SVN: r169518
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 5b7b673..106b2ca 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -652,9 +652,10 @@ target_char_cast (tree cst, char *p) static tree builtin_save_expr (tree exp) { - if (TREE_ADDRESSABLE (exp) == 0 - && (TREE_CODE (exp) == PARM_DECL - || (TREE_CODE (exp) == VAR_DECL && !TREE_STATIC (exp)))) + if (TREE_CODE (exp) == SSA_NAME + || (TREE_ADDRESSABLE (exp) == 0 + && (TREE_CODE (exp) == PARM_DECL + || (TREE_CODE (exp) == VAR_DECL && !TREE_STATIC (exp))))) return exp; return save_expr (exp); |