https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120145
Bug ID: 120145
Summary: Can't bootstrap gcc11 on OpenBSD / sparc64
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
Assignee: unassigned at gcc dot gnu.org
Reporter: kirill at korins dot ky
Target Milestone: ---
Environment: OpenBSD 7.7 with gcc 4.2.1 as base compiler, and gcc 8.4.0 as
bootstrap compiler.
GCC build fails on bootstrap because the first start of cc1 crashed.
I can bootstrap it by clang, but resulted GCC can't bootstrap itself with the
same issue.
When I run cc1 manually in GDB it fails as:
(gdb) r
Starting program: /usr/ports/pobj/gcc-11.2.0/build-sparc64/gcc/cc1
Program received signal SIGSEGV, Segmentation fault.
0x0000005e7ec4c378 in _ZN8poly_intILj1ExEC1IiEERKT_+0xfffffffffcbb3c94@plt ()
(gdb) b _ZN8poly_intILj1ExEC1IiEERKT_+0xfffffffffcbb3c94@plt
Breakpoint 1 at 0x5e7ec4c368
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/ports/pobj/gcc-11.2.0/build-sparc64/gcc/cc1
Breakpoint 1, 0x00000042fca4c368 in
_ZN8poly_intILj1ExEC1IiEERKT_+0xfffffffffcbb3c94@plt ()
(gdb) bt
#0 0x00000042fca4c368 in _ZN8poly_intILj1ExEC1IiEERKT_+0xfffffffffcbb3c94@plt
()
#1 0x00000042fab69858 in __static_initialization_and_destruction_0
(__initialize_p=1, __priority=65535)
at /usr/ports/pobj/gcc-11.2.0/gcc-11.2.0/gcc/var-tracking.c:936
#2 0x00000042fab698bc in _GLOBAL__sub_I_attrs_pool () at
/usr/ports/pobj/gcc-11.2.0/gcc-11.2.0/gcc/var-tracking.c:10614
#3 0x00000042f96006a4 in _start ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) c
Continuing.
Breakpoint 1, 0x00000042fca4c368 in
_ZN8poly_intILj1ExEC1IiEERKT_+0xfffffffffcbb3c94@plt ()
(gdb) bt
#0 0x00000042fca4c368 in _ZN8poly_intILj1ExEC1IiEERKT_+0xfffffffffcbb3c94@plt
()
#1 0x00000042fa6a25c0 in __static_initialization_and_destruction_0
(__initialize_p=1, __priority=65535)
at /usr/ports/pobj/gcc-11.2.0/gcc-11.2.0/gcc/ipa-modref-tree.h:95
#2 0x00000042fa6a2698 in _GLOBAL__sub_I__Z16dump_alias_statsP7__sFILE () at
/usr/ports/pobj/gcc-11.2.0/gcc-11.2.0/gcc/tree-ssa-alias.c:4215
#3 0x00000042f96006a4 in _start ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) disassemble
Dump of assembler code for function
_ZN8poly_intILj1ExEC1IiEERKT_+0xfffffffffcbb3c94@plt:
=> 0x00000042fca4c368 <+0>: mov %o7, %g5
0x00000042fca4c36c <+4>: call 0x42fca4c374
<_ZN8poly_intILj1ExEC1IiEERKT_+0xfffffffffcbb3c94@plt+12>
0x00000042fca4c370 <+8>: nop
0x00000042fca4c374 <+12>: ldx [ %o7 + 0x80c ], %g1
0x00000042fca4c378 <+16>: jmpl %o7 + %g1, %g1
0x00000042fca4c37c <+20>: mov %g5, %o7
End of assembler dump.
(gdb) si
0x00000042fca4c36c in _ZN8poly_intILj1ExEC1IiEERKT_+0xfffffffffcbb3c94@plt ()
(gdb) bt
#0 0x00000042fca4c36c in _ZN8poly_intILj1ExEC1IiEERKT_+0xfffffffffcbb3c94@plt
()
#1 0x00000042fa6a25c0 in __static_initialization_and_destruction_0
(__initialize_p=1, __priority=65535)
at /usr/ports/pobj/gcc-11.2.0/gcc-11.2.0/gcc/ipa-modref-tree.h:95
#2 0x00000042fa6a2698 in _GLOBAL__sub_I__Z16dump_alias_statsP7__sFILE () at
/usr/ports/pobj/gcc-11.2.0/gcc-11.2.0/gcc/tree-ssa-alias.c:4215
#3 0x00000042f96006a4 in _start ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) si
0x00000042fca4c370 in _ZN8poly_intILj1ExEC1IiEERKT_+0xfffffffffcbb3c94@plt ()
(gdb) bt
#0 0x00000042fca4c370 in _ZN8poly_intILj1ExEC1IiEERKT_+0xfffffffffcbb3c94@plt
()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) si
0x00000042fca4c374 in _ZN8poly_intILj1ExEC1IiEERKT_+0xfffffffffcbb3c94@plt ()
(gdb) bt
#0 0x00000042fca4c374 in _ZN8poly_intILj1ExEC1IiEERKT_+0xfffffffffcbb3c94@plt
()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) si
0x00000042fca4c378 in _ZN8poly_intILj1ExEC1IiEERKT_+0xfffffffffcbb3c94@plt ()
(gdb) si
Program received signal SIGSEGV, Segmentation fault.
0x00000042fca4c378 in _ZN8poly_intILj1ExEC1IiEERKT_+0xfffffffffcbb3c94@plt ()
(gdb)
tree-ssa-alias.o was compiled as:
/usr/local/bootstrap-gcc/bin/g++ -std=c++11 -c -g -DIN_GCC
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -I. -I.
-I/usr/ports/pobj/gcc-11.2.0/gcc-11.2.0/gcc
-I/usr/ports/pobj/gcc-11.2.0/gcc-11.2.0/gcc/.
-I/usr/ports/pobj/gcc-11.2.0/gcc-11.2.0/gcc/../include
-I/usr/ports/pobj/gcc-11.2.0/gcc-11.2.0/gcc/../libcpp/include
-I/usr/ports/pobj/gcc-11.2.0/gcc-11.2.0/gcc/../libcody -I/usr/local/include
-I/usr/ports/pobj/gcc-11.2.0/gcc-11.2.0/gcc/../libdecnumber
-I/usr/ports/pobj/gcc-11.2.0/gcc-11.2.0/gcc/../libdecnumber/dpd
-I../libdecnumber -I/usr/ports/pobj/gcc-11.2.0/gcc-11.2.0/gcc/../libbacktrace
-o tree-ssa-alias.o -MT tree-ssa-alias.o -MMD -MP -MF
./.deps/tree-ssa-alias.TPo
/usr/ports/pobj/gcc-11.2.0/gcc-11.2.0/gcc/tree-ssa-alias.c
.S from gcc and clang:
- https://kirill.korins.ky/pub/tree-ssa-alias.gcc.S.gz
- https://kirill.korins.ky/pub/tree-ssa-alias.clang.S.gz