https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69401
--- Comment #4 from Thomas Petazzoni <thomas.petazz...@free-electrons.com> --- Any input? I'm facing a similar problem with the gpsd software: on gcc 6.x and gcc 7.x, one file fails to build with an ICE: rtcm2_json.c: In function 'json_rtcm2_read': rtcm2_json.c:258:1: internal compiler error: in gen_reg_rtx, at emit-rtl.c:1026 You need the combination of -O2 and -fPIC for the bug to appear. If either -O2 or -fPIC are omitted, the builds works fine: gpsd-3.16$ microblazeel-buildroot-linux-uclibc-gcc -fPIC -c -x c rtcm2_json.os gpsd-3.16$ microblazeel-buildroot-linux-uclibc-gcc -O2 -c -x c rtcm2_json.os gpsd-3.16$ microblazeel-buildroot-linux-uclibc-gcc -O2 -fPIC -c -x c rtcm2_json.os rtcm2_json.c: In function 'json_rtcm2_read': rtcm2_json.c:258:1: internal compiler error: in gen_reg_rtx, at emit-rtl.c:1026 } ^ Please submit a full bug report, with preprocessed source if appropriate. See <http://bugs.buildroot.net/> for instructions. I'll attach rtcm2_json.os (preprocessed source code) to ease reproduction of the build problem.