aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorMartin Uecker <uecker@tugraz.at>2025-03-16 10:54:17 +0100
committerMartin Uecker <uecker@gcc.gnu.org>2025-03-27 08:36:00 +0100
commitaccbc1b90bd942aa36ac1485a21056b774ce02df (patch)
tree9fbfed9b6a5530760b48e31042960255fe152fb8 /libcpp
parent7c8da04c412ed4f54596f10434aa46592d000fbf (diff)
downloadgcc-accbc1b90bd942aa36ac1485a21056b774ce02df.zip
gcc-accbc1b90bd942aa36ac1485a21056b774ce02df.tar.gz
gcc-accbc1b90bd942aa36ac1485a21056b774ce02df.tar.bz2
c: Fix tagname confusion for typedef redefinitions [PR118765]
When we redefine a typedef for a tagged type that has just been redefined, merge_decls may produce invalid TYPE_DECLS that are not consistent with what set_underlying_type produces. This is fixed by updating DECL_ORIGINAL_TYPE. PR c/118765 gcc/c/ChangeLog: * c-decl.cc (merge_decls): For TYPE_DECLS copy DECL_ORIGINAL_TYPE from the old declaration. * c-typeck.cc (tagged_types_tu_compatible_p): Add checking assertions. gcc/testsuite/ChangeLog: * gcc.dg/pr118765-2.c: New test. * gcc.dg/pr118765-3.c: New test. * gcc.dg/typedef-redecl3.c: New test.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions