diff options
author | Eric Botcazou <ebotcazou@libertysurf.fr> | 2003-03-14 15:49:40 +0100 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2003-03-14 14:49:40 +0000 |
commit | f650843fc32b30f61fb62b103fe9db2f69a4f9a5 (patch) | |
tree | ab93e5cfe788a29c52543d1ab05815ba0f50d7bc /gcc/tree-inline.c | |
parent | 70e2e8dc1dcf67876829f1ff69fe77258613394b (diff) | |
download | gcc-f650843fc32b30f61fb62b103fe9db2f69a4f9a5.zip gcc-f650843fc32b30f61fb62b103fe9db2f69a4f9a5.tar.gz gcc-f650843fc32b30f61fb62b103fe9db2f69a4f9a5.tar.bz2 |
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: r64358
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 3b37929..be72b59 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -666,6 +666,10 @@ initialize_inlined_parameters (id, args, fn, block) 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); |