From: Eric Botcazou Date: Fri, 14 Mar 2003 14:59:34 +0000 (+0000) Subject: re PR rtl-optimization/8396 ([sparc] optimizer ICE) X-Git-Tag: releases/gcc-3.2.3~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67c3c951a755eb8a3f2052e9f8627ea9359f3e89;p=thirdparty%2Fgcc.git re PR rtl-optimization/8396 ([sparc] optimizer ICE) 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b1e9d81e9289..f25b02a8f6fe 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,12 @@ +2003-03-14 Eric Botcazou + + 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 - * 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 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9a21126ef5e8..f2054c9f46eb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2003-03-14 Eric Botcazou + + * gcc.c-torture/compile/20030314-1.c: New test. + 2003-03-12 Eric Botcazou * gcc.dg/decl-3.c: New test. diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 307c35c2bb1b..34fcc5bd6370 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -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);