diff options
author | Marek Polacek <polacek@redhat.com> | 2015-08-18 13:41:27 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2015-08-18 13:41:27 +0000 |
commit | 41dd7cf7479cd0051e4a7baa7e680d7bb02af331 (patch) | |
tree | 0e5342264c77f1513865bd33dd1eb5a9dcb91b25 /gcc/tree-ssa-alias.c | |
parent | ec8a2131b6a1384c71a69eb0ca24b234621437b6 (diff) | |
download | gcc-41dd7cf7479cd0051e4a7baa7e680d7bb02af331.zip gcc-41dd7cf7479cd0051e4a7baa7e680d7bb02af331.tar.gz gcc-41dd7cf7479cd0051e4a7baa7e680d7bb02af331.tar.bz2 |
re PR middle-end/67222 (ICE in gimple_call_arg with bogus posix_memalign)
PR middle-end/67222
* gimple-low.c (lower_stmt): Don't lower BUILT_IN_POSIX_MEMALIGN
if the call isn't valid.
* tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Check builtins using
gimple_call_builtin_p.
(call_may_clobber_ref_p_1): Likewise.
(stmt_kills_ref_p): Likewise.
* gcc.dg/torture/pr67222.c: New test.
From-SVN: r226969
Diffstat (limited to 'gcc/tree-ssa-alias.c')
-rw-r--r-- | gcc/tree-ssa-alias.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index e103220..0445052 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -1535,7 +1535,7 @@ ref_maybe_used_by_call_p_1 (gcall *call, ao_ref *ref) escape points. See tree-ssa-structalias.c:find_func_aliases for the list of builtins we might need to handle here. */ if (callee != NULL_TREE - && DECL_BUILT_IN_CLASS (callee) == BUILT_IN_NORMAL) + && gimple_call_builtin_p (call, BUILT_IN_NORMAL)) switch (DECL_FUNCTION_CODE (callee)) { /* All the following functions read memory pointed to by @@ -1941,7 +1941,7 @@ call_may_clobber_ref_p_1 (gcall *call, ao_ref *ref) escape points. See tree-ssa-structalias.c:find_func_aliases for the list of builtins we might need to handle here. */ if (callee != NULL_TREE - && DECL_BUILT_IN_CLASS (callee) == BUILT_IN_NORMAL) + && gimple_call_builtin_p (call, BUILT_IN_NORMAL)) switch (DECL_FUNCTION_CODE (callee)) { /* All the following functions clobber memory pointed to by @@ -2341,7 +2341,7 @@ stmt_kills_ref_p (gimple stmt, ao_ref *ref) { tree callee = gimple_call_fndecl (stmt); if (callee != NULL_TREE - && DECL_BUILT_IN_CLASS (callee) == BUILT_IN_NORMAL) + && gimple_call_builtin_p (stmt, BUILT_IN_NORMAL)) switch (DECL_FUNCTION_CODE (callee)) { case BUILT_IN_FREE: |