public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/110787] New: [14 regression] ICE building SYSTEM.def
@ 2023-07-24  8:11 ro at gcc dot gnu.org
  2023-07-24  8:12 ` [Bug target/110787] " ro at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: ro at gcc dot gnu.org @ 2023-07-24  8:11 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110787
           Summary: [14 regression] ICE building SYSTEM.def
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
                CC: gaius at gcc dot gnu.org, sayle at gcc dot gnu.org,
                    ubizjak at gmail dot com
  Target Milestone: ---
            Target: i386-pc-solaris2.11, i686-pc-linux-gnu,
                    amd64-pc-solaris2.11, x86_64-pc-linux-gnu

Between 20230721 and 20230723, Solaris/x86 and Linux/i686 bootstrap broke
building SYSTEM.def in stage 2:

/bin/ksh /vol/gcc/src/hg/master/local/gcc/m2/tools-src/makeSystem -fpim \
             /vol/gcc/src/hg/master/local/gcc/m2/gm2-libs/SYSTEM.def \
             /vol/gcc/src/hg/master/local/gcc/m2/gm2-libs/SYSTEM.mod \
             -I/vol/gcc/src/hg/master/local/gcc/m2/gm2-libs \
             " ./gm2 -B./ -B/vol/gcc/i386-pc-solaris2.11/bin/
-L/var/gcc/regression/master/11.4-gcc/build/gcc/../ld "
/var/gcc/regression/master/11.4-gcc/build/gcc/m2/gm2-libs/SYSTEM.def
terminate called after throwing an instance of 'unsigned int'
during GIMPLE pass: cfg
/vol/gcc/src/hg/master/local/gcc/m2/gm2-libs/SYSTEM.mod: In function
‘ShiftVal’:
/vol/gcc/src/hg/master/local/gcc/m2/gm2-libs/SYSTEM.mod:77:1: internal compiler
error: Abort
   77 | BEGIN
      | ^~~~~
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://gcc.gnu.org/bugs/> for instructions.
SYSTEM module creates type: LOC
SYSTEM module creates type: WORD
SYSTEM module creates type: BYTE
SYSTEM module creates type: ADDRESS
SYSTEM module creates type: INTEGER8
SYSTEM module creates type: INTEGER16
SYSTEM module creates type: INTEGER32
SYSTEM module creates type: INTEGER64
SYSTEM module creates type: CARDINAL8
SYSTEM module creates type: CARDINAL16
SYSTEM module creates type: CARDINAL32
SYSTEM module creates type: CARDINAL64
SYSTEM module creates type: WORD16
SYSTEM module creates type: WORD32
SYSTEM module creates type: WORD64
SYSTEM module creates type: BITSET8
SYSTEM module creates type: BITSET16
SYSTEM module creates type: BITSET32
SYSTEM module creates type: REAL32
SYSTEM module creates type: REAL64
SYSTEM module creates type: REAL128
SYSTEM module creates type: COMPLEX32
SYSTEM module creates type: COMPLEX64
SYSTEM module creates type: COMPLEX128
SYSTEM module creates type: CSIZE_T
SYSTEM module creates type: CSSIZE_T
terminate called after throwing an instance of 'unsigned int'
during GIMPLE pass: cfg
/vol/gcc/src/hg/master/local/gcc/m2/gm2-libs/SYSTEM.mod: In function
‘ShiftVal’:
/vol/gcc/src/hg/master/local/gcc/m2/gm2-libs/SYSTEM.mod:77:1: internal compiler
error: Abort
   77 | BEGIN
      | ^~~~~

A reghunt identified the following patch as the culprit:

commit 59c38ddfe052a409a690380d0378169f4a3936ad
Author: Roger Sayle <roger@nextmovesoftware.com>
Date:   Sat Jul 22 21:50:06 2023 +0100

    i386: Use QImode for offsets in zero_extract/sign_extract in i386.md

It seems that the same patch also broke configuring 64-bit libphobos in
Solaris/amd64 and Linux/x86_64 builds:

configure: error: can't compile D sources!

configure:5405: /var/gcc/regression/master/11.4-gcc-64/build/./gcc/gdc
-B/var/gcc/regression/master/11.4-gcc-64/build/./gcc/
-B/vol/gcc/amd64-pc-solaris2.11/bin/ -B/vol/gcc/amd64-pc-solaris2.11/lib/
-isystem /vol/gcc/amd64-pc-solaris2.11/include -isystem
/vol/gcc/amd64-pc-solaris2.11/sys-include   -fno-checking -c -fno-druntime
-nostdinc -I /vol/gcc/src/hg/master/local/libphobos/libdruntime  -g -O2  
conftest.d >&5
<built-in>: internal compiler error: Segmentation Fault
0x1a06ffa
_D3dmd4root11stringtable__T11StringTableTCQBo10identifier10IdentifierZQBr10allocValueMFNaNbMAxaQCcZk
        /vol/gcc/src/hg/master/local/gcc/d/dmd/root/stringtable.d:260
0x1a0743f
_D3dmd4root11stringtable__T11StringTableTCQBo10identifier10IdentifierZQBr6updateMFNaNbMAxaZPSQDnQDmQDk__T11StringValueTQDaZQs
        /vol/gcc/src/hg/master/local/gcc/d/dmd/root/stringtable.d:193
0x1a07526 _D3dmd10identifier10Identifier6idPoolFNbAxabZCQBsQBrQBi
        /vol/gcc/src/hg/master/local/gcc/d/dmd/identifier.d:279
0x1a02264 Id::initialize()
        /vol/gcc/src/hg/master/local/gcc/d/dmd/id.d-mixin-36:54

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/110787] [14 regression] ICE building SYSTEM.def
  2023-07-24  8:11 [Bug target/110787] New: [14 regression] ICE building SYSTEM.def ro at gcc dot gnu.org
@ 2023-07-24  8:12 ` ro at gcc dot gnu.org
  2023-07-24  8:16 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ro at gcc dot gnu.org @ 2023-07-24  8:12 UTC (permalink / raw)
  To: gcc-bugs

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

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/110787] [14 regression] ICE building SYSTEM.def
  2023-07-24  8:11 [Bug target/110787] New: [14 regression] ICE building SYSTEM.def ro at gcc dot gnu.org
  2023-07-24  8:12 ` [Bug target/110787] " ro at gcc dot gnu.org
@ 2023-07-24  8:16 ` pinskia at gcc dot gnu.org
  2023-07-24  9:07 ` roger at nextmovesoftware dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-24  8:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I am also seeing go failures.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/110787] [14 regression] ICE building SYSTEM.def
  2023-07-24  8:11 [Bug target/110787] New: [14 regression] ICE building SYSTEM.def ro at gcc dot gnu.org
  2023-07-24  8:12 ` [Bug target/110787] " ro at gcc dot gnu.org
  2023-07-24  8:16 ` pinskia at gcc dot gnu.org
@ 2023-07-24  9:07 ` roger at nextmovesoftware dot com
  2023-07-24  9:09 ` ro at CeBiTec dot Uni-Bielefeld.DE
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: roger at nextmovesoftware dot com @ 2023-07-24  9:07 UTC (permalink / raw)
  To: gcc-bugs

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

Roger Sayle <roger at nextmovesoftware dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roger at nextmovesoftware dot com

--- Comment #2 from Roger Sayle <roger at nextmovesoftware dot com> ---
I'm bootstrapping with --enable-languages=all to investigate what's going on. 
I'll revert the patch once I (or anyone) can confirm that this restores
bootstrap, but I'd be happier understanding the actual mechanism (cause and
effect) of this ICE.  Sorry for the temporary inconvenience.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/110787] [14 regression] ICE building SYSTEM.def
  2023-07-24  8:11 [Bug target/110787] New: [14 regression] ICE building SYSTEM.def ro at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-07-24  9:07 ` roger at nextmovesoftware dot com
