Skip to content

Commit 4373e28

Browse files
committed
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. (cherry picked from commit 08e752e)
1 parent 77d7d29 commit 4373e28

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

gcc/config/avr/avr.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,6 +1112,12 @@ avr_option_override (void)
11121112
if (targetm.addr_space.zero_address_valid (ADDR_SPACE_GENERIC))
11131113
flag_delete_null_pointer_checks = 0;
11141114

1115+
/* PR ipa/92606: Inter-procedural analysis optimizes data across
1116+
address-spaces and PROGMEM. As of v14, the PROGMEM part is
1117+
still not fixed (and there is still no target hook as proposed
1118+
in PR92932). Just disable respective bogus optimization. */
1119+
flag_ipa_icf_variables = 0;
1120+
11151121
if (flag_pic == 1)
11161122
warning (OPT_fpic, "%<-fpic%> is not supported");
11171123
if (flag_pic == 2)

0 commit comments

Comments
 (0)