[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#973708: gcc-10: 10.2.0-15 to 10.2.0-16 regression results in ICE with #line 0



Package: gcc-10
Version: 10.2.0-16
Severity: normal
X-Debbugs-Cc: andatin@parsoma.net

Dear Maintainer,

Compiling the test program provided triggers an ICE in gcc-10 10.2.0-16,
but not 10.2.0-15. It's a reduction from generated code, from Nim. While
this does suggest that the code generation from Nim's less than perfect,
it's unclear that an ICE is the best way for gcc to respond.

$ cat testcase.c 
void function() { if (0) {
#line 0 "can be anything"
}}
$ gcc --version
gcc (Debian 10.2.0-15) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gcc -c -g3 -Og testcase.c
$ # this is expected outcome
$ # also, this indicates it's a regression from 10.2.0-15 to 10.2.0-16
$ # update to current sid version of gcc-10
$ gcc --version
gcc (Debian 10.2.0-16) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gcc -c -g3 -Og testcase.c
during RTL pass: final
can be anything: In function ‘function’:
can be anything: internal compiler error: in notice_source_line, at final.c:3237
0x6408a3 notice_source_line
	../../src/gcc/final.c:3237
0xc667cd final_scan_insn_1
	../../src/gcc/final.c:2420
0xc67b4b final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*)
	../../src/gcc/final.c:3152
0xc67c56 final_1
	../../src/gcc/final.c:2020
0xc689c6 rest_of_handle_final
	../../src/gcc/final.c:4658
0xc689c6 execute
	../../src/gcc/final.c:4736
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.

Whatever "#line 0" should do, triggering an ICE probably isn't it.

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.9.0-1-amd64 (SMP w/4 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages gcc-10 depends on:
ii  binutils       2.35.1-2
ii  cpp-10         10.2.0-16
ii  gcc-10-base    10.2.0-16
ii  libc6          2.31-4
ii  libcc1-0       10.2.0-16
ii  libgcc-10-dev  10.2.0-16
ii  libgcc-s1      10.2.0-16
ii  libgmp10       2:6.2.0+dfsg-6
ii  libisl22       0.22.1-1
ii  libmpc3        1.2.0-1
ii  libmpfr6       4.1.0-3
ii  libstdc++6     10.2.0-16
ii  libzstd1       1.4.5+dfsg-4
ii  zlib1g         1:1.2.11.dfsg-2

Versions of packages gcc-10 recommends:
ii  libc6-dev  2.31-4

Versions of packages gcc-10 suggests:
pn  gcc-10-doc       <none>
pn  gcc-10-locales   <none>
pn  gcc-10-multilib  <none>

-- no debconf information

Reply to: