[PATCH] Fix PR49642 in 4.6, questions about 4.7
Jakub Jelinek
jakub@redhat.com
Wed Jan 11 12:12:00 GMT 2012
On Wed, Jan 11, 2012 at 10:57:28AM +0100, Richard Guenther wrote:
> > + Â tree fndecl;
> > +
> > + Â if (!is_gimple_call (stmt))
> > + Â Â return;
> > +
> > + Â fndecl = gimple_call_fndecl (stmt);
> > +
> > + Â if (fndecl
> > + Â Â Â && TREE_CODE (fndecl) == FUNCTION_DECL
>
> Not needed.
>
> > + Â Â Â && DECL_BUILT_IN (fndecl)
>
> DECL_BUILT_IN_CLASS (fndecl) == BUILT_IN_NORMAL
>
> > + Â Â Â /* At the moment, __builtin_constant_p is the only forbidden
> > + Â Â Â Â predicate function call (see PR49642). Â */
> > + Â Â Â && DECL_FUNCTION_CODE (fndecl) == BUILT_IN_CONSTANT_P)
Or better yet
if (!gimple_call_builtin_p (stmt, BUILT_IN_CONSTANT_P))
return;
instead of all the above.
Jakub
More information about the Gcc-patches
mailing list