https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212

--- Comment #168 from John Paul Adrian Glaubitz <glaubitz at physik dot 
fu-berlin.de> ---
I am getting a segmentation fault when building libgcc2.c now:

/<<PKGBUILDDIR>>/build/./gcc/xgcc -B/<<PKGBUILDDIR>>/build/./gcc/
-B/usr/sh4-linux-gnu/bin/ -B/usr/sh4-linux-gnu/lib/ -isystem
/usr/sh4-linux-gnu/include -isystem /usr/sh4-linux-gnu/sys-include -isystem
/<<PKGBUILDDIR>>/build/sys-include   -fno-checking -g -O2 -O2  -g -O2 -DIN_GCC 
 -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fpic
-DNO_FPSCR_VALUES -w -Wno-sync-nand -g -DIN_LIBGCC2 -fbuilding-libgcc
-fno-stack-protector  -fpic -DNO_FPSCR_VALUES -w -Wno-sync-nand -I. -I.
-I../.././gcc -I../../../src/libgcc -I../../../src/libgcc/.
-I../../../src/libgcc/../gcc -I../../../src/libgcc/../include  -DHAVE_CC_TLS  
-o __gcc_bcmp.o -MT __gcc_bcmp.o -MD -MP -MF __gcc_bcmp.dep -DL__gcc_bcmp -c
../../../src/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
during GIMPLE pass: evrp
../../../src/libgcc/libgcc2.c: In function '__clrsbsi2':
../../../src/libgcc/libgcc2.c:760:1: internal compiler error: Segmentation
fault
  760 | }
      | ^
