public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/111328] New: ICE: verify_flow_info failed since r14-3459-g0c78240fd7d
@ 2023-09-07 15:51 shaohua.li at inf dot ethz.ch
  2023-09-07 19:08 ` [Bug tree-optimization/111328] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: shaohua.li at inf dot ethz.ch @ 2023-09-07 15:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111328
           Summary: ICE: verify_flow_info failed since
                    r14-3459-g0c78240fd7d
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: shaohua.li at inf dot ethz.ch
                CC: jh at suse dot cz
  Target Milestone: ---

gcc at -O3 crashes on the following testcase.

Bisected to r14-3459-g0c78240fd7d

Compiler explorer: https://godbolt.org/z/G3rPdq6db


$ cat a.c
int a, b, c, d;
short e;
int f(g, h) { return h == 0 || g == 83647 && h == 1 ?: g / h; }
char *i(char *g) {
  if (a)
    do
      if (*g++ == 0)
        return 0;
    while (a);
  return g;
}
int j() {
  char k = 0, l = *i(&k) = l;
  for (; b; b++) {
    c = 1;
    for (; d + c >= 0; c--)
      ;
  }
  for (;;)
    if (f(e))
      break;
}
int main() {}
$ gcc -O2 a.c
<source>: In function 'f':
<source>:3:5: warning: type of 'g' defaults to 'int' [-Wimplicit-int]
    3 | int f(g, h) { return h == 0 || g == 83647 && h == 1 ?: g / h; }
      |     ^
<source>:3:5: warning: type of 'h' defaults to 'int' [-Wimplicit-int]
<source>: In function 'j':
<source>:12:5: error: count of bb 32 not initialized
   12 | int j() {
      |     ^
<source>:12:5: error: count of bb 33 not initialized
<source>:12:5: error: count of bb 34 not initialized
<source>:12:5: error: count of bb 35 not initialized
<source>:12:5: error: count of bb 37 not initialized
during GIMPLE pass: vect
<source>:12:5: internal compiler error: verify_flow_info failed
0x21d80ae internal_error(char const*, ...)
        ???:0
0xb8c64f verify_flow_info()
        ???:0
0x112933f cleanup_tree_cfg(unsigned int)
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned: 1
$

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

* [Bug tree-optimization/111328] ICE: verify_flow_info failed since r14-3459-g0c78240fd7d
  2023-09-07 15:51 [Bug c/111328] New: ICE: verify_flow_info failed since r14-3459-g0c78240fd7d shaohua.li at inf dot ethz.ch
@ 2023-09-07 19:08 ` pinskia at gcc dot gnu.org
  2023-10-17 12:52 ` [Bug tree-optimization/111328] [14 Regression] " rguenth at gcc dot gnu.org
  2024-03-07 23:21 ` law at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-07 19:08 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0
          Component|c                           |tree-optimization
           Keywords|                            |ice-checking,
                   |                            |ice-on-valid-code

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

* [Bug tree-optimization/111328] [14 Regression] ICE: verify_flow_info failed since r14-3459-g0c78240fd7d
  2023-09-07 15:51 [Bug c/111328] New: ICE: verify_flow_info failed since r14-3459-g0c78240fd7d shaohua.li at inf dot ethz.ch
  2023-09-07 19:08 ` [Bug tree-optimization/111328] " pinskia at gcc dot gnu.org
@ 2023-10-17 12:52 ` rguenth at gcc dot gnu.org
  2024-03-07 23:21 ` law at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-17 12:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2023-10-17

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I can not reproduce this issue with current trunk.

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

* [Bug tree-optimization/111328] [14 Regression] ICE: verify_flow_info failed since r14-3459-g0c78240fd7d
  2023-09-07 15:51 [Bug c/111328] New: ICE: verify_flow_info failed since r14-3459-g0c78240fd7d shaohua.li at inf dot ethz.ch
  2023-09-07 19:08 ` [Bug tree-optimization/111328] " pinskia at gcc dot gnu.org
  2023-10-17 12:52 ` [Bug tree-optimization/111328] [14 Regression] " rguenth at gcc dot gnu.org
@ 2024-03-07 23:21 ` law at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: law at gcc dot gnu.org @ 2024-03-07 23:21 UTC (permalink / raw)
  To: gcc-bugs

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

Jeffrey A. Law <law at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|WAITING                     |RESOLVED
                 CC|                            |law at gcc dot gnu.org

--- Comment #2 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Fixed by:

commit cc50337215535e17f1caa5eae34eaa650223c96b (HEAD, refs/bisect/bad)
Author: Eugene Rozenfeld <erozen@microsoft.com>
Date:   Fri Sep 15 18:12:47 2023 -0700

    Fixes for profile count/probability maintenance

    Verifier checks have recently been strengthened to check that
    all counts and probabilities are initialized. The checks fired
    during autoprofiledbootstrap build and this patch fixes it.

    Tested on x86_64-pc-linux-gnu.

    gcc/ChangeLog:
            * auto-profile.cc (afdo_calculate_branch_prob): Fix count
comparisons
            * tree-vect-loop-manip.cc (vect_do_peeling): Guard against zero
count
            when scaling loop profile

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

end of thread, other threads:[~2024-03-07 23:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-07 15:51 [Bug c/111328] New: ICE: verify_flow_info failed since r14-3459-g0c78240fd7d shaohua.li at inf dot ethz.ch
2023-09-07 19:08 ` [Bug tree-optimization/111328] " pinskia at gcc dot gnu.org
2023-10-17 12:52 ` [Bug tree-optimization/111328] [14 Regression] " rguenth at gcc dot gnu.org
2024-03-07 23:21 ` law 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).