]> git.ipfire.org Git - thirdparty/gcc.git/commit
c: fix ICE related to tagged types with attributes in diagnostics [PR120380]
authorMartin Uecker <uecker@tugraz.at>
Thu, 29 May 2025 15:17:12 +0000 (17:17 +0200)
committerMartin Uecker <uecker@gcc.gnu.org>
Sun, 1 Jun 2025 07:49:15 +0000 (09:49 +0200)
commitb2c8d3064764f1f4bfd41d8791d06f2206b42780
tree8d44613acde22f10e4bb9ba31f824c58d58845d6
parenta0364f41a8a5c9f785da8681c78d22c430ac4d70
c: fix ICE related to tagged types with attributes in diagnostics [PR120380]

get_aka_type will create a new type for diagnostics, but for tagged types
attributes will then be ignored with a warning.  This can lead to reentering
warning code which leads to an ICE.  Fix this by ignoring the attributes
for tagged types.

PR c/120380

gcc/c/ChangeLog:
* c-objc-common.cc (get_aka_type): Ignore attributes for tagged types.

gcc/testsuite/ChangeLog:
* gcc.dg/pr120380.c: New test.
gcc/c/c-objc-common.cc
gcc/testsuite/gcc.dg/pr120380.c [new file with mode: 0644]