https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81025
Bug ID: 81025
Summary: [MIPS] soft-float glibc build fails at r248863
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: doug.gilmore at imgtec dot com
Target Milestone: ---
Created attachment 41509
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41509&action=edit
CPP output file
Our ToT GLIBC soft-float builds are failing ToT, I bisected the
problem to r248863.
To reproduce the problem with minimum effort, configure and build via:
<GCC_SRC_PATH>/configure --prefix=.../install-mips-mti-linux-gnu
--disable-libssp --disable-libmudflap --disable-decimal-float --with-mips-plt
--target=mips-mti-linux-gnu --enable-languages=c --without-headers
--disable-shared --disable-threads --disable-libquadmath --disable-libatomic
--with-sysroot=.../install-mips-mti-linux-gnu/sysroot
make maybe-all-gcc
I attached two patches:
One to restrict the number of multi-lib variants, which probably isn't
needed for maybe-all-gcc, but will speed full gcc build.
The other patch is a cherry pick of r248879 which is needed to build
r248863 for MIPS.
Build CPP file:
<BUILD_DIR>/gcc/xgcc -B<BUILD_DIR>/gcc -O2 -msoft-float -mabi=32 s_fmaf.i -c
-std=gnu11 -fgnu89-inline -O2 -Wall -Werror -Wundef -Wwrite-strings
-fmerge-all-constants -fno-stack-protector -frounding-math -g
-Wstrict-prototypes -Wold-style-definition
The CPP file compiles cleanly at r248862, but at r248863 with patch
for r248879 applied, the compile fails with:
during RTL pass: dwarf2
In file included from ../sysdeps/mips/ieee754/s_fmaf.c:4:0:
../soft-fp/fmasf4.c: In function '__fmaf':
../soft-fp/fmasf4.c:62:1: internal compiler error: in maybe_record_trace_start,
at dwarf2cfi.c:2330
0x74ab9f maybe_record_trace_start
/scratch/dgilmore/sgcc-pp5/src/gcc/gcc/dwarf2cfi.c:2330
0x74af2f create_trace_edges
/scratch/dgilmore/sgcc-pp5/src/gcc/gcc/dwarf2cfi.c:2426
0x74b0af scan_trace
/scratch/dgilmore/sgcc-pp5/src/gcc/gcc/dwarf2cfi.c:2640
0x74bd16 create_cfi_notes
/scratch/dgilmore/sgcc-pp5/src/gcc/gcc/dwarf2cfi.c:2666
0x74bd16 execute_dwarf2_frame
/scratch/dgilmore/sgcc-pp5/src/gcc/gcc/dwarf2cfi.c:3024
0x74bd16 execute
/scratch/dgilmore/sgcc-pp5/src/gcc/gcc/dwarf2cfi.c:3504
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Applying -fdump-rtl-dwarf2 to the compilation line the associated
dump file contains:
Inconsistent CFI state!
SHOULD have:
.cfi_def_cfa 29, 0
DO have:
.cfi_def_cfa 29, 8
.cfi_offset 16, -4
The CPP file is quite complicated, I am investigating whether
a cut down example will reproduce the failure.