diff options
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 6 |
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); |