diff options
author | Richard Biener <rguenther@suse.de> | 2021-05-28 13:31:35 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-05-28 14:25:33 +0200 |
commit | 359c0a86e2974a9f3036bc05b6e6c661f2c463cf (patch) | |
tree | 68f6477d91a92f508c44ab2539b23700d185cc24 /gcc/tree-inline.c | |
parent | 8b2b32ab2d8cff4eb0dad0ef4e72e33257574cb6 (diff) | |
download | gcc-359c0a86e2974a9f3036bc05b6e6c661f2c463cf.zip gcc-359c0a86e2974a9f3036bc05b6e6c661f2c463cf.tar.gz gcc-359c0a86e2974a9f3036bc05b6e6c661f2c463cf.tar.bz2 |
ipa/100791 - copy fntype when processing __builtin_va_arg_pack
This missing copying exposed a type mismatch in the IL.
2021-05-28 Richard Biener <rguenther@suse.de>
PR ipa/100791
* tree-inline.c (copy_bb): When processing __builtin_va_arg_pack
copy fntype from original call.
* gcc.dg/pr100791.c: New testcase.
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 1d13e7f..d38e861 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -2100,6 +2100,7 @@ copy_bb (copy_body_data *id, basic_block bb, GF_CALL_VA_ARG_PACK. */ gimple_call_copy_flags (new_call, call_stmt); gimple_call_set_va_arg_pack (new_call, false); + gimple_call_set_fntype (new_call, gimple_call_fntype (call_stmt)); /* location includes block. */ gimple_set_location (new_call, gimple_location (stmt)); gimple_call_set_lhs (new_call, gimple_call_lhs (call_stmt)); |