This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/71109] New: gcc ICE at -O3 on valid code on x86_64-linux-gnu in "maybe_record_trace_start"
- From: "helloqirun at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 13 May 2016 20:37:28 +0000
- Subject: [Bug tree-optimization/71109] New: gcc ICE at -O3 on valid code on x86_64-linux-gnu in "maybe_record_trace_start"
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71109
Bug ID: 71109
Summary: gcc ICE at -O3 on valid code on x86_64-linux-gnu in
"maybe_record_trace_start"
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: helloqirun at gmail dot com
Target Milestone: ---
The following valid code causes an ICE when compiled with the current gcc trunk
at only -O3 on x86_64-linux-gnu in 64-bit mode. 32-bit mode works fine.
It appears to be a 7 regression.
$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/home/absozero/trunk/root-gcc/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --prefix=/home/absozero/trunk/root-gcc
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 7.0.0 20160513 (experimental) [trunk revision 236209] (GCC)
$ gcc-trunk -O3 abc.c -c
abc.c: In function âfn2â:
abc.c:26:1: internal compiler error: in maybe_record_trace_start, at
dwarf2cfi.c:2284
}
^
0x827738 maybe_record_trace_start
../../gcc/gcc/dwarf2cfi.c:2284
0x829e30 scan_trace
../../gcc/gcc/dwarf2cfi.c:2462
0x82a66a create_cfi_notes
../../gcc/gcc/dwarf2cfi.c:2616
0x82a66a execute_dwarf2_frame
../../gcc/gcc/dwarf2cfi.c:2974
0x82a66a execute
../../gcc/gcc/dwarf2cfi.c:3454
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$ cat abc.c
struct S0 {
int f0;
int f1;
char f2;
int f3;
char f4;
int f5;
int f6;
int f7;
char f8;
} a, c;
struct S1 {
char f0;
} e;
int *b;
int d;
void fn1();
void fn2() {
for (; d;) {
fn1(fn2, a);
struct S1 f[3];
int k;
for (;; k++)
f[k] = e;
}
}
void fn1(int p1, struct S0 p2, struct S1 p3) {
p3.f0 = 2;
for (; p3.f0; p3.f0--) {
struct S0 *g = &a, *h = &c;
*h = *g = p2;
*b |= 6;
if (p2.f0)
break;
}
}