This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/54038] [4.7/4.8 Regression] finalize_type_size enters infinite loop becasue TYPE_NEXT_VARIANT (variant) == variant
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 20 Jul 2012 11:48:40 +0000
- Subject: [Bug c++/54038] [4.7/4.8 Regression] finalize_type_size enters infinite loop becasue TYPE_NEXT_VARIANT (variant) == variant
- Auto-submitted: auto-generated
- References: <bug-54038-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54038
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-07-20 11:48:40 UTC ---
> That is, the following should hold true:
> TYPE_MAIN_VARIANT (TYPE_CANONICAL (x)) == TYPE_CANONICAL (x)
I disagree, that is very often not the case. TYPE_CANONICAL includes in it
qualifiers, TYPE_MAIN_VARIANT has them stripped, so whenever you have some type
with any qualifiers, its TYPE_CANONICAL (either equal to the type itself or
some different type) will not be its own TYPE_MAIN_VARIANT.