public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/90275] [8/9 Regression] ICE: in insert_regs, at cse.c:1128 with -O2 -fno-dce -fno-tree-dce
       [not found] <bug-90275-4@http.gcc.gnu.org/bugzilla/>
@ 2020-03-12 22:14 ` law at redhat dot com
  2020-03-13  9:11 ` marxin at gcc dot gnu.org
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: law at redhat dot com @ 2020-03-12 22:14 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[8/9/10 Regression] ICE: in |[8/9 Regression] ICE: in
                   |insert_regs, at cse.c:1128  |insert_regs, at cse.c:1128
                   |with -O2 -fno-dce           |with -O2 -fno-dce
                   |-fno-tree-dce               |-fno-tree-dce

--- Comment #12 from Jeffrey A. Law <law at redhat dot com> ---
This should be fixed on the trunk now.  The patch could be safely backported to
the release branches if someone was interested.

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

* [Bug rtl-optimization/90275] [8/9 Regression] ICE: in insert_regs, at cse.c:1128 with -O2 -fno-dce -fno-tree-dce
       [not found] <bug-90275-4@http.gcc.gnu.org/bugzilla/>
  2020-03-12 22:14 ` [Bug rtl-optimization/90275] [8/9 Regression] ICE: in insert_regs, at cse.c:1128 with -O2 -fno-dce -fno-tree-dce law at redhat dot com
@ 2020-03-13  9:11 ` marxin at gcc dot gnu.org
  2020-03-18 22:08 ` cvs-commit at gcc dot gnu.org
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-03-13  9:11 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org

--- Comment #13 from Martin Liška <marxin at gcc dot gnu.org> ---
commit r10-7149-g4aded535ea6ad7c362ab62d99af70e53c186d582
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Thu Mar 12 16:09:27 2020 -0600

    Remove no-op register to register copies in CSE just like we remove no-op
memory to memory copies.

            PR rtl-optimization/90275
            * cse.c (cse_insn): Delete no-op register moves too.

            PR rtl-optimization/90275
            * gcc.c-torture/compile/pr90275.c: New test.

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

* [Bug rtl-optimization/90275] [8/9 Regression] ICE: in insert_regs, at cse.c:1128 with -O2 -fno-dce -fno-tree-dce
       [not found] <bug-90275-4@http.gcc.gnu.org/bugzilla/>
  2020-03-12 22:14 ` [Bug rtl-optimization/90275] [8/9 Regression] ICE: in insert_regs, at cse.c:1128 with -O2 -fno-dce -fno-tree-dce law at redhat dot com
  2020-03-13  9:11 ` marxin at gcc dot gnu.org
@ 2020-03-18 22:08 ` cvs-commit at gcc dot gnu.org
  2020-03-23 23:59 ` cvs-commit at gcc dot gnu.org
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-18 22:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jeff Law <law@gcc.gnu.org>:

https://gcc.gnu.org/g:529ea7d9596b26ba103578eeab448e9862a2d2c5

commit r10-7268-g529ea7d9596b26ba103578eeab448e9862a2d2c5
Author: Jeff Law <law@redhat.com>
Date:   Wed Mar 18 16:07:28 2020 -0600

    Complete change to resolve pr90275.

            PR rtl-optimization/90275
            * cse.c (cse_insn): Delete no-op register moves too.

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

* [Bug rtl-optimization/90275] [8/9 Regression] ICE: in insert_regs, at cse.c:1128 with -O2 -fno-dce -fno-tree-dce
       [not found] <bug-90275-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-03-18 22:08 ` cvs-commit at gcc dot gnu.org
@ 2020-03-23 23:59 ` cvs-commit at gcc dot gnu.org
  2020-03-25 20:13 ` cvs-commit at gcc dot gnu.org
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-23 23:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jeff Law <law@gcc.gnu.org>:

https://gcc.gnu.org/g:75fb811dfaa29d60a897924b0d1629577b90eee7

commit r10-7346-g75fb811dfaa29d60a897924b0d1629577b90eee7
Author: Jeff Law <law@redhat.com>
Date:   Mon Mar 23 17:55:20 2020 -0600

    Verify the code used for the optimized comparison is valid for the
