https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98487
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-12 branch has been updated by Marek Polacek <mpola...@gcc.gnu.org>: https://gcc.gnu.org/g:0e345504ec9349d9a3bf826c3e16b7e973739485 commit r12-8993-g0e345504ec9349d9a3bf826c3e16b7e973739485 Author: Marek Polacek <pola...@redhat.com> Date: Fri Dec 16 12:28:43 2022 -0500 c-family: Fix ICE with -Wsuggest-attribute [PR98487] Here we crash because check_function_format was using TREE_PURPOSE directly rather than using get_attribute_name. PR c/98487 gcc/c-family/ChangeLog: * c-format.cc (check_function_format): Use get_attribute_name. gcc/testsuite/ChangeLog: * c-c++-common/Wsuggest-attribute-1.c: New test. (cherry picked from commit 68e51bd0a85794cd437d3e740357dfef84dc560d)