]> git.ipfire.org Git - thirdparty/gcc.git/commit
c: Fix construction of composite type for atomic pointers [PR121081]
authorMartin Uecker <uecker@tugraz.at>
Thu, 25 Dec 2025 17:27:33 +0000 (18:27 +0100)
committerMartin Uecker <uecker@gcc.gnu.org>
Sat, 3 Jan 2026 10:36:30 +0000 (11:36 +0100)
commit41177976c5e4448365f1966f6594458232db05fc
treeb521c099dc410c032695992adbe77aa2c6600143
parent69b39dfb780e83333d5dd898749089e63e063341
c: Fix construction of composite type for atomic pointers [PR121081]

When constructing the composite type of two atomic pointer types,
we used "qualify_type" which did not copy the "atomic" qualifier.
Use c_build_type_attribute_qual_variant instead.

PR c/121081

gcc/c/ChangeLog:
* c-typeck.cc (composite_type_internal): Properly copy
atomic qualifier.

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