diff options
author | Richard Biener <rguenther@suse.de> | 2013-01-07 15:34:43 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2013-01-07 15:34:43 +0000 |
commit | 3626621a07bd682cb31ea832d2034776dde4e780 (patch) | |
tree | 4175c00ea44d892ce1035c8ff1cbaf29665e98fe /gcc/tree-ssa-structalias.c | |
parent | 8b2ea410c7d5ccc14b94447d449abdc0b4d547ac (diff) | |
download | gcc-3626621a07bd682cb31ea832d2034776dde4e780.zip gcc-3626621a07bd682cb31ea832d2034776dde4e780.tar.gz gcc-3626621a07bd682cb31ea832d2034776dde4e780.tar.bz2 |
re PR tree-optimization/55890 (calling a builtin func through a cast triggers an ICE)
2013-01-07 Richard Biener <rguenther@suse.de>
PR middle-end/55890
* gimple.h (gimple_call_builtin_p): New overload.
* gimple.c (validate_call): New function.
(gimple_call_builtin_p): Likewise.
* tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
Use gimple_call_builtin_p.
(find_func_clobbers): Likewise.
* tree-ssa-strlen.c (adjust_last_stmt): Likewise.
(strlen_optimize_stmt): Likewise.
* gcc.dg/torture/pr55890-1.c: New testcase.
* gcc.dg/torture/pr55890-2.c: Likewise.
From-SVN: r194975
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 4c3cb32..8eb8544 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -4014,8 +4014,7 @@ find_func_aliases_for_builtin_call (gimple t) vec<ce_s> rhsc = vNULL; varinfo_t fi; - if (fndecl != NULL_TREE - && DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL) + if (gimple_call_builtin_p (t, BUILT_IN_NORMAL)) /* ??? All builtins that are handled here need to be handled in the alias-oracle query functions explicitly! */ switch (DECL_FUNCTION_CODE (fndecl)) @@ -4768,8 +4767,7 @@ find_func_clobbers (gimple origt) /* For builtins we do not have separate function info. For those we do not generate escapes for we have to generate clobbers/uses. */ - if (decl - && DECL_BUILT_IN_CLASS (decl) == BUILT_IN_NORMAL) + if (gimple_call_builtin_p (t, BUILT_IN_NORMAL)) switch (DECL_FUNCTION_CODE (decl)) { /* The following functions use and clobber memory pointed to |