[Bug c/89410] New: internal compiler error: in calculate_line_spans, at diagnostic-show-locus.c:1237 after #line
jg at jguk dot org
gcc-bugzilla@gcc.gnu.org
Tue Feb 19 22:39:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89410
Bug ID: 89410
Summary: internal compiler error: in calculate_line_spans, at
diagnostic-show-locus.c:1237 after #line
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: jg at jguk dot org
Target Milestone: ---
I know this is really improbable, a file with more than 2 Million lines, but
anyway.
I was a bit surprised to see the line number come and go in the output.
What would be best? if 2^31 2147483648 is the limit, maybe should just fix on
-1 above that number to prevent the ICE? Or is it worth extending to int64?
A
Godbolt trunk
gcc (GCC-Explorer-Build) 9.0.1 20190217
int main(void)
{
#warning first
#line 12147483647
#warning second
#line 112147483647
#warning third
#line 112147483647
#warning fifth
#line 1223372036854775807
#warning sixth
#line 9223372036854775807
#warning seventh
}
#1 with x86-64 gcc (trunk)
<source>: In function 'main':
<source>:3:2: warning: #warning first [-Wcpp]
3 | #warning first
| ^~~~~~~
<source>:-737418241:2: warning: #warning second [-Wcpp]
<source>:-737418240:7: warning: line number out of range
<source>:478333951:2: warning: #warning third [-Wcpp]
<source>:478333952:7: warning: line number out of range
<source>:478333951:2: warning: #warning fifth [-Wcpp]
<source>:478333952:7: warning: line number out of range
<source>:-991952897:2: warning: #warning sixth [-Wcpp]
<source>:-991952896:7: warning: line number out of range
<source>:-1:2: warning: #warning seventh [-Wcpp]
<source>:-1: internal compiler error: in calculate_line_spans, at
diagnostic-show-locus.c:1237
Internal compiler error: Error reporting routines re-entered.
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned 1
More information about the Gcc-bugs
mailing list