aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/openmp.cc
diff options
context:
space:
mode:
authorMartin Uecker <uecker@tugraz.at>2025-04-04 21:01:48 +0200
committerMartin Uecker <uecker@gcc.gnu.org>2025-04-08 14:27:36 +0200
commita3382d9d675f42db96a51d902afc49a0a4cfadee (patch)
tree5e352d900f8cc47034f874040618adf0be1e5deb /gcc/fortran/openmp.cc
parent0f77d88fdf797842ac0134a4013b4227dd5a658f (diff)
downloadgcc-a3382d9d675f42db96a51d902afc49a0a4cfadee.zip
gcc-a3382d9d675f42db96a51d902afc49a0a4cfadee.tar.gz
gcc-a3382d9d675f42db96a51d902afc49a0a4cfadee.tar.bz2
c: fix checking for a tag for variably modified tagged types [PR119612]
The checking assertion added for PR118765 did not take into account that add_decl_expr can change TYPE_NAME to a TYPE_DECL with no name for certain cases of variably modified types. This also implies that we might sometimes not reliably detect the absence of a tag when only considering TYPE_NAME. This patch introduces a new helper function c_type_tag to reliable compute the tag for a tagged types and uses it for code where the switch to C23 may cause regressions. PR c/119612 gcc/c/ChangeLog: * c-tree.h (c_type_tag): Add prototype. * c-typeck.cc (c_type_tag): New function. (tagged_types_tu_compatible_p, composite_type_internal): Use c_type_tag. * c-decl.cc (c_struct_hasher::hash, previous_tag): Use c_type_tag. gcc/testsuite/ChangeLog: * gcc.dg/gnu23-tag-6.c: New test. * gcc.dg/pr119612.c: New test.
Diffstat (limited to 'gcc/fortran/openmp.cc')
0 files changed, 0 insertions, 0 deletions