[Bug middle-end/106833] Miss to handle OPAQUE_TYPE specially in verify_type
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Sep 9 13:18:31 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106833
--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Kewen Lin <linkw@gcc.gnu.org>:
https://gcc.gnu.org/g:e230f11e9784eefed316df7dbc5df6ac999841b2
commit r13-2562-ge230f11e9784eefed316df7dbc5df6ac999841b2
Author: Kewen Lin <linkw@linux.ibm.com>
Date: Fri Sep 9 08:17:21 2022 -0500
Handle OPAQUE_TYPE specially in verify_type [PR106833]
As PR106833 shows, cv-qualified opaque type can cause ICE
during LTO. It exposes that we missd to handle OPAQUE_TYPE
well in type verification. As Richi pointed out, also
assuming that target will always define TYPE_MAIN_VARIANT
TYPE_CANONICAL for opaque type, this patch is to check
both are OPAQUE_TYPE_P and their modes are of MODE_OPAQUE
class. Besides, it also checks the only available size
and alignment information.
PR middle-end/106833
gcc/ChangeLog:
* tree.cc (verify_opaque_type): New function.
(verify_type): Call verify_opaque_type for OPAQUE_TYPE.
gcc/testsuite/ChangeLog:
* gcc.target/powerpc/pr106833.c: New test.
More information about the Gcc-bugs
mailing list