Bug 93847 - Nios II ICE
Summary: Nios II ICE
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 7.3.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Keywords: ice-on-valid-code
Depends on:
Reported: 2020-02-20 15:13 UTC by Giulio Benetti
Modified: 2020-04-15 01:46 UTC (History)
1 user (show)

See Also:
Target: nios2
Known to work:
Known to fail:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Giulio Benetti 2020-02-20 15:13:34 UTC
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.
Comment 1 Giulio Benetti 2020-02-20 15:26:16 UTC
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.
Comment 2 sandra 2020-04-15 01:46:23 UTC
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.