[Bug lto/113207] [12/13/14/15 Regression] error: type variant has different 'TREE_TYPE' with noreturn or const
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 4 07:35:12 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113207
--- Comment #12 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:
https://gcc.gnu.org/g:a55e14b239181381204c615335929b3316d75370
commit r15-7343-ga55e14b239181381204c615335929b3316d75370
Author: Richard Biener <rguenther@suse.de>
Date: Mon Feb 3 14:27:01 2025 +0100
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.
More information about the Gcc-bugs
mailing list