In -O2, the compiler materializes ("x" + INT_MIN) by loading that symbol+offset into a register in one shot, whereas in -O0 it loads the address of "x" into a register, then adds INT_MIN to that register. The same phenomenon happens in the x86-64 -mcmodel=kernel case.
- [Bug c++/91420] New: relocation truncated to fi... bmeng.cn at gmail dot com
- [Bug c++/91420] relocation truncated to fi... bmeng.cn at gmail dot com
- Re: [Bug c++/91420] New: relocation trunca... Andrew Waterman
- [Bug c++/91420] relocation truncated to fi... andrew at sifive dot com
- [Bug c++/91420] relocation truncated to fi... bmeng.cn at gmail dot com
- Re: [Bug c++/91420] relocation truncat... Andrew Waterman
- [Bug c++/91420] relocation truncated to fi... andrew at sifive dot com
- [Bug target/91420] relocation truncated to... bmeng.cn at gmail dot com
- [Bug target/91420] relocation truncated to... rguenth at gcc dot gnu.org
- [Bug target/91420] relocation truncated to... wilson at gcc dot gnu.org