public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/111476] New: [14 regression] ICE when building Ruby 3.1.4
@ 2023-09-19 12:08 sjames at gcc dot gnu.org
  2023-09-19 12:09 ` [Bug c/111476] " sjames at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-09-19 12:08 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111476
           Summary: [14 regression] ICE when building Ruby 3.1.4
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 55931
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55931&action=edit
util.i

```
gcc (Gentoo 14.0.0 p, commit d0b55776a4e1d2f293db5ba0e4a04aefed055ec4) 14.0.0
20230919 (experimental) 95d2ce05fb32e663bc7553438ccee7f4d4e36a35
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```

```
# aarch64-unknown-linux-gnu-gcc -O3 -pipe -mcpu=native
-fdiagnostics-color=always -ggdb3 -fno-strict-aliasing -fPIC  -D_FORTIFY_
SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden
-fexcess-precision=standard -DRUBY_EXPORT -I. -I.ext/include/aarch64-linux
-I./include -I. -I./enc/unicode/13.0.0    -o util.o -c uti
l.c
missing/dtoa.c: In function ‘ruby_strtod’:
util.c:611:16: error: count of bb 476 not initialized
  611 | #define strtod ruby_strtod
      |                ^~~~~~~~~~~
missing/dtoa.c:1497:1: note: in expansion of macro ‘strtod’
 1497 | strtod(const char *s00, char **se)
      | ^~~~~~
util.c:611:16: error: count of bb 477 not initialized
  611 | #define strtod ruby_strtod
      |                ^~~~~~~~~~~
missing/dtoa.c:1497:1: note: in expansion of macro ‘strtod’
 1497 | strtod(const char *s00, char **se)
      | ^~~~~~
util.c:611:16: error: count of bb 478 not initialized
  611 | #define strtod ruby_strtod
      |                ^~~~~~~~~~~
missing/dtoa.c:1497:1: note: in expansion of macro ‘strtod’
 1497 | strtod(const char *s00, char **se)
      | ^~~~~~
util.c:611:16: error: count of bb 479 not initialized
  611 | #define strtod ruby_strtod
      |                ^~~~~~~~~~~
missing/dtoa.c:1497:1: note: in expansion of macro ‘strtod’
 1497 | strtod(const char *s00, char **se)
      | ^~~~~~
util.c:611:16: error: count of bb 480 not initialized
  611 | #define strtod ruby_strtod
      |                ^~~~~~~~~~~
missing/dtoa.c:1497:1: note: in expansion of macro ‘strtod’
 1497 | strtod(const char *s00, char **se)
      | ^~~~~~
util.c:611:16: error: count of bb 481 not initialized
  611 | #define strtod ruby_strtod
      |                ^~~~~~~~~~~
missing/dtoa.c:1497:1: note: in expansion of macro ‘strtod’
 1497 | strtod(const char *s00, char **se)
      | ^~~~~~
util.c:611:16: error: count of bb 483 not initialized
  611 | #define strtod ruby_strtod
      |                ^~~~~~~~~~~
missing/dtoa.c:1497:1: note: in expansion of macro ‘strtod’
 1497 | strtod(const char *s00, char **se)
      | ^~~~~~
during GIMPLE pass: vect
util.c:611:16: internal compiler error: verify_flow_info failed
  611 | #define strtod ruby_strtod
      |                ^~~~~~~~~~~
missing/dtoa.c:1497:1: note: in expansion of macro ‘strtod’
 1497 | strtod(const char *s00, char **se)
      | ^~~~~~
