diff options
author | Georg-Johann Lay <avr@gjlay.de> | 2024-05-03 18:47:50 +0200 |
---|---|---|
committer | Georg-Johann Lay <avr@gjlay.de> | 2024-05-06 19:10:08 +0200 |
commit | 08e752e72363ae7fd5a5fcb70913a0f7b240387b (patch) | |
tree | de21531f9f59dc2abbe40119d10632ce88b83678 /gcc/config/avr/avr.cc | |
parent | 0e12aa6c26a9566f5b1a9b6d111a9e27507e213d (diff) | |
download | gcc-08e752e72363ae7fd5a5fcb70913a0f7b240387b.zip gcc-08e752e72363ae7fd5a5fcb70913a0f7b240387b.tar.gz gcc-08e752e72363ae7fd5a5fcb70913a0f7b240387b.tar.bz2 |
AVR: ipa/92606 - Don't optimize PROGMEM data against non-PROGMEM.
ipa/92606: Inter-procedural analysis optimizes data across
address-spaces and PROGMEM. As of v14, the PROGMEM part is
still not fixed (and there is still no target hook as proposed
in PR92932). Just disable respective bogus optimization.
PR ipa/92606
gcc/
* config/avr/avr.cc (avr_option_override): Set
flag_ipa_icf_variables = 0.
gcc/testsuite/
* gcc.target/avr/torture/pr92606.c: New test.
Diffstat (limited to 'gcc/config/avr/avr.cc')
-rw-r--r-- | gcc/config/avr/avr.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/config/avr/avr.cc b/gcc/config/avr/avr.cc index 510e4ce..74924ab 100644 --- a/gcc/config/avr/avr.cc +++ b/gcc/config/avr/avr.cc @@ -1140,6 +1140,12 @@ avr_option_override (void) if (targetm.addr_space.zero_address_valid (ADDR_SPACE_GENERIC)) flag_delete_null_pointer_checks = 0; + /* PR ipa/92606: Inter-procedural analysis optimizes data across + address-spaces and PROGMEM. As of v14, the PROGMEM part is + still not fixed (and there is still no target hook as proposed + in PR92932). Just disable respective bogus optimization. */ + flag_ipa_icf_variables = 0; + if (flag_pic == 1) warning (OPT_fpic, "%<-fpic%> is not supported"); if (flag_pic == 2) |