------- Comment #3 from pinskia at gcc dot gnu dot org  2007-06-19 08:26 -------
This code itself is very weird and I don't know if it is really defined or not.
We have basically:
char *f(char *a, char *b)
{
  return a + (int)b;
}

How can that even be defined.

Anyways the following fixes the problem:
Index: tree-ssa-address.c
===================================================================
--- tree-ssa-address.c  (revision 125776)
+++ tree-ssa-address.c  (working copy)
@@ -423,9 +423,9 @@

   /* Add ELT to base.  */
   type = TREE_TYPE (parts->base);
-  parts->base = fold_build2 (PLUS_EXPR, type,
+  parts->base = fold_build2 (POINTER_PLUS_EXPR, type,
                             parts->base,
-                            fold_convert (type, elt));
+                            fold_convert (sizetype, elt));
 }

 /* Finds the most expensive multiplication in ADDR that can be


Though I have not tested it at all.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2007-06-19 08:26:50
               date|                            |
            Summary|ICE in build2_stat, at      |[4.3 Regression] ICE in
                   |tree.c:3074                 |build2_stat, at tree.c:3074
   Target Milestone|---                         |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32399

Reply via email to