[Bug tree-optimization/126919] [17 Regression] ICE in gimple_phi_arg_def_from_edge in gcc/gimpl.h

"rguenth at gcc dot gnu.org via Gcc-bugs" <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126919

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |17.0
          Component|c                           |tree-optimization
                 CC|                            |aldyh at gcc dot gnu.org,
                   |                            |amacleod at redhat dot com
   Last reconfirmed|                            |2026-08-18
             Status|UNCONFIRMED                 |WAITING
           Keywords|                            |ice-on-valid-code
     Ever confirmed|0                           |1
            Summary|ICE in                      |[17 Regression] ICE in
                   |gimple_phi_arg_def_from_edg |gimple_phi_arg_def_from_edg
                   |e in gcc/gimpl.h            |e in gcc/gimpl.h

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I suspect that there isn't an edge from prev to bb, but w/o preprocessed source
it's hard to say.  Probably prev_bb () is odd?

  basic_block bb = gimple_bb (phi);
  basic_block prev = prev_bb ();
  edge e_in = find_edge (prev, bb);
  // The incoming edge the path supplies is never abnormal, so the
  // argument on it is a valid value for the PHI result even when the
  // result occurs in an abnormal PHI.
  gcc_checking_assert (!(e_in->flags & EDGE_ABNORMAL));
  tree arg = PHI_ARG_DEF_FROM_EDGE (phi, e_in);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.