aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-structalias.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-10-28 13:28:32 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2009-10-28 13:28:32 +0000
commit1307c758a3aad3df3e7af66f6ec68b4cb599b054 (patch)
treec6cbdb47b276ee46a1baf832ef5152d54c71249e /gcc/tree-ssa-structalias.c
parentde5b9f12c55af9a6f48a2febe7cf345fe0bd9163 (diff)
downloadgcc-1307c758a3aad3df3e7af66f6ec68b4cb599b054.zip
gcc-1307c758a3aad3df3e7af66f6ec68b4cb599b054.tar.gz
gcc-1307c758a3aad3df3e7af66f6ec68b4cb599b054.tar.bz2
re PR middle-end/41855 (ICE in refs_may_alias_p_1, at tree-ssa-alias.c:855)
2009-10-28 Richard Guenther <rguenther@suse.de> PR middle-end/41855 * tree-ssa-alias.c (refs_may_alias_p_1): Deal with CONST_DECLs (ref_maybe_used_by_call_p_1): Fix bcopy handling. (call_may_clobber_ref_p_1): Likewise. * tree-ssa-structalias.c (find_func_aliases): Likewise. * alias.c (nonoverlapping_memrefs_p): Deal with CONST_DECLs. * gfortran.dg/lto/20091028-1_0.f90: New testcase. * gfortran.dg/lto/20091028-1_1.c: Likewise. * gfortran.dg/lto/20091028-2_0.f90: Likewise. * gfortran.dg/lto/20091028-2_1.c: Likewise. From-SVN: r153655
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r--gcc/tree-ssa-structalias.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 7b33936..74dc6d2 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -3687,8 +3687,10 @@ find_func_aliases (gimple origt)
case BUILT_IN_STRNCAT:
{
tree res = gimple_call_lhs (t);
- tree dest = gimple_call_arg (t, 0);
- tree src = gimple_call_arg (t, 1);
+ tree dest = gimple_call_arg (t, (DECL_FUNCTION_CODE (fndecl)
+ == BUILT_IN_BCOPY ? 1 : 0));
+ tree src = gimple_call_arg (t, (DECL_FUNCTION_CODE (fndecl)
+ == BUILT_IN_BCOPY ? 0 : 1));
if (res != NULL_TREE)
{
get_constraint_for (res, &lhsc);