]> git.ipfire.org Git - thirdparty/gcc.git/commit
lto/113207 - fix free_lang_data_in_type
authorRichard Biener <rguenther@suse.de>
Mon, 3 Feb 2025 13:27:01 +0000 (14:27 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 24 Feb 2025 10:46:34 +0000 (11:46 +0100)
commit5759b5f4af2d7ad09e0ad04be95fb26244d4e726
treeaf4ad5e1455288466dd50c1aad1f0bdcac4a811c
parent7c36056ede3a7e0eed8c95b4080b3f4ce6be12b1
lto/113207 - fix free_lang_data_in_type

When we process function types we strip volatile and const qualifiers
after building a simplified type variant (which preserves those).
The qualified type handling of both isn't really compatible, so avoid
bad interaction by swapping this, first dropping const/volatile
qualifiers and then building the simplified type thereof.

PR lto/113207
* ipa-free-lang-data.cc (free_lang_data_in_type): First drop
const/volatile qualifiers from function argument types,
then build a simplified type.

* gcc.dg/pr113207.c: New testcase.

(cherry picked from commit a55e14b239181381204c615335929b3316d75370)
gcc/ipa-free-lang-data.cc
gcc/testsuite/gcc.dg/pr113207.c [new file with mode: 0644]