Bug 89116 - [11/12/13/14 Regression] ICE in cfg_layout_redirect_edge_and_branch_force, at cfgrtl.c:4482
Summary: [11/12/13/14 Regression] ICE in cfg_layout_redirect_edge_and_branch_force, at...
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 9.0
: P2 normal
Target Milestone: 11.5
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on: 85408
Blocks: 90040
  Show dependency treegraph
 
Reported: 2019-01-30 12:30 UTC by Arseny Solokha
Modified: 2023-07-07 10:34 UTC (History)
3 users (show)

See Also:
Host:
Target: powerpc-*-linux-gnu*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2019-01-30 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arseny Solokha 2019-01-30 12:30:17 UTC
gfortran-9.0.0-alpha20190127 snapshot (r268327) ICEs when compiling the following snippet reduced from gcc/testsuite/gfortran.dg/mvbits_7.f90 w/ -O1 -floop-parallelize-all -fmodulo-sched -fmodulo-sched-allow-regmoves -freorder-blocks-and-partition -ftree-parallelize-loops=2 -fno-inline -fno-move-loop-invariants -fno-sched-pressure:

  type t
    integer  ::  I
    character(9)  :: chr
  end type
  type(t) :: x(4,3)
  call foo (x)
contains
  SUBROUTINE foo (x)
    TYPE(t) x(4, 3)
    x%i = x%i * 2
  END SUBROUTINE
end

% powerpc-e300c3-linux-gnu-gfortran-9.0.0-alpha20190127 -O1 -floop-parallelize-all -fmodulo-sched -fmodulo-sched-allow-regmoves -freorder-blocks-and-partition -ftree-parallelize-loops=2 -fno-inline -fno-move-loop-invariants -fno-sched-pressure -c l8jqrtst.f90
during RTL pass: sms
f951: internal compiler error: in cfg_layout_redirect_edge_and_branch_force, at cfgrtl.c:4482
0x5a6108 cfg_layout_redirect_edge_and_branch_force
	/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190127/work/gcc-9-20190127/gcc/cfgrtl.c:4482
0x94c145 redirect_edge_and_branch_force(edge_def*, basic_block_def*)
	/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190127/work/gcc-9-20190127/gcc/cfghooks.c:486
0x95fb4e cfg_layout_split_edge
	/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190127/work/gcc-9-20190127/gcc/cfgrtl.c:4742
0x94c46f split_edge(edge_def*)
	/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190127/work/gcc-9-20190127/gcc/cfghooks.c:648
0xc0aa22 split_edge_and_insert(edge_def*, rtx_insn*)
	/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190127/work/gcc-9-20190127/gcc/loop-unroll.c:759
0x156ac09 generate_prolog_epilog
	/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190127/work/gcc-9-20190127/gcc/modulo-sched.c:1159
0x156ac09 sms_schedule
	/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190127/work/gcc-9-20190127/gcc/modulo-sched.c:1739
0x156b61f execute
	/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-9.0.0_alpha20190127/work/gcc-9-20190127/gcc/modulo-sched.c:3337

In fact it can be a duplicate of PR85408 or PR87329 both of which I cannot reproduce anymore, or PR85426 which probably tracks two different issues already.
Comment 1 Jakub Jelinek 2019-01-30 16:07:01 UTC
Started with r254832.  Likely latent before.
Comment 2 Jakub Jelinek 2019-01-31 13:59:51 UTC
Yeah, this is the same bug as PR85408.  I haven't heard from Honza any comments on https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85408#c2
Honza?
Comment 3 Jakub Jelinek 2019-02-22 15:18:35 UTC
GCC 8.3 has been released.
Comment 4 Jakub Jelinek 2020-03-04 09:40:02 UTC
GCC 8.4.0 has been released, adjusting target milestone.
Comment 5 Nicholas Krause 2020-03-18 05:07:38 UTC
PR84508 does not seem to be reproducible on trunk now as last commented by Arseny on trunk. Not sure about backporting a fix but does not seem to happen on trunk for now.
Comment 6 Arseny Solokha 2020-03-18 05:31:25 UTC
(In reply to Nicholas Krause from comment #5)
> PR84508 does not seem to be reproducible on trunk now as last commented by
> Arseny on trunk. Not sure about backporting a fix but does not seem to
> happen on trunk for now.

PR85408, you mean. Sure, but why post it here? It is PR89116, not PR85408. The latter is tracked in PR90040 by the modulo scheduler maintainer, and he's perfectly aware of that. But one generally cannot simply close random PRs they seemingly cannot reproduce anymore (and it seems you even didn't try to reproduce it yourself), well-established GCC development process doesn't work that way, and the whole issue w/ the modulo scheduler is not so trivial anyway, so all those PRs are there for a reason.
Comment 7 Nicholas Krause 2020-03-18 05:44:07 UTC
(In reply to Arseny Solokha from comment #6)
> (In reply to Nicholas Krause from comment #5)
> > PR84508 does not seem to be reproducible on trunk now as last commented by
> > Arseny on trunk. Not sure about backporting a fix but does not seem to
> > happen on trunk for now.
> 
> PR85408, you mean. Sure, but why post it here? It is PR89116, not PR85408.
> The latter is tracked in PR90040 by the modulo scheduler maintainer, and
> he's perfectly aware of that. But one generally cannot simply close random
> PRs they seemingly cannot reproduce anymore (and it seems you even didn't
> try to reproduce it yourself), well-established GCC development process
> doesn't work that way, and the whole issue w/ the modulo scheduler is not so
> trivial anyway, so all those PRs are there for a reason.

Sorry I see it now that this does block 90040 so it makes more sense now. My mistake as I thought this was just a duplicate and not a set of bugs.
Comment 8 Jakub Jelinek 2021-05-14 09:51:15 UTC
GCC 8 branch is being closed.
Comment 9 Richard Biener 2021-06-01 08:13:00 UTC
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
Comment 10 Richard Biener 2022-05-27 09:40:09 UTC
GCC 9 branch is being closed
Comment 11 Jakub Jelinek 2022-06-28 10:36:35 UTC
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
Comment 12 Richard Biener 2023-07-07 10:34:46 UTC
GCC 10 branch is being closed.