comparison's mode.

            PR rtl-optimization/90275
            PR target/94238
            PR target/94144
            * simplify-rtx.c (comparison_code_valid_for_mode): New function.
            (simplify_logical_relational_operation): Use it.

            PR target/94144
            PR target/94238
            * gcc.c-torture/compile/pr94144.c: New test.
            * gcc.c-torture/compile/pr94238.c: New test.

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

* [Bug rtl-optimization/90275] [8/9 Regression] ICE: in insert_regs, at cse.c:1128 with -O2 -fno-dce -fno-tree-dce
       [not found] <bug-90275-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2020-03-23 23:59 ` cvs-commit at gcc dot gnu.org
@ 2020-03-25 20:13 ` cvs-commit at gcc dot gnu.org
  2020-03-25 20:33 ` cvs-commit at gcc dot gnu.org
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-25 20:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jeff Law <law@gcc.gnu.org>:

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

commit r10-7383-geeb0c7c07133634eb5e98ba0348392684a763c95
Author: Jeff Law <law@redhat.com>
Date:   Wed Mar 25 14:12:32 2020 -0600

    Fix vector-compare-1 regressions on sh4/sh4eb caused by pattern clobbering
T reg without expressing that in its RTL.

            PR rtl-optimization/90275
            * config/sh/sh.md (mov_neg_si_t): Clobber the T register in the
            pattern.

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

* [Bug rtl-optimization/90275] [8/9 Regression] ICE: in insert_regs, at cse.c:1128 with -O2 -fno-dce -fno-tree-dce
       [not found] <bug-90275-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2020-03-25 20:13 ` cvs-commit at gcc dot gnu.org
@ 2020-03-25 20:33 ` cvs-commit at gcc dot gnu.org
  2020-04-02 20:43 ` dcb314 at hotmail dot com
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-25 20:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #17 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jeff Law <law@gcc.gnu.org>:

https://gcc.gnu.org/g:48817fbd7616f086ac7bb1dd38b862f78762c9b8

commit r10-7384-g48817fbd7616f086ac7bb1dd38b862f78762c9b8
Author: Jeff Law <law@redhat.com>
Date:   Wed Mar 25 14:33:08 2020 -0600

        Fix vector-compare-1 regressions on sh4/sh4eb caused by pattern
clobbering T reg without expressing that in its RTL.

                PR rtl-optimization/90275
                * config/sh/sh.md (mov_neg_si_t): Clobber the T register in the
                pattern.

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

* [Bug rtl-optimization/90275] [8/9 Regression] ICE: in insert_regs, at cse.c:1128 with -O2 -fno-dce -fno-tree-dce
       [not found] <bug-90275-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2020-03-25 20:33 ` cvs-commit at gcc dot gnu.org
@ 2020-04-02 20:43 ` dcb314 at hotmail dot com
  2020-04-03  7:18 ` [Bug rtl-optimization/90275] [8/9/10 " marxin at gcc dot gnu.org
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: dcb314 at hotmail dot com @ 2020-04-02 20:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from David Binderman <dcb314 at hotmail dot com> ---
For this C code:

a() {
  short *b;
  short c;
  long long *d = a;
  for (;;) {
    long long *e = a;
    (*d *= *e - c) / *b ?: (*b = 0);
  }
}

on this week's raspberry pi C cross compiler, with flag -O2, does this:

$ /home/dcb/raspberrypi/results/bin/arm-linux-gnueabihf-gcc -c -w -O2
testFile.97.c
during RTL pass: cse_local
testFile.97.c: In function ‘a’:
testFile.97.c:9:1: internal compiler error: in insert_regs, at cse.c:1128
    9 | }
      | ^
0x7e5b19 insert_regs
        /home/dcb/gcc/trunk.git/gcc/cse.c:1128
0x17ab64b cse_insn
        /home/dcb/gcc/trunk.git/gcc/cse.c:5956
0x17ade1d cse_extended_basic_block
        /home/dcb/gcc/trunk.git/gcc/cse.c:6614
0x17ade1d cse_main
        /home/dcb/gcc/trunk.git/gcc/cse.c:6793

This code works on x86, so something arm specific is happening.

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

* [Bug rtl-optimization/90275] [8/9/10 Regression] ICE: in insert_regs, at cse.c:1128 with -O2 -fno-dce -fno-tree-dce
       [not found] <bug-90275-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2020-04-02 20:43 ` dcb314 at hotmail dot com