@ 2023-07-24  9:09 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2023-07-24 11:35 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2023-07-24  9:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #2 from Roger Sayle <roger at nextmovesoftware dot com> ---
> I'm bootstrapping with --enable-languages=all to investigate what's going on. 
> I'll revert the patch once I (or anyone) can confirm that this restores
> bootstrap, but I'd be happier understanding the actual mechanism (cause and
> effect) of this ICE.  Sorry for the temporary inconvenience.

Both i386-pc-solaris2.11 and x86_64-pc-linux-gnu bootstraps are well
into make check with the patch reverted locally.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/110787] [14 regression] ICE building SYSTEM.def
  2023-07-24  8:11 [Bug target/110787] New: [14 regression] ICE building SYSTEM.def ro at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-07-24  9:09 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2023-07-24 11:35 ` cvs-commit at gcc dot gnu.org
  2023-07-24 13:25 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-24 11:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Roger Sayle <sayle@gcc.gnu.org>:

https://gcc.gnu.org/g:9f66753ef48f37729a88735ae1a2bf2d2558e69f

commit r14-2743-g9f66753ef48f37729a88735ae1a2bf2d2558e69f
Author: Roger Sayle <roger@nextmovesoftware.com>
Date:   Mon Jul 24 12:34:23 2023 +0100

    [Committed] PR target/110787: Revert QImode offsets in {zero,sign}_extract.

    My recent patch to use QImode for bit offsets in ZERO_EXTRACTs and
    SIGN_EXTRACTs in the i386 backend shouldn't have resulted in any change
    behaviour, but as reported by Rainer it produces a bootstrap failure in
    gm2.  This reverts the problematic patch whilst we investigate the
    underlying cause.

    Committed as obvious.

    2023-07-23  Roger Sayle  <roger@nextmovesoftware.com>

    gcc/ChangeLog
            PR target/110787
            PR target/110790
            Revert patch.
            * config/i386/i386.md (extv<mode>): Use QImode for offsets.
            (extzv<mode>): Likewise.
            (insv<mode>): Likewise.
            (*testqi_ext_3): Likewise.
            (*btr<mode>_2): Likewise.
            (define_split): Likewise.
            (*btsq_imm): Likewise.
            (*btrq_imm): Likewise.
            (*btcq_imm): Likewise.
            (define_peephole2 x3): Likewise.
            (*bt<mode>): Likewise
            (*bt<mode>_mask): New define_insn_and_split.
            (*jcc_bt<mode>): Use QImode for offsets.
            (*jcc_bt<mode>_1): Delete obsolete pattern.
            (*jcc_bt<mode>_mask): Use QImode offsets.
            (*jcc_bt<mode>_mask_1): Likewise.
            (define_split): Likewise.
            (*bt<mode>_setcqi): Likewise.
            (*bt<mode>_setncqi): Likewise.
            (*bt<mode>_setnc<mode>): Likewise.
            (*bt<mode>_setncqi_2): Likewise.
            (*bt<mode>_setc<mode>_mask): New define_insn_and_split.
            (bmi2_bzhi_<mode>3): Use QImode offsets.
            (*bmi2_bzhi_<mode>3): Likewise.
            (*bmi2_bzhi_<mode>3_1): Likewise.
            (*bmi2_bzhi_<mode>3_1_ccz): Likewise.
            (@tbm_bextri_<mode>): Likewise.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/110787] [14 regression] ICE building SYSTEM.def
  2023-07-24  8:11 [Bug target/110787] New: [14 regression] ICE building SYSTEM.def ro at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-07-24 11:35 ` cvs-commit at gcc dot gnu.org
