[Bug c++/124307] [16 Regression] ICE: tree check: expected tree_list, have error_mark in get_attribute_name, at attribs.cc:1062
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 16 22:07:32 GMT 2026
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124307
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:
https://gcc.gnu.org/g:57ccf065094f74d8c87d8a4cdc495d4195d70d65
commit r16-8119-g57ccf065094f74d8c87d8a4cdc495d4195d70d65
Author: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
Date: Sat Mar 14 23:36:56 2026 -0700
c++: Fix ICE with error mark for an attribute [PR124307]
After r16-6808-g4b0e94b394fa38, we started to ICE when the
std_attrs was error_mark_node. This fixes the problem by
checking if it was an error_mark_node before looking for
annotations.
Bootstrapped and tested on x86_64-linux-gnu with no regressions.
Changes since v1:
* v2: Move the check for error mark earlier.
* v3: small formating changes.
PR c++/124307
gcc/cp/ChangeLog:
* parser.cc (cp_parser_base_specifier): Check for
error mark like checking for non-nullness on the
attribute.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/alignas24.C: New test.
Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
More information about the Gcc-bugs
mailing list