@ 2020-04-03  7:18 ` marxin at gcc dot gnu.org
  2020-04-06 20:57 ` law at redhat dot com
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-04-03  7:18 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[8/9 Regression] ICE: in    |[8/9/10 Regression] ICE: in
                   |insert_regs, at cse.c:1128  |insert_regs, at cse.c:1128
                   |with -O2 -fno-dce           |with -O2 -fno-dce
                   |-fno-tree-dce               |-fno-tree-dce

--- Comment #19 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, it really fails with current master.

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

* [Bug rtl-optimization/90275] [8/9/10 Regression] ICE: in insert_regs, at cse.c:1128 with -O2 -fno-dce -fno-tree-dce
       [not found] <bug-90275-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2020-04-03  7:18 ` [Bug rtl-optimization/90275] [8/9/10 " marxin at gcc dot gnu.org
@ 2020-04-06 20:57 ` law at redhat dot com
  2020-04-06 22:52 ` law at redhat dot com
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: law at redhat dot com @ 2020-04-06 20:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from Jeffrey A. Law <law at redhat dot com> ---
90275, the gift that keeps giving.   While the failure is similar, this feels
slightly different.

In this case we've got:

(insn 60 54 61 4 (parallel [
            (set (reg:CC 100 cc)
                (compare:CC (reg:SI 252 [ _5 ])
                    (const_int 0 [0])))
            (set (reg:SI 256 [ _5 ])
                (reg:SI 252 [ _5 ]))
        ]) "j.c":8:15 248 {*movsi_compare0}
     (expr_list:REG_UNUSED (reg:SI 256 [ _5 ])
        (nil)))


That gets (reg 252) into the tables.  We invalidate it when we hit this insn in
the same block:

(insn 65 64 66 4 (parallel [
            (set (reg:SI 252 [ _5 ])
                (mult:SI (reg:SI 252 [ _5 ])
                    (reg:SI 252 [ _5 ])))
            (set (reg:SI 253 [ _5+4 ])
                (truncate:SI (lshiftrt:DI (mult:DI (zero_extend:DI (reg:SI 252
[ _5 ]))
                            (zero_extend:DI (reg:SI 252 [ _5 ])))
                        (const_int 32 [0x20]))))
        ]) "j.c":8:9 68 {umull}
     (nil))

We then trigger the assert when handling this insn from the block:

(insn 174 173 175 4 (set (reg:SI 0 r0)
        (reg:SI 252 [ _5 ])) "j.c":8:20 241 {*arm_movsi_insn}
     (nil))

At the point where we simplify insn 60 into the form above, we don't know the
destination of the second set is unused.  That's not exposed until cse2 and I'm
not terribly inclined to do the DF analysis earlier and try to split that insn.

I'm not sure of the best fix here, nor is it clear why we're having so much
trouble with this code.  The real guts of this code hasn't changed materially
in decades.

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

* [Bug rtl-optimization/90275] [8/9/10 Regression] ICE: in insert_regs, at cse.c:1128 with -O2 -fno-dce -fno-tree-dce
       [not found] <bug-90275-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2020-04-06 20:57 ` law at redhat dot com
@ 2020-04-06 22:52 ` law at redhat dot com
  2020-04-17 21:41 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: law at redhat dot com @ 2020-04-06 22:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #21 from Jeffrey A. Law <law at redhat dot com> ---
So we may be able to address this by setting "do_not_record" if we have
multiple sets in an insn, one of which is a reg->reg copy to a destination that
is mentioned in a REG_UNUSED note.  We'd only need to set it when processing
the set with the destination referenced in the REG_UNUSED note.

If the sets were in different insns, then the reg->reg copy with an unused
destination would be removed as dead.

If the source of the set were anything but a register, then we wouldn't be
getting into the insert_regs routine with the validation check we're tripping.

I suspect there's still a problem if we have multiple sets, one of which is a
nop set.  We may want to proactively address this case too, even if we don't
have a C testcase which triggers it.

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

* [Bug rtl-optimization/90275] [8/9/10 Regression] ICE: in insert_regs, at cse.c:1128 with -O2 -fno-dce -fno-tree-dce
       [not found] <bug-90275-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2020-04-06 22:52 ` law at redhat dot com
