diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2022-07-14 12:15:35 +0200 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2022-07-14 12:18:42 +0200 |
commit | b0f02eeb906b6351099ac97066ef74b6167d9ecb (patch) | |
tree | a2328234213a4e55c84fe46648ec6aab7f60a56b /libcpp | |
parent | 9f7f04998964451ff487b546d77ea48d0ce01451 (diff) | |
download | gcc-b0f02eeb906b6351099ac97066ef74b6167d9ecb.zip gcc-b0f02eeb906b6351099ac97066ef74b6167d9ecb.tar.gz gcc-b0f02eeb906b6351099ac97066ef74b6167d9ecb.tar.bz2 |
Fix ICE on view conversion between struct and integer
This happens from prepare_gimple_addressable for the variable to be marked
with DECL_NOT_GIMPLE_REG_P when its initialization is gimplified, so it's
apparently just a matter of setting the flag earlier.
gcc/
* gimplify.cc (lookup_tmp_var): Add NOT_GIMPLE_REG boolean parameter
and set DECL_NOT_GIMPLE_REG_P on the variable according to it.
(internal_get_tmp_var): Add NOT_GIMPLE_REG boolean parameter and
pass it in the call to lookup_tmp_var.
(get_formal_tmp_var): Pass false in the call to lookup_tmp_var.
(get_initialized_tmp_var): Likewise.
(prepare_gimple_addressable): Call internal_get_tmp_var instead of
get_initialized_tmp_var with NOT_GIMPLE_REG set to true.
gcc/testsuite/
* gnat.dg/opt98.ads, gnat.dg/opt98.adb: New test.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions