re PR target/43746 (-fmerge-constants and -fmerge-all-constants don't work at AVR...
authorGeorg-Johann Lay <avr@gjlay.de>
Mon, 12 Sep 2011 10:06:46 +0000 (10:06 +0000)
committerGeorg-Johann Lay <gjl@gcc.gnu.org>
Mon, 12 Sep 2011 10:06:46 +0000 (10:06 +0000)
commit886a64f901a20efd755f9fc3e71419902b0cfd41
treefc7969f005f5c615d39984b3d09a13f6aa73b715
parentdc72b3137af4ee3ab261e1437a243d07600e18e9
re PR target/43746 (-fmerge-constants and -fmerge-all-constants don't work at AVR target)

gcc/
PR target/43746
* config/avr/avr.c (AVR_SECTION_PROGMEM): New Define.
(progmem_section): New Variable.
(avr_asm_init_sections): Initialize it.
(TARGET_ASM_SELECT_SECTION): Define to...
(avr_asm_select_section): ... this new Function.
(avr_replace_prefix): New Function.
(avr_asm_function_rodata_section): Use it.
(avr_insert_attributes): Don't add section attribute for PROGMEM.
(avr_section_type_flags): Use avr_progmem_p instead of section
name to detect if object is in PROGMEM.
(avr_asm_named_section): Set section name prefix for objects in
PROGMEM.

testsuite/
PR target/43746
* testsuite/gcc.target/avr/torture/avr-torture.exp
(AVR_TORTURE_OPTIONS): Add test cases "-O2 -fdata-sections" and
"-O2 -fmerge-all-constants".

From-SVN: r178779
gcc/ChangeLog
gcc/config/avr/avr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/avr/torture/avr-torture.exp