diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-14 14:49:40 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-03-14 14:49:40 +0000 |
commit | 43462ec3348383e1cab5b2372441a3777124781d (patch) | |
tree | ab93e5cfe788a29c52543d1ab05815ba0f50d7bc /gcc/tree-inline.c | |
parent | 43462c2a6a58f16fa5138fe39fc6b0b22129c865 (diff) | |
download | gcc-43462ec3348383e1cab5b2372441a3777124781d.tar.gz |
PR optimization/8396
* tree-inline.c (initialize_inlined_parameters): Make sure the value
of read-only constant arguments is passed with the right type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64358 138bc75d-0d04-0410-961f-82ee72b054a4
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 3b379299917..be72b59c213 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); |