This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/52443] ICE: verify_gimple failed: invalid types in nop conversion
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 01 Mar 2012 09:50:40 +0000
- Subject: [Bug other/52443] ICE: verify_gimple failed: invalid types in nop conversion
- Auto-submitted: auto-generated
- References: <bug-52443-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52443
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-01 09:50:40 UTC ---
/* Allow conversions between integral types and pointers only if
there is no sign or zero extension involved.
For targets were the precision of ptrofftype doesn't match that
of pointers we need to allow arbitrary conversions from and
to ptrofftype. */
if ((POINTER_TYPE_P (lhs_type)
&& INTEGRAL_TYPE_P (rhs1_type)
&& (TYPE_PRECISION (lhs_type) >= TYPE_PRECISION (rhs1_type)
|| ptrofftype_p (rhs1_type)))
|| (POINTER_TYPE_P (rhs1_type)
&& INTEGRAL_TYPE_P (lhs_type)
&& (TYPE_PRECISION (rhs1_type) >= TYPE_PRECISION (lhs_type)
|| ptrofftype_p (sizetype))))
return false;
Looks like the above should be
if ((POINTER_TYPE_P (lhs_type)
&& INTEGRAL_TYPE_P (rhs1_type)
&& (TYPE_PRECISION (lhs_type) <= TYPE_PRECISION (rhs1_type)
|| ptrofftype_p (rhs1_type)))
|| (POINTER_TYPE_P (rhs1_type)
&& INTEGRAL_TYPE_P (lhs_type)
&& (TYPE_PRECISION (rhs1_type) >= TYPE_PRECISION (lhs_type)
|| ptrofftype_p (sizetype))))
return false;
does that help?