@ 2023-07-24 13:25 ` rguenth at gcc dot gnu.org
  2023-07-29 16:08 ` cvs-commit at gcc dot gnu.org
  2023-07-30 19:37 ` gaius at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-24 13:25 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/110787] [14 regression] ICE building SYSTEM.def
  2023-07-24  8:11 [Bug target/110787] New: [14 regression] ICE building SYSTEM.def ro at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-07-24 13:25 ` rguenth at gcc dot gnu.org
@ 2023-07-29 16:08 ` cvs-commit at gcc dot gnu.org
  2023-07-30 19:37 ` gaius at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-29 16:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Roger Sayle <sayle@gcc.gnu.org>:

https://gcc.gnu.org/g:e68a31549d9827030391d837951be96a5f95f291

commit r14-2866-ge68a31549d9827030391d837951be96a5f95f291
Author: Roger Sayle <roger@nextmovesoftware.com>
Date:   Sat Jul 29 17:07:58 2023 +0100

    [Committed] Use QImode for offsets in zero_extract/sign_extract in i386.md

    As suggested by Uros, this patch changes the ZERO_EXTRACTs and
SIGN_EXTRACTs
    in i386.md to consistently use QImode for bit offsets (i.e. third and
fourth
    operands), matching the use of QImode for bit counts in shifts and rotates.

    This iteration also corrects the "ne:QI" vs "eq:QI" mistake in the previous
    version, which was responsible for PR 110787 and PR 110790 and so was
    rapidly reverted last weekend.  New test cases have been added to check
    the correct behaviour.

    2023-07-29  Roger Sayle  <roger@nextmovesoftware.com>

    gcc/ChangeLog
            PR target/110790
            * config/i386/i386.md (extv<mode>): Use QImode for offsets.
            (extzv<mode>): Likewise.
            (insv<mode>): Likewise.
            (*testqi_ext_3): Likewise.
            (*btr<mode>_2): Likewise.
            (define_split): Likewise.
            (*btsq_imm): Likewise.
            (*btrq_imm): Likewise.
            (*btcq_imm): Likewise.
            (define_peephole2 x3): Likewise.
            (*bt<mode>): Likewise
            (*bt<mode>_mask): New define_insn_and_split.
            (*jcc_bt<mode>): Use QImode for offsets.
            (*jcc_bt<mode>_1): Delete obsolete pattern.
            (*jcc_bt<mode>_mask): Use QImode offsets.
            (*jcc_bt<mode>_mask_1): Likewise.
            (define_split): Likewise.
            (*bt<mode>_setcqi): Likewise.
            (*bt<mode>_setncqi): Likewise.
            (*bt<mode>_setnc<mode>): Likewise.
            (*bt<mode>_setncqi_2): Likewise.
            (*bt<mode>_setc<mode>_mask): New define_insn_and_split.
            (bmi2_bzhi_<mode>3): Use QImode offsets.
            (*bmi2_bzhi_<mode>3): Likewise.
            (*bmi2_bzhi_<mode>3_1): Likewise.
            (*bmi2_bzhi_<mode>3_1_ccz): Likewise.
            (@tbm_bextri_<mode>): Likewise.

    gcc/testsuite/ChangeLog
            PR target/110790
            * gcc.target/i386/pr110790-1.c: New test case.
            * gcc.target/i386/pr110790-2.c: Likewise.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/110787] [14 regression] ICE building SYSTEM.def
  2023-07-24  8:11 [Bug target/110787] New: [14 regression] ICE building SYSTEM.def ro at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-07-29 16:08 ` cvs-commit at gcc dot gnu.org
@ 2023-07-30 19:37 ` gaius at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: gaius at gcc dot gnu.org @ 2023-07-30 19:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Many thanks for the fix!  modula-2 bootstraps successfully on x86_32.

gcc/m2/gm2-libs/SYSTEM.mod implements arbitrary sized rotates and shifts for
the runtime (as well as export system specific procedures/types).

gcc/m2/gm2-libs/SYSTEM.mod:{ShiftVal,ShiftLeft,ShiftRight} and
gcc/m2/gm2-libs/SYSTEM.mod:{RotateVal,RotateLeft,RotateRight} for example.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-07-30 19:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-24  8:11 [Bug target/110787] New: [14 regression] ICE building SYSTEM.def ro at gcc dot gnu.org
2023-07-24  8:12 ` [Bug target/110787] " ro at gcc dot gnu.org
2023-07-24  8:16 ` pinskia at gcc dot gnu.org
2023-07-24  9:07 ` roger at nextmovesoftware dot com
2023-07-24  9:09 ` ro at CeBiTec dot Uni-Bielefeld.DE
2023-07-24 11:35 ` cvs-commit at gcc dot gnu.org
2023-07-24 13:25 ` rguenth at gcc dot gnu.org
2023-07-29 16:08 ` cvs-commit at gcc dot gnu.org
2023-07-30 19:37 ` gaius at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).