[Bug target/114756] [14] RISC-V rv32imc miscompile with -fdata-sections

2024-04-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114756 --- Comment #3 from Andrew Pinski --- Basically what is happening is the linker relaxation code is turning it into something which is wrong. But GCC's invalid use of %lo(n+4)(a5) with a (invalid) corresponding %hi(n) is confusing the relaxation

[Bug target/114756] [14] RISC-V rv32imc miscompile with -fdata-sections

2024-04-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114756 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE Status|UNCONFIRME

[Bug target/114756] [14] RISC-V rv32imc miscompile with -fdata-sections

2024-04-17 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114756 --- Comment #1 from Andrew Pinski --- lui a5,%hi(n) lw a2,%lo(n)(a5) lw a3,%lo(n+4)(a5) vs: lui a5,%hi(.LANCHOR0) addia5,a5,%lo(.LANCHOR0) lw a2,0(a5) lw a3