@ 2020-04-17 21:41 ` cvs-commit at gcc dot gnu.org
  2021-05-04 12:32 ` [Bug rtl-optimization/90275] [8/9 " rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-17 21:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #22 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jeff Law <law@gcc.gnu.org>:

https://gcc.gnu.org/g:3737ccc424c56a2cecff202dd79f88d28850eeb2

commit r10-7781-g3737ccc424c56a2cecff202dd79f88d28850eeb2
Author: Jeff Law <law@redhat.com>
Date:   Fri Apr 17 15:38:13 2020 -0600

    [committed] [PR rtl-optimization/90275] Another 90275 related cse.c fix

    This time instead of having a NOP copy insn that we can completely ignore
and
    ultimately remove, we have a NOP set within a multi-set PARALLEL.  It
triggers,
    the same failure when the source of such a set is a hard register for the
same
    reasons as we've already noted in the BZ and patches-to-date.

    For prior cases we've been able to mark the insn as a nop set and ignore it
for
    the rest of cse_insn, ultimately removing it.  That's not really an option
here
    as there are other sets that we have to preserve.

    We might be able to fix this instance by splitting the multi-set insn, but
I'm
    not keen to introduce splitting into cse.  Furthermore, the target may not
be
    able to split the insn.  So I considered this is non-starter.

    What I finally settled on was to use the existing do_not_record machinery
to
    ignore the nop set within the parallel (and only that set within the
parallel).

    One might argue that we should always ignore a REG_UNUSED set.  But I
rejected
    that idea -- we could have cse-able divmod insns where the first had a
    REG_UNUSED note for a destination, but the second did not.

    One might also argue that we could have a nop set without a REG_UNUSED in a
    multi-set parallel and thus we could trigger yet another insert_regs ICE at
    some point.  I tend to think this is a possibility.  If we see this happen,
    we'll have to revisit.

            PR rtl-optimization/90275
            * cse.c (cse_insn): Avoid recording nop sets in multi-set parallels
            when the destination has a REG_UNUSED note.

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

* [Bug rtl-optimization/90275] [8/9 Regression] ICE: in insert_regs, at cse.c:1128 with -O2 -fno-dce -fno-tree-dce
       [not found] <bug-90275-4@http.gcc.gnu.org/bugzilla/>
                   ` (10 preceding siblings ...)
  2020-04-17 21:41 ` cvs-commit at gcc dot gnu.org
@ 2021-05-04 12:32 ` rguenth at gcc dot gnu.org
  2021-05-14  9:51 ` [Bug rtl-optimization/90275] [9 " jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-04 12:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

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

* [Bug rtl-optimization/90275] [9 Regression] ICE: in insert_regs, at cse.c:1128 with -O2 -fno-dce -fno-tree-dce
       [not found] <bug-90275-4@http.gcc.gnu.org/bugzilla/>
                   ` (11 preceding siblings ...)
  2021-05-04 12:32 ` [Bug rtl-optimization/90275] [8/9 " rguenth at gcc dot gnu.org
@ 2021-05-14  9:51 ` jakub at gcc dot gnu.org
  2021-06-01  8:14 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-14  9:51 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|8.5                         |9.4

--- Comment #23 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 8 branch is being closed.

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

* [Bug rtl-optimization/90275] [9 Regression] ICE: in insert_regs, at cse.c:1128 with -O2 -fno-dce -fno-tree-dce
       [not found] <bug-90275-4@http.gcc.gnu.org/bugzilla/>
                   ` (12 preceding siblings ...)
  2021-05-14  9:51 ` [Bug rtl-optimization/90275] [9 " jakub at gcc dot gnu.org
@ 2021-06-01  8:14 ` rguenth at gcc dot gnu.org
  2021-09-28 14:50 ` dcb314 at hotmail dot com
  2022-05-27  8:32 ` rguenth at gcc dot gnu.org
  15 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01  8:14 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.4                         |9.5

--- Comment #24 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.

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

* [Bug rtl-optimization/90275] [9 Regression] ICE: in insert_regs, at cse.c:1128 with -O2 -fno-dce -fno-tree-dce
       [not found] <bug-90275-4@http.gcc.gnu.org/bugzilla/>
                   ` (13 preceding siblings ...)
  2021-06-01  8:14 ` rguenth at gcc dot gnu.org
@ 2021-09-28 14:50 ` dcb314 at hotmail dot com
  2022-05-27  8:32 ` rguenth at gcc dot gnu.org
  15 siblings, 0 replies; 16+ messages in thread
From: dcb314 at hotmail dot com @ 2021-09-28 14:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #25 from David Binderman <dcb314 at hotmail dot com> ---
This C source code:

$ more bug761.c
long a;
int b, c, e;
signed char d;
void f() {
  long long g = 105230154306549745590;
  b = (c ?: (d %= 11 * g)) + (e &= g += c);
  a = 5;
  for (; a <= 8;) {
    g = b != d ? e : g || (5 ? e = 1 : 0);
    a %= 0 < 0 / 0;
  }
}
pi@raspberrypi:~/creduce $ 

on recent gcc trunk on ARM and flag -O2, does this:

$ ../gcc/results/bin/arm-linux-gnueabihf-gcc -c -w -O2 bug761.c 
during RTL pass: cse_local
bug761.c: In function \u2018f\u2019:
bug761.c:12:1: internal compiler error: in insert_regs, at cse.c:1113
   12 | }
      | ^
0x16cd73f insert_regs(rtx_def*, table_elt*, int)
        ../../trunk/gcc/cse.c:1113
0x16c9d9f cse_insn(rtx_insn*)
        ../../trunk/gcc/cse.c:5926

...

$ ../gcc/results/bin/arm-linux-gnueabihf-gcc -v
Using built-in specs.
COLLECT_GCC=../gcc/results/bin/arm-linux-gnueabihf-gcc
COLLECT_LTO_WRAPPER=/home/pi/gcc/results.20210928/libexec/gcc/arm-linux-gnueabihf/12.0.0/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../trunk/configure --prefix=/home/pi/gcc/results.20210928
--disable-bootstrap --disable-multilib --disable-werror
--with-pkgversion=9cfb95f9b92326e8 --enable-checking=yes
--enable-languages=c,c++,fortran --with-cpu=cortex-a72 --with-fpu=neon-fp-armv8
--with-float=hard --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf
--target=arm-linux-gnueabihf
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210928 (experimental) (9cfb95f9b92326e8) 

I don't have a git revision where it works ok. Sorry.

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

* [Bug rtl-optimization/90275] [9 Regression] ICE: in insert_regs, at cse.c:1128 with -O2 -fno-dce -fno-tree-dce
       [not found] <bug-90275-4@http.gcc.gnu.org/bugzilla/>
                   ` (14 preceding siblings ...)
  2021-09-28 14:50 ` dcb314 at hotmail dot com
@ 2022-05-27  8:32 ` rguenth at gcc dot gnu.org
  15 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  8:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|10.0                        |9.5.0
   Target Milestone|9.5                         |10.0
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #26 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed in GCC 10.

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

end of thread, other threads:[~2022-05-27  8:32 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-90275-4@http.gcc.gnu.org/bugzilla/>
2020-03-12 22:14 ` [Bug rtl-optimization/90275] [8/9 Regression] ICE: in insert_regs, at cse.c:1128 with -O2 -fno-dce -fno-tree-dce law at redhat dot com
2020-03-13  9:11 ` marxin at gcc dot gnu.org
2020-03-18 22:08 ` cvs-commit at gcc dot gnu.org
2020-03-23 23:59 ` cvs-commit at gcc dot gnu.org
2020-03-25 20:13 ` cvs-commit at gcc dot gnu.org
2020-03-25 20:33 ` cvs-commit at gcc dot gnu.org
2020-04-02 20:43 ` dcb314 at hotmail dot com
2020-04-03  7:18 ` [Bug rtl-optimization/90275] [8/9/10 " marxin at gcc dot gnu.org
2020-04-06 20:57 ` law at redhat dot com
2020-04-06 22:52 ` law at redhat dot com
2020-04-17 21:41 ` cvs-commit at gcc dot gnu.org
2021-05-04 12:32 ` [Bug rtl-optimization/90275] [8/9 " rguenth at gcc dot gnu.org
2021-05-14  9:51 ` [Bug rtl-optimization/90275] [9 " jakub at gcc dot gnu.org
2021-06-01  8:14 ` rguenth at gcc dot gnu.org
2021-09-28 14:50 ` dcb314 at hotmail dot com
2022-05-27  8:32 ` rguenth 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).