https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99383
Andrew Pinski changed:
What|Removed |Added
Resolution|--- |DUPLICATE
Status|NEW
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99383
Andrew Pinski changed:
What|Removed |Added
Severity|normal |enhancement
See Also|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99383
--- Comment #7 from Jakub Jelinek ---
The code would need to also verify the constants are all pointers, just having
a relocation nested somewhere in a struct wouldn't work.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99383
--- Comment #6 from Jakub Jelinek ---
Note, it could be even POINTER_DIFF_EXPR of the value and the first value in
the table or something similar.
The generic code would need to ensure for flag_pic that either reloc is
null_pointer_node for all e
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99383
--- Comment #5 from Jakub Jelinek ---
Combining the separate strings into a single one if they have the same length
and aren't many would have the disadvantage that the returned value then
wouldn't be pointer equal to constant literal containing
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99383
--- Comment #4 from Jakub Jelinek ---
That was an intentional change, see the PR.
With -fPIC/-fPIE, when the switch isn't optimized into a table of values but
kept as a switch, it doesn't need runtime relocations on many targets. Just
try to com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99383
--- Comment #3 from Richard Biener ---
For the specific case of strings switch-conversion could also generate
a combined string (with intermediate '\0's) and use a table of
offsets into said string, thus doing a single relocation to the
combined
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99383
Richard Biener changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99383
Richard Biener changed:
What|Removed |Added
CC||marxin at gcc dot gnu.org
S