https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100788
Bug ID: 100788
Summary: Internal compiler error related to #line macros(?)
Product: gcc
Version: 11.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: gcov-profile
Assignee: unassigned at gcc dot gnu.org
Reporter: sebastian-gcc at sipsolutions dot net
CC: marxin at gcc dot gnu.org
Target Milestone: ---
I first thought this might have been the identical issue as
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95847 as it seemed similar. There
is also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96353, but I do not think
this is the same issue.
We have a large file in NumPy which generates compile errors on gcc 9+ (gcc 8
seems fine as far as I can tell). The issue on NumPy is:
https://github.com/numpy/numpy/issues/18529 (It is not a major issue, but I
fear it might get problematic for our coverage tools when they stop using GCC
8, which I think they are still using.)
I have attached the source file that generates the issue. Note that it is
generated by a custom templating language, so I can't fully rule out that the
inserted `#line` directives are incorrect.
The one clear thing I know is that removing all `#line` directives makes the
coverage compilation successfully.
I expect you may need more information, but am not sure how to best provide it,
considering that the file is part of the larger project.
The error/log is (this one with gcc (Debian 10.2.1-6) 10.2.1 20210110, but
confirmed on a gcc 11:
...
x86_64-linux-gnu-gcc: numpy/core/src/common/python_xerbla.c
during IPA pass: profile
numpy/core/src/multiarray/einsum_sumprod.c.src: In function
‘longdouble_sum_of_products_contig_three’:
numpy/core/src/multiarray/einsum_sumprod.c.src:1264:1: internal compiler error:
in coverage_begin_function, at coverage.c:656
1264 | }
| ^
0x7ff60fe2cd09 __libc_start_main
../csu/libc-start.c:308
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions.
error: Command "x86_64-linux-gnu-gcc -pthread --coverage -Wno-unused-result
-Wsign-compare -O0 -ggdb -g
-ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=.
-fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2
-Werror=vla -Werror=nonnull -Werror=pointer-arith -Wlogical-op
-Werror=unused-function -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
-DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -DHAVE_CBLAS
-Ibuild/src.linux-x86_64-3.9/numpy/core/src/common
-Ibuild/src.linux-x86_64-3.9/numpy/core/src/umath -Inumpy/core/include
-Ibuild/src.linux-x86_64-3.9/numpy/core/include/numpy
-Ibuild/src.linux-x86_64-3.9/numpy/distutils/include -Inumpy/core/src/common
-Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath
-Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort
-Inumpy/core/src/_simd -I/usr/include/python3.9
-Ibuild/src.linux-x86_64-3.9/numpy/core/src/common
-Ibuild/src.linux-x86_64-3.9/numpy/core/src/npymath -c
build/src.linux-x86_64-3.9/numpy/core/src/multiarray/einsum_sumprod.c -o
build/temp.linux-x86_64-3.9/build/src.linux-x86_64-3.9/numpy/core/src/multiarray/einsum_sumprod.o
-MMD -MF
build/temp.linux-x86_64-3.9/build/src.linux-x86_64-3.9/numpy/core/src/multiarray/einsum_sumprod.o.d
-msse -msse2 -msse3" failed with exit status 1