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

--- Comment #2 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Kael Andrew Franco <[email protected]>:

https://gcc.gnu.org/g:c9889f295676378d4c341674d94f9c8056ba3202

commit r17-5600-gc9889f295676378d4c341674d94f9c8056ba3202
Author: Kael Andrew Alonzo Franco <[email protected]>
Date:   Mon Oct 26 18:45:20 2026 -0400

    c: Fix ICE on __builtin_has_attribute (var, pure). [PR128120]

    DECL_PURE_P only accepts FUNCTION_DECL, and testcase
    ICE due to DECL_P (expr) passing by VAR_DECL when
    it should be TREE_CODE (expr) == FUNCTION_DECL.

    Bootstrapped and regtested on x86_64-pc-linux-gnu.

            PR c/128120

    gcc/c-family/ChangeLog:

            * c-attribs.cc (has_attribute): Fix ICE on
            __builtin_has_attribute (var, pure).

    gcc/testsuite/ChangeLog:

            * gcc.dg/pr128120.c: New test.

    Signed-off-by: Kael Andrew Franco <[email protected]>

Reply via email to