https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83805
--- Comment #10 from Georg-Johann Lay ---
(In reply to Jakub Jelinek from comment #9)
> I don't see any bug actually. You are just saying that the str1 variable is
> __flash, during optimization (already in C FE) it optimizes str1[i] into
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83805
--- Comment #9 from Jakub Jelinek ---
I don't see any bug actually. You are just saying that the str1 variable is
__flash, during optimization (already in C FE) it optimizes str1[i] into
"0123456789"[i] and that is the string literal that is
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83805
--- Comment #8 from Georg-Johann Lay ---
(In reply to Jakub Jelinek from comment #7)
> Well, you have 3 objects, str1, str2 and the string literal, if the compiler
> thinks all 3 are needed, it emits all of them. Without
> -fmerge-all-constants
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83805
--- Comment #7 from Jakub Jelinek ---
Well, you have 3 objects, str1, str2 and the string literal, if the compiler
thinks all 3 are needed, it emits all of them. Without -fmerge-all-constants
str1 can't be merged with str2 nor with any other
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83805
--- Comment #6 from Georg-Johann Lay ---
(In reply to Jakub Jelinek from comment #1)
> If so, avr should override the select_section and unique_section target
> hooks and return something different for the __flash strings.
Also tried
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83805
--- Comment #5 from Georg-Johann Lay ---
(In reply to Jakub Jelinek from comment #4)
> Well, 7.2 certainly doesn't have any special casing for address spaces in
> categorize_decl_for_section etc., so before claiming it is a regression
> you'd
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83805
--- Comment #4 from Jakub Jelinek ---
Well, 7.2 certainly doesn't have any special casing for address spaces in
categorize_decl_for_section etc., so before claiming it is a regression you'd
better bisect what change actually changed it.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83805
Georg-Johann Lay changed:
What|Removed |Added
Known to work||7.2.1
Summary|Wrong