This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/52611] ia64-hp-hpux11.31, internal compiler error: verify_gimple failed


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]