0xaaaac97ac62f verify_flow_info()
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cfghooks.cc:287
0xaaaac9e58877 checking_verify_flow_info()
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/cfghooks.h:214
0xaaaac9e58877 cleanup_tree_cfg_noloop
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-cfgcleanup.cc:1154
0xaaaac9e58877 cleanup_tree_cfg(unsigned int)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-cfgcleanup.cc:1205
0xaaaac9c75e07 execute_function_todo
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/passes.cc:2057
0xaaaac9c7649f execute_todo
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/passes.cc:2142
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```

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

* [Bug c/111476] [14 regression] ICE when building Ruby 3.1.4
  2023-09-19 12:08 [Bug c/111476] New: [14 regression] ICE when building Ruby 3.1.4 sjames at gcc dot gnu.org
@ 2023-09-19 12:09 ` sjames at gcc dot gnu.org
  2023-09-19 12:44 ` [Bug tree-optimization/111476] " rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-09-19 12:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Sam James <sjames at gcc dot gnu.org> ---
I need -O3 to reproduce.

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

* [Bug tree-optimization/111476] [14 regression] ICE when building Ruby 3.1.4
  2023-09-19 12:08 [Bug c/111476] New: [14 regression] ICE when building Ruby 3.1.4 sjames at gcc dot gnu.org
  2023-09-19 12:09 ` [Bug c/111476] " sjames at gcc dot gnu.org
@ 2023-09-19 12:44 ` rguenth at gcc dot gnu.org
  2023-09-19 13:17 ` ktkachov at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-09-19 12:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

* [Bug tree-optimization/111476] [14 regression] ICE when building Ruby 3.1.4
  2023-09-19 12:08 [Bug c/111476] New: [14 regression] ICE when building Ruby 3.1.4 sjames at gcc dot gnu.org
  2023-09-19 12:09 ` [Bug c/111476] " sjames at gcc dot gnu.org
  2023-09-19 12:44 ` [Bug tree-optimization/111476] " rguenth at gcc dot gnu.org
@ 2023-09-19 13:17 ` ktkachov at gcc dot gnu.org
  2023-09-19 13:56 ` sjames at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2023-09-19 13:17 UTC (permalink / raw)
  To: gcc-bugs

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

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2023-09-19
                 CC|                            |ktkachov at gcc dot gnu.org

--- Comment #2 from ktkachov at gcc dot gnu.org ---
Confirmed. Reduced testcase.

int a, b, c, d;
void
e() {
  int f, g, h;
  for (;;)
    switch (c) {
    case '-':
      if (!b) {
        if (a) {
          g = 0;
          goto i;
        }
        goto j;
      }
      for (; a;)
      i:
        g++;
      if (b)
        continue;
      f = 1;
      for (; f < g; f++) {
        b++;
        if (b)
          h *= 10;
      }
    }
j:
  d = h;
}

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

* [Bug tree-optimization/111476] [14 regression] ICE when building Ruby 3.1.4
  2023-09-19 12:08 [Bug c/111476] New: [14 regression] ICE when building Ruby 3.1.4 sjames at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-09-19 13:17 ` ktkachov at gcc dot gnu.org
@ 2023-09-19 13:56 ` sjames at gcc dot gnu.org
  2023-09-19 19:29 ` [Bug tree-optimization/111476] [14 regression] ICE when building Ruby 3.1.4 since r14-3459-g0c78240fd7d519 sjames at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-09-19 13:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Sam James <sjames at gcc dot gnu.org> ---
cvise just finished for me, `gcc -c util.i -O3`:
```
int ruby_strtod_c, ruby_strtod_nd;
double ruby_strtod_rv_0;
void ruby_strtod() {
  int i, nz, z;
  if (ruby_strtod_nd) {
    nz = 0;
    goto have_dig;
  }
  for (; ruby_strtod_c;) {
  have_dig:
    nz++;
    i = 1;
    for (; i < nz; i++) {
      ruby_strtod_nd++;
      if (ruby_strtod_nd)
        z *= 10;
    }
  }
  ruby_strtod_rv_0 = z;
}
```

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

* [Bug tree-optimization/111476] [14 regression] ICE when building Ruby 3.1.4 since r14-3459-g0c78240fd7d519
  2023-09-19 12:08 [Bug c/111476] New: [14 regression] ICE when building Ruby 3.1.4 sjames at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-09-19 13:56 ` sjames at gcc dot gnu.org
