]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/8396 ([sparc] optimizer ICE)
authorEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 14 Mar 2003 14:59:34 +0000 (14:59 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 14 Mar 2003 14:59:34 +0000 (14:59 +0000)
PR optimization/8396
* tree-inline.c (initialize_inlined_parameters): Make sure the value
of read-only constant arguments is passed with the right type.

From-SVN: r64362

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/tree-inline.c

index b1e9d81e92891142fc2c3d71863c50fea46936ba..f25b02a8f6fe98c1589be209e1c58ca5ddaee4ea 100644 (file)
@@ -1,6 +1,12 @@
+2003-03-14  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       PR optimization/8396
+       * tree-inline.c (initialize_inlined_parameters): Make sure the value
+       of read-only constant arguments is passed with the right type.
+
 2003-03-14  Andreas Jaeger  <aj@suse.de>
 
-        * config/i386/linux64.h (CPP_SPEC): Define __LP64__ and _LP64 for 
+       * config/i386/linux64.h (CPP_SPEC): Define __LP64__ and _LP64 for 
        64-bit.
 
 2003-03-12  Richard Henderson  <rth@redhat.com>
index 9a21126ef5e8e5de2a0cd151791edc9c4883c6b4..f2054c9f46eb08a2cc90079d7f96b0ea5b7d99ad 100644 (file)
@@ -1,3 +1,7 @@
+2003-03-14  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       * gcc.c-torture/compile/20030314-1.c: New test.
+
 2003-03-12  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        * gcc.dg/decl-3.c: New test.
index 307c35c2bb1b2e4b1f496819f2cb7251a668f146..34fcc5bd6370f9c5eded3cb29cbbcf19aa59a070 100644 (file)
@@ -509,6 +509,10 @@ initialize_inlined_parameters (id, args, fn)
              if (DECL_P (value))
                value = build1 (NOP_EXPR, TREE_TYPE (value), value);
 
+             /* If this is a constant, make sure it has the right type.  */
+             else if (TREE_TYPE (value) != TREE_TYPE (p))
+               value = fold (build1 (NOP_EXPR, TREE_TYPE (p), value));
+
              splay_tree_insert (id->decl_map,
                                 (splay_tree_key) p,
                                 (splay_tree_value) value);