aboutsummaryrefslogtreecommitdiff
path: root/libjava/contrib
diff options
context:
space:
mode:
authorMartin Uecker <uecker@tugraz.at>2024-09-17 11:37:29 +0200
committerMartin Uecker <uecker@gcc.gnu.org>2024-10-09 09:18:59 +0200
commit4123f546d77c42287d2fcae6fb04df7b87193454 (patch)
treed335947e7ee2a6f112fec8fa11739a6b46535368 /libjava/contrib
parentf14b608614dc8ca428282486cdd62536d41f5754 (diff)
downloadgcc-releases/gcc-14.zip
gcc-releases/gcc-14.tar.gz
gcc-releases/gcc-14.tar.bz2
c: fix crash when checking for compatibility of structures [PR116726]releases/gcc-14
When checking for compatibility of structure or union types in tagged_types_tu_compatible_p, restore the old value of the pointer to the top of the temporary cache after recursively calling comptypes_internal when looping over the members of a structure of union. While the next iteration of the loop overwrites the pointer, I missed the fact that it can be accessed again when types of function arguments are compared as part of recursive type checking and the function is entered again. PR c/116726 gcc/c/ChangeLog: * c-typeck.cc (tagged_types_tu_compatible_p): Restore value of the cache after recursing into comptypes_internal. gcc/testsuite/ChangeLog: * gcc.dg/pr116726.c: New test. (cherry picked from commit 9227a64495d5594613604573b72422e8e3722fc5)
Diffstat (limited to 'libjava/contrib')
0 files changed, 0 insertions, 0 deletions