[Bug target/94134] pdp11-aout puts initial variable into .text section rather than .data

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Mar 11 08:26:56 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94134

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Well, in the testcase you've provided the variable isn't modified in any way
(nor used), so there is nothing wrong in optimizing it away completely or
putting it into a read-only section.
But say:
static volatile int zero = 0;
static volatile int one = 1;
int main () { zero++; one++; return 0; }
shows it is a real bug, assuming that the .text section is not modifiable on
pdp11-aout.


More information about the Gcc-bugs mailing list