https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92231

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Nov  8 18:58:14 2019
New Revision: 277986

URL: https://gcc.gnu.org/viewcvs?rev=277986&root=gcc&view=rev
Log:
        Backported from mainline
        2019-10-31  Jakub Jelinek  <ja...@redhat.com>

        PR middle-end/92231
        * tree.h (fndecl_built_in_p): Use fndecl_built_in_p instead of
        DECL_BUILT_IN in comment.  Remove redundant ()s around return
        argument.
        * tree.c (free_lang_data_in_decl): Check if var is FUNCTION_DECL
        before calling fndecl_built_in_p.
        * gimple-fold.c (gimple_fold_stmt_to_constant_1): Check if
        TREE_OPERAND (fn, 0) is a FUNCTION_DECL before calling
        fndecl_built_in_p on it.

        * lto-lang.c (handle_const_attribute): Don't call fndecl_built_in_p
        on *node that is not FUNCTION_DECL.

        * gcc.c-torture/compile/pr92231.c: New test.

Added:
    branches/gcc-9-branch/gcc/testsuite/gcc.c-torture/compile/pr92231.c
Modified:
    branches/gcc-9-branch/gcc/ChangeLog
    branches/gcc-9-branch/gcc/gimple-fold.c
    branches/gcc-9-branch/gcc/lto/ChangeLog
    branches/gcc-9-branch/gcc/lto/lto-lang.c
    branches/gcc-9-branch/gcc/testsuite/ChangeLog
    branches/gcc-9-branch/gcc/tree.c
    branches/gcc-9-branch/gcc/tree.h

Reply via email to