https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95620
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> --- So we basically change assembly in the following way: $ diff -u good.s bad.s -U999 --- good.s 2020-06-09 23:37:35.755366723 +0200 +++ bad.s 2020-06-09 23:37:36.771361476 +0200 @@ -1,13 +1,13 @@ .file "<artificial>" .text .globl main .type main, @function main: .LFB1: movl b(%rip), %edx .LFE1: .size main, .-main - .local b - .comm b,4,4 .local a .comm a,2430270464 + .local b + .comm b,4,4 and logically the relocation for 'b(%rip)' now has to go over the huge 'a' array. It's invalid to me, I would recommend using -mcmodel=large.