@ 2023-09-19 19:29 ` sjames at gcc dot gnu.org
  2023-09-19 19:30 ` sjames at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-09-19 19:29 UTC (permalink / raw)
  To: gcc-bugs

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

Sam James <sjames at gcc dot gnu.org> 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 <sjames at gcc dot gnu.org> ---
0c78240fd7d519fc27ca822f66a92f85edf43f70 is the first bad commit
commit 0c78240fd7d519fc27ca822f66a92f85edf43f70
Author: Jan Hubicka <jh@suse.cz>
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

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

* [Bug tree-optimization/111476] [14 regression] ICE when building Ruby 3.1.4 since r14-3459-g0c78240fd7d519
  2023-09-19 12:08 [Bug c/111476] New: [14 regression] ICE when building Ruby 3.1.4 sjames at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-09-19 19:29 ` [Bug tree-optimization/111476] [14 regression] ICE when building Ruby 3.1.4 since r14-3459-g0c78240fd7d519 sjames at gcc dot gnu.org
@ 2023-09-19 19:30 ` sjames at gcc dot gnu.org
  2023-10-17 12:58 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-09-19 19:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Sam James <sjames at gcc dot gnu.org> ---
that commit looks to have just exposed it though as designed, the issue was
latent before I think

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

* [Bug tree-optimization/111476] [14 regression] ICE when building Ruby 3.1.4 since r14-3459-g0c78240fd7d519
  2023-09-19 12:08 [Bug c/111476] New: [14 regression] ICE when building Ruby 3.1.4 sjames at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-09-19 19:30 ` sjames at gcc dot gnu.org
@ 2023-10-17 12:58 ` rguenth at gcc dot gnu.org
  2023-10-17 13:06 ` sjames at gcc dot gnu.org
  2023-10-17 13:28 ` sjames at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-17 12:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
I can't reproduce anymore?

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

* [Bug tree-optimization/111476] [14 regression] ICE when building Ruby 3.1.4 since r14-3459-g0c78240fd7d519
  2023-09-19 12:08 [Bug c/111476] New: [14 regression] ICE when building Ruby 3.1.4 sjames at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-10-17 12:58 ` rguenth at gcc dot gnu.org
@ 2023-10-17 13:06 ` sjames at gcc dot gnu.org
  2023-10-17 13:28 ` sjames at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-10-17 13:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Sam James <sjames at gcc dot gnu.org> ---
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?

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

* [Bug tree-optimization/111476] [14 regression] ICE when building Ruby 3.1.4 since r14-3459-g0c78240fd7d519
  2023-09-19 12:08 [Bug c/111476] New: [14 regression] ICE when building Ruby 3.1.4 sjames at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2023-10-17 13:06 ` sjames at gcc dot gnu.org
@ 2023-10-17 13:28 ` sjames at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-10-17 13:28 UTC (permalink / raw)
  To: gcc-bugs

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

Sam James <sjames at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |WORKSFORME

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

end of thread, other threads:[~2023-10-17 13:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-19 12:08 [Bug c/111476] New: [14 regression] ICE when building Ruby 3.1.4 sjames at gcc dot gnu.org
2023-09-19 12:09 ` [Bug c/111476] " sjames at gcc dot gnu.org
2023-09-19 12:44 ` [Bug tree-optimization/111476] " rguenth at gcc dot gnu.org
2023-09-19 13:17 ` ktkachov at gcc dot gnu.org
2023-09-19 13:56 ` sjames at gcc dot gnu.org
2023-09-19 19:29 ` [Bug tree-optimization/111476] [14 regression] ICE when building Ruby 3.1.4 since r14-3459-g0c78240fd7d519 sjames at gcc dot gnu.org
2023-09-19 19:30 ` sjames at gcc dot gnu.org
2023-10-17 12:58 ` rguenth at gcc dot gnu.org
2023-10-17 13:06 ` sjames at gcc dot gnu.org
2023-10-17 13:28 ` sjames 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).