This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/71596] [7 Regression] gcc bootstrap fails due to segv in genrecog
- From: "saguryev.gnu at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 20 Jun 2016 18:12:22 +0000
- Subject: [Bug rtl-optimization/71596] [7 Regression] gcc bootstrap fails due to segv in genrecog
- Auto-submitted: auto-generated
- References: <bug-71596-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71596
--- Comment #2 from Sergey <saguryev.gnu at gmail dot com> ---
( may be related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70902 ? )
- genrecog crashes with segv if built with gcc@r235523 and later after emitting
first 32k of its output -- stack trace below;
- it's genrecog.c:init_pattern_use() which is compiled incorrectly at -O2; if
compiled at -O1 ( with all others remaining at -O2 ), the problem vanishes;
- also, the problem shows up with -march= nehalem, sandybridge and newer archs;
if built with -march=nocona or silvermont, it works fine.
build/genrecog ../../gcc/gcc/common.md ../../gcc/gcc/config/i386/i386.md
insn-conditions.md
/* Generated automatically by the program `genrecog' from the target
.....
longest path: 195 (code: 77)
longest backtrack: 17 (code: 156)
Program received signal SIGSEGV, Segmentation fault.
populate_pattern_routine (cpi=cpi@entry=0x7fffffffd980, sinfo=0x4387040,
news=news@entry=0x4387090, params=...)
at ../../gcc/gcc/genrecog.c:2842
2842 decision *d = sinfo->s->singleton ();
(gdb) p sinfo->s
$3 = (state *) 0x0
(gdb) bt
#0 populate_pattern_routine (cpi=cpi@entry=0x7fffffffd980, sinfo=0x4387040,
news=news@entry=0x4387090, params=...)
at ../../gcc/gcc/genrecog.c:2842
#1 0x00000000004175e5 in populate_pattern_routine
(cpi=cpi@entry=0x7fffffffd980, sinfo=0x7ffff7208ee0, news=<optimized out>,
params=...) at ../../gcc/gcc/genrecog.c:2907
#2 0x0000000000417a91 in init_pattern_use (cpi=cpi@entry=0x7fffffffd980,
sinfo=0x7ffff7208ee0, params=...)
at ../../gcc/gcc/genrecog.c:2788
#3 0x000000000041728f in populate_pattern_routine
(cpi=cpi@entry=0x7fffffffe190, sinfo=0x7ffff71f7348,
news=news@entry=0x4386b10, params=...) at ../../gcc/gcc/genrecog.c:2912
#4 0x00000000004175e5 in populate_pattern_routine
(cpi=cpi@entry=0x7fffffffe190, sinfo=0x7ffff71e9fe0,
news=news@entry=0x4386aa0, params=...) at ../../gcc/gcc/genrecog.c:2907
#5 0x00000000004175e5 in populate_pattern_routine
(cpi=cpi@entry=0x7fffffffe190, sinfo=0x7ffff71e0d78,
news=news@entry=0x4386a30, params=...) at ../../gcc/gcc/genrecog.c:2907
#6 0x00000000004175e5 in populate_pattern_routine
(cpi=cpi@entry=0x7fffffffe190, sinfo=0x7ffff71da6f8,
news=news@entry=0x43869c0, params=...) at ../../gcc/gcc/genrecog.c:2907
#7 0x00000000004175e5 in populate_pattern_routine
(cpi=cpi@entry=0x7fffffffe190, sinfo=0x7ffff71d7520,
news=news@entry=0x4386950, params=...) at ../../gcc/gcc/genrecog.c:2907
#8 0x00000000004175e5 in populate_pattern_routine
(cpi=cpi@entry=0x7fffffffe190, sinfo=0x7ffff71d5608, news=<optimized out>,
params=...) at ../../gcc/gcc/genrecog.c:2907
#9 0x0000000000417a91 in init_pattern_use (cpi=cpi@entry=0x7fffffffe190,
sinfo=sinfo@entry=0x7ffff71d5608, params=...)
at ../../gcc/gcc/genrecog.c:2788
#10 0x00000000004034e1 in use_pattern (sinfo=<optimized out>) at
../../gcc/gcc/genrecog.c:2993
#11 split_out_patterns (states=...) at ../../gcc/gcc/genrecog.c:3243
#12 main (argc=<optimized out>, argv=<optimized out>) at
../../gcc/gcc/genrecog.c:5317