This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/52611] ia64-hp-hpux11.31, internal compiler error: verify_gimple failed
- From: "steven at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 18 Mar 2012 16:32:15 +0000
- Subject: [Bug c/52611] ia64-hp-hpux11.31, internal compiler error: verify_gimple failed
- Auto-submitted: auto-generated
- References: <bug-52611-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52611
--- Comment #4 from Steven Bosscher <steven at gcc dot gnu.org> 2012-03-18 16:32:15 UTC ---
I don't think we should drop a cast that changes a machine mode:
--- tree-ssa.c.orig 2012-03-18 17:32:32.000000000 +0100
+++ tree-ssa.c 2012-03-18 17:30:40.000000000 +0100
@@ -1264,6 +1264,10 @@ useless_type_conversion_p (tree outer_ty
if (POINTER_TYPE_P (inner_type)
&& POINTER_TYPE_P (outer_type))
{
+ /* Do not lose casts between pointers in different machine modes. */
+ if (TYPE_MODE (inner_type) != TYPE_MODE (outer_type))
+ return false;
+
/* Do not lose casts between pointers to different address spaces. */
if (TYPE_ADDR_SPACE (TREE_TYPE (outer_type))
!= TYPE_ADDR_SPACE (TREE_TYPE (inner_type)))
GCC 4.7 and GCC 4.8 have a similar check in place.