Unhandled trap: 0x180
pc=0x2b7e4c40 sr=0x00000001 pr=0x2b7e4c32 fpscr=0x00080004
spc=0x00000000 ssr=0x00000000 gbr=0x2b2f3c20 vbr=0x00000000
sgr=0x00000000 dbr=0x00000000 delayed_pc=0x2b7e4c32 fpul=0x00000064
r0=0x00000004 r1=0x2b9410c8 r2=0x00000005 r3=0x00000000
r4=0x001fdb3e r5=0x001fdb3e r6=0x00000006 r7=0x0000011c
r8=0x2b9410bc r9=0x00000468 r10=0x2b2f3760 r11=0x01480400
r12=0x2b940c60 r13=0x2b2a5c8c r14=0x2b2a5ccc r15=0x2b2a5634
r16=0x00000000 r17=0x00000000 r18=0x00000000 r19=0x00000000
r20=0x00000000 r21=0x00000000 r22=0x00000000 r23=0x00000000
make[5]: *** [Makefile:508: _clrsbsi2.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory '/<<PKGBUILDDIR>>/build/sh4-linux-gnu/libgcc'
make[4]: *** [Makefile:18852: all-stage2-target-libgcc] Error 2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/build'
make[3]: *** [Makefile:24459: stage2-bubble] Error 2
make[3]: Leaving directory '/<<PKGBUILDDIR>>/build'
make[2]: *** [Makefile:24663: bootstrap] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>/build'

This is with the following patches applied on top of gcc-14:

- 58832
- 58833
- 58883
- 58905

I also had to disable Ada for the time being which failed with:

/<<PKGBUILDDIR>>/build/./prev-gcc/xgcc -B/<<PKGBUILDDIR>>/build/./prev-gcc/
-B/usr/sh4-linux-gnu/bin/ -B/usr/sh4-linux-gnu/bin/ -B/usr/sh4-linux-gnu/lib/
-isystem /usr/sh4-linux-gnu/include -isystem /usr/sh4-linux-gnu/sys-include
-isystem /<<PKGBUILDDIR>>/build/sys-include   -fno-checking -c -g -O2
-fno-checking -gtoggle  -gnatpg  -W -Wall -fno-PIE -nostdinc -I- -I. -Iada/gen
erated -Iada -I../../src/gcc/ada -Iada/libgnat -I../../src/gcc/ada/libgnat
-Iada/gcc-interface -I../../src/gcc/ada/gcc-interface
../../src/gcc/ada/libgnat/s-except.adb -o ada/libgnat/s-except.o
mkdir -p ada/libgnat/
/<<PKGBUILDDIR>>/build/./prev-gcc/xgcc -B/<<PKGBUILDDIR>>/build/./prev-gcc/
-B/usr/sh4-linux-gnu/bin/ -B/usr/sh4-linux-gnu/bin/ -B/usr/sh4-linux-gnu/lib/
-isystem /usr/sh4-linux-gnu/include -isystem /usr/sh4-linux-gnu/sys-include
-isystem /<<PKGBUILDDIR>>/build/sys-include   -fno-checking -c -g -O2
-fno-checking -gtoggle  -gnatpg  -W -Wall -fno-PIE -nostdinc -I- -I. -Iada/gen
erated -Iada -I../../src/gcc/ada -Iada/libgnat -I../../src/gcc/ada/libgnat
-Iada/gcc-interface -I../../src/gcc/ada/gcc-interface ada/libgnat/s-excmac.adb
-o ada/libgnat/s-excmac.o
mkdir -p ada/libgnat/
/<<PKGBUILDDIR>>/build/./prev-gcc/xgcc -B/<<PKGBUILDDIR>>/build/./prev-gcc/
-B/usr/sh4-linux-gnu/bin/ -B/usr/sh4-linux-gnu/bin/ -B/usr/sh4-linux-gnu/lib/
-isystem /usr/sh4-linux-gnu/include -isystem /usr/sh4-linux-gnu/sys-include
-isystem /<<PKGBUILDDIR>>/build/sys-include   -fno-checking -c -g -O2
-fno-checking -gtoggle  -gnatpg  -W -Wall -fno-PIE -nostdinc -I- -I. -Iada/gen
erated -Iada -I../../src/gcc/ada -Iada/libgnat -I../../src/gcc/ada/libgnat
-Iada/gcc-interface -I../../src/gcc/ada/gcc-interface
../../src/gcc/ada/libgnat/s-exctab.adb -o ada/libgnat/s-exctab.o
during RTL pass: subreg1
+===========================GNAT BUG DETECTED==============================+
| 14.2.0 (sh4-linux-gnu) GCC error:                                        |
| in decompose_multiword_subregs, at lower-subreg.cc:1728                  |
| Error detected around ../../src/gcc/ada/libgnat/a-exexda.adb:312:8       |
| Compiling ../../src/gcc/ada/libgnat/a-except.adb                         |
| Please submit a bug report; see https://gcc.gnu.org/bugs/ .              |
| Use a subject line meaningful to you and us to track the bug.            |
| Include the entire contents of this bug box in the report.               |
| Include the exact command that you entered.                              |
| Also include sources listed below.                                       |
+==========================================================================+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.
Consider also -gnatd.n switch (see debug.adb).

../../src/gcc/ada/gcc-interface/system.ads
../../src/gcc/ada/libgnat/a-except.adb
../../src/gcc/ada/libgnat/a-except.ads
../../src/gcc/ada/libgnat/ada.ads
../../src/gcc/ada/libgnat/s-parame.ads
../../src/gcc/ada/libgnat/s-stalib.ads
../../src/gcc/ada/libgnat/a-unccon.ads
../../src/gcc/ada/libgnat/s-traent.ads
../../src/gcc/ada/libgnat/s-except.ads
../../src/gcc/ada/libgnat/s-excdeb.ads
../../src/gcc/ada/libgnat/s-soflin.ads
../../src/gcc/ada/libgnat/s-secsta.ads
../../src/gcc/ada/libgnat/s-stoele.ads
../../src/gcc/ada/libgnat/s-stache.ads
../../src/gcc/ada/libgnat/s-wchcon.ads
../../src/gcc/ada/libgnat/s-wchstw.ads
../../src/gcc/ada/libgnat/s-traceb.ads
../../src/gcc/ada/libgnat/s-trasym.ads
../../src/gcc/ada/libgnat/s-exctab.ads
../../src/gcc/ada/libgnat/a-excach.adb
../../src/gcc/ada/libgnat/a-exexda.adb
../../src/gcc/ada/libgnat/a-exexpr.adb
../../src/gcc/ada/libgnat/a-uncdea.ads
ada/libgnat/s-excmac.ads
../../src/gcc/ada/libgnat/a-exextr.adb
../../src/gcc/ada/libgnat/a-elchha.ads
../../src/gcc/ada/libgnat/s-imgint.ads
../../src/gcc/ada/libgnat/s-imagei.ads
../../src/gcc/ada/libgnat/s-vaispe.ads
../../src/gcc/ada/libgnat/s-vauspe.ads
../../src/gcc/ada/libgnat/s-valspe.ads
../../src/gcc/ada/libgnat/s-unstyp.ads
../../src/gcc/ada/libgnat/s-vs_int.ads
../../src/gcc/ada/libgnat/s-vs_uns.ads
../../src/gcc/ada/libgnat/a-exstat.adb


raised TYPES.UNRECOVERABLE_ERROR : comperr.adb:412
mkdir -p ada/libgnat/
make[5]: *** [../../src/gcc/ada/gcc-interface/Make-lang.in:1174:
ada/libgnat/a-except.o] Error 1
make[5]: *** Waiting for unfinished jobs....
/<<PKGBUILDDIR>>/build/./prev-gcc/xgcc -B/<<PKGBUILDDIR>>/build/./prev-gcc/
-B/usr/sh4-linux-gnu/bin/ -B/usr/sh4-linux-gnu/bin/ -B/usr/sh4-linux-gnu/lib/
-isystem /usr/sh4-linux-gnu/include -isystem /usr/sh4-linux-gnu/sys-include
-isystem /<<PKGBUILDDIR>>/build/sys-include   -fno-checking -c -g -O2
-fno-checking -gtoggle  -gnatpg  -W -Wall -fno-PIE -nostdinc -I- -I.
-Iada/generated -Iada -I../../src/gcc/ada -Iada/libgnat
-I../../src/gcc/ada/libgnat -Iada/gcc-interface
-I../../src/gcc/ada/gcc-interface ../../src/gcc/ada/libgnat/s-htable.adb -o
ada/libgnat/s-htable.o
../../src/gcc/ada/uintp.adb: In function 'Uintp.Ui_Mul':
../../src/gcc/ada/uintp.adb:2030:27: warning: '(*l_vec.461_50)[1]{lb: 1 sz: 4}'
may be used uninitialized [-Wmaybe-uninitialized]
../../src/gcc/ada/sem_res.adb: In function
'Sem_Res.Resolve_Selected_Component':
../../src/gcc/ada/sem_res.adb:11254:10: warning: 'it1.typ' may be used
uninitialized [-Wmaybe-uninitialized]
../../src/gcc/ada/sem_res.adb:11144:7: note: 'it1.typ' was declared here
rm gcc.pod gfortran.pod lto-dump.pod
make[5]: Leaving directory '/<<PKGBUILDDIR>>/build/gcc'
make[4]: *** [Makefile:5093: all-stage2-gcc] Error 2
make[4]: Leaving directory '/<<PKGBUILDDIR>>/build'
make[3]: *** [Makefile:25185: stage2-bubble] Error 2
make[3]: Leaving directory '/<<PKGBUILDDIR>>/build'
make[2]: *** [Makefile:25389: bootstrap] Error 2
make[2]: Leaving directory '/<<PKGBUILDDIR>>/build'

Trying with gcc-15 now.

Reply via email to