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

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

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

commit r16-6750-ge2acc3d38e800f8dd1f45f5ae6bf2ee090044bcf
Author: Martin Uecker <[email protected]>
Date:   Tue Jan 13 19:09:53 2026 +0100

    c: fix checking ICE related to transparent unions and atomic [PR123309]

    When matching function arguments in composite_type_internal and one
    type comes from a transparent union, it is possible to end up with
    atomic and non-atomic types because this case is not handled correctly.
    The type matching logic is rewritten in a cleaner way to use helper
    functions and to not walk the argument lists three times.  With this
    change, a checking assertion can be added to test for matching qualifiers
    for pointers. (In general, this assumption is still violated for
    function return types.)

            PR c/123309

    gcc/c/ChangeLog:
            * c-typeck.cc (transparent_union_replacement): New function.
            (composite_type_internal): Rewrite logic.
            (type_lists_compatible_p): Remove dead code for NULL arguments.

    gcc/testsuite/ChangeLog:
            * gcc.dg/pr123309.c: New test.
            * gcc.dg/union-composite-type.c: New test.

Reply via email to