When building git package on Buildroot gcc throws:
ref-filter.c: In function 'find_longest_prefixes_1':
ref-filter.c:1914:1: internal compiler error: Segmentation fault
To reproduce it:
# git clone git://git.busybox.net/buildroot
# wget https://git.busybox.net/buildroot-test/tree/utils/br-reproduce-build
- modify BASE_GIT=... with your buildroot path in br-reproduce-build then:
# chmod a+x br-reproduce-build
# ./br-reproduce-build 432a2766836107ed5536f861a8fbcab33e1f8cf6
The only way I've found to build correctly is to turn off optimization overriding CFLAGS with -O0.
Hope you can reproduce this way as they've done for RISCV32:
Otherwise it become useless to send you only .i file.
Here is another test-case:
Here gcc is built from scratch instead of using Codesourcery one, so it should be easy for you to check.
I've found that this bug affects Nios II on gcc 6,7,8.
Your "test cases" are not useful. Please provide something self-contained (e.g., preprocessed source code for the file that GCC ICEs on), that does not depend on all of some version of buildroot. Also please provide the complete set of command-line options used for building that file.