[Bug tree-optimization/111476] [14 regression] ICE when building Ruby 3.1.4 since r14-3459-g0c78240fd7d519

2023-09-19 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111476

Sam James  changed:

   What|Removed |Added

Summary|[14 regression] ICE when|[14 regression] ICE when
   |building Ruby 3.1.4 |building Ruby 3.1.4 since
   ||r14-3459-g0c78240fd7d519
 CC||hubicka at gcc dot gnu.org

--- Comment #4 from Sam James  ---
0c78240fd7d519fc27ca822f66a92f85edf43f70 is the first bad commit
commit 0c78240fd7d519fc27ca822f66a92f85edf43f70
Author: Jan Hubicka 
Date:   Thu Aug 24 15:10:46 2023 +0200

Check that passes do not forget to define profile

This patch extends verifier to check that all probabilities and counts are
initialized if profile is supposed to be present.  This is a bit
complicated
by the posibility that we inline !flag_guess_branch_probability function
into function with profile defined and in this case we need to stop
verification.  For this reason I added flag to cfg structure tracking this.

Bootstrapped/regtested x86_64-linux, comitted.

gcc/ChangeLog:

* cfg.h (struct control_flow_graph): New field full_profile.
* auto-profile.cc (afdo_annotate_cfg): Set full_profile to true.
* cfg.cc (init_flow): Set full_profile to false.
* graphite.cc (graphite_transform_loops): Set full_profile to
false.
* lto-streamer-in.cc (input_cfg): Initialize full_profile flag.
* predict.cc (pass_profile::execute): Set full_profile to true.
* symtab-thunks.cc (expand_thunk): Set full_profile to true.
* tree-cfg.cc (gimple_verify_flow_info): Verify that profile is
full
if full_profile is set.
* tree-inline.cc (initialize_cfun): Initialize full_profile.
(expand_call_inline): Combine full_profile.

 gcc/auto-profile.cc|  1 +
 gcc/cfg.cc |  1 +
 gcc/cfg.h  |  3 +++
 gcc/graphite.cc|  2 ++
 gcc/lto-streamer-in.cc |  4 
 gcc/predict.cc |  1 +
 gcc/symtab-thunks.cc   |  1 +
 gcc/tree-cfg.cc| 36 
 gcc/tree-inline.cc |  2 ++
 9 files changed, 51 insertions(+)
bisect found first bad commit

[Bug tree-optimization/111476] [14 regression] ICE when building Ruby 3.1.4 since r14-3459-g0c78240fd7d519

2023-09-19 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111476

--- Comment #5 from Sam James  ---
that commit looks to have just exposed it though as designed, the issue was
latent before I think

[Bug tree-optimization/111476] [14 regression] ICE when building Ruby 3.1.4 since r14-3459-g0c78240fd7d519

2023-10-17 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111476

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |WAITING

--- Comment #6 from Richard Biener  ---
I can't reproduce anymore?

[Bug tree-optimization/111476] [14 regression] ICE when building Ruby 3.1.4 since r14-3459-g0c78240fd7d519

2023-10-17 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111476

--- Comment #7 from Sam James  ---
I think slyfox's fix in 043a6fcbc27f8721301eb2f72a7839f54f393003 (PR111559)
sorted this, maybe?

I can't reproduce it anymore, anyway. Feel free to close as appropriate and
I'll reopen if it returns?

[Bug tree-optimization/111476] [14 regression] ICE when building Ruby 3.1.4 since r14-3459-g0c78240fd7d519

2023-10-17 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111476

Sam James  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |WORKSFORME