public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/103845] New: ICE in execute, at gimple-harden-conditionals.cc:552
@ 2021-12-27 10:19 asolokha at gmx dot com
  2021-12-28  2:25 ` [Bug tree-optimization/103845] " pinskia at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: asolokha at gmx dot com @ 2021-12-27 10:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103845
           Summary: ICE in execute, at gimple-harden-conditionals.cc:552
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
                CC: aoliva at gcc dot gnu.org
  Target Milestone: ---

gcc 12.0.0 20211226 snapshot (g:d87483015d476a95f521f0c9dcf6988ca889063b) ICEs
when compiling the following testcase w/ -O1 -fharden-compares
-fno-ipa-pure-const:

int
baz (void);

__attribute__ ((returns_twice)) void
bar (void)
{
}

int
quux (int y, int z)
{
  return (y || z >= 0) ? y : z;
}

int
foo (int x)
{
  int a = 0, b = x == a;

  bar ();

  if (!!baz () < quux (b, a))
    ++x;

  return x;
}

% gcc-12.0.0 -O1 -fharden-compares -fno-ipa-pure-const -c sys89o7m.c
during GIMPLE pass: hardcmp
sys89o7m.c: In function 'foo':
sys89o7m.c:16:1: internal compiler error: in execute, at
gimple-harden-conditionals.cc:552
   16 | foo (int x)
      | ^~~
0x8122e4 execute
       
/var/tmp/portage/sys-devel/gcc-12.0.0_p20211226/work/gcc-12-20211226/gcc/gimple-harden-conditionals.cc:552

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

* [Bug tree-optimization/103845] ICE in execute, at gimple-harden-conditionals.cc:552
  2021-12-27 10:19 [Bug tree-optimization/103845] New: ICE in execute, at gimple-harden-conditionals.cc:552 asolokha at gmx dot com
@ 2021-12-28  2:25 ` pinskia at gcc dot gnu.org
  2022-02-17 12:58 ` [Bug tree-optimization/103845] ICE in execute, at gimple-harden-conditionals.cc:552 -fharden-compares -fno-ipa-pure-const and returns_twice aoliva at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-28  2:25 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-12-28

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
552             gcc_checking_assert (single_succ_p (gsi_bb (gsi_split)));

;;   basic block 5, loop depth 0, count 1073312329 (estimated locally), maybe
hot
;;    prev block 4, next block 6, flags: (NEW, REACHABLE, IRREDUCIBLE_LOOP,
VISITED)
;;    pred:       3 [100.0% (guessed)]  count:1073312328 (estimated locally)
(FALLTHRU,IRREDUCIBLE_LOOP,EXECUTABLE)
  _2 = _11 != 0;
;;    succ:       6 [100.0% (guessed)]  count:1072883005 (estimated locally)
(FALLTHRU,EXECUTABLE)
;;                4 [0.0% (guessed)]  count:429324 (estimated locally)
(ABNORMAL,IRREDUCIBLE_LOOP,EXECUTABLE)

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

* [Bug tree-optimization/103845] ICE in execute, at gimple-harden-conditionals.cc:552 -fharden-compares -fno-ipa-pure-const and returns_twice
  2021-12-27 10:19 [Bug tree-optimization/103845] New: ICE in execute, at gimple-harden-conditionals.cc:552 asolokha at gmx dot com
  2021-12-28  2:25 ` [Bug tree-optimization/103845] " pinskia at gcc dot gnu.org
@ 2022-02-17 12:58 ` aoliva at gcc dot gnu.org
  2022-02-17 13:07 ` asolokha at gmx dot com
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: aoliva at gcc dot gnu.org @ 2022-02-17 12:58 UTC (permalink / raw)
  To: gcc-bugs

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

Alexandre Oliva <aoliva at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |aoliva at gcc dot gnu.org

--- Comment #2 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Mine.  I can't duplicate this with a current compiler.

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

* [Bug tree-optimization/103845] ICE in execute, at gimple-harden-conditionals.cc:552 -fharden-compares -fno-ipa-pure-const and returns_twice
  2021-12-27 10:19 [Bug tree-optimization/103845] New: ICE in execute, at gimple-harden-conditionals.cc:552 asolokha at gmx dot com
  2021-12-28  2:25 ` [Bug tree-optimization/103845] " pinskia at gcc dot gnu.org
  2022-02-17 12:58 ` [Bug tree-optimization/103845] ICE in execute, at gimple-harden-conditionals.cc:552 -fharden-compares -fno-ipa-pure-const and returns_twice aoliva at gcc dot gnu.org
@ 2022-02-17 13:07 ` asolokha at gmx dot com
  2022-02-17 15:33 ` aoliva at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: asolokha at gmx dot com @ 2022-02-17 13:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Arseny Solokha <asolokha at gmx dot com> ---
I cannot reproduce it w/ the latest weekly snapshot as well.

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

* [Bug tree-optimization/103845] ICE in execute, at gimple-harden-conditionals.cc:552 -fharden-compares -fno-ipa-pure-const and returns_twice
  2021-12-27 10:19 [Bug tree-optimization/103845] New: ICE in execute, at gimple-harden-conditionals.cc:552 asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2022-02-17 13:07 ` asolokha at gmx dot com
@ 2022-02-17 15:33 ` aoliva at gcc dot gnu.org
  2022-02-17 16:44 ` aoliva at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: aoliva at gcc dot gnu.org @ 2022-02-17 15:33 UTC (permalink / raw)
  To: gcc-bugs

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

Alexandre Oliva <aoliva at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |104263

--- Comment #4 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
I'm pretty sure it was the patch for bug 104263 that fixed it.  Confirming...


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104263
[Bug 104263] [10/11 Regression] '-fcompare-debug' failure (length) w/ -O2
-fnon-call-exceptions -fno-inline-small-functions since
r10-3575-g629387a6586a7531

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

* [Bug tree-optimization/103845] ICE in execute, at gimple-harden-conditionals.cc:552 -fharden-compares -fno-ipa-pure-const and returns_twice
  2021-12-27 10:19 [Bug tree-optimization/103845] New: ICE in execute, at gimple-harden-conditionals.cc:552 asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2022-02-17 15:33 ` aoliva at gcc dot gnu.org
@ 2022-02-17 16:44 ` aoliva at gcc dot gnu.org
  2022-02-25  1:20 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: aoliva at gcc dot gnu.org @ 2022-02-17 16:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Confirmed.  The first patch there.

I will still prepare a patch with the testcase to avoid an independent
regression.

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

* [Bug tree-optimization/103845] ICE in execute, at gimple-harden-conditionals.cc:552 -fharden-compares -fno-ipa-pure-const and returns_twice
  2021-12-27 10:19 [Bug tree-optimization/103845] New: ICE in execute, at gimple-harden-conditionals.cc:552 asolokha at gmx dot com
                   ` (4 preceding siblings ...)
  2022-02-17 16:44 ` aoliva at gcc dot gnu.org
@ 2022-02-25  1:20 ` cvs-commit at gcc dot gnu.org
  2022-02-25  1:44 ` aoliva at gcc dot gnu.org
  2022-05-10 10:19 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-25  1:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alexandre Oliva <aoliva@gcc.gnu.org>:

https://gcc.gnu.org/g:33c7df5854ecb31e2d645ab672ad3987b591ebfd

commit r12-7383-g33c7df5854ecb31e2d645ab672ad3987b591ebfd
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Thu Feb 24 22:03:38 2022 -0300

    Add testcase from PR103845

    This problem was already fixed as part of PR104263: the abnormal edge
    that remained from before inlining didn't make sense after inlining.
    So this patch adds only the testcase.


    for  gcc/testsuite/ChangeLog

            PR tree-optimization/103845
            PR tree-optimization/104263
            * gcc.dg/pr103845.c: New.

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

* [Bug tree-optimization/103845] ICE in execute, at gimple-harden-conditionals.cc:552 -fharden-compares -fno-ipa-pure-const and returns_twice
  2021-12-27 10:19 [Bug tree-optimization/103845] New: ICE in execute, at gimple-harden-conditionals.cc:552 asolokha at gmx dot com
                   ` (5 preceding siblings ...)
  2022-02-25  1:20 ` cvs-commit at gcc dot gnu.org
@ 2022-02-25  1:44 ` aoliva at gcc dot gnu.org
  2022-05-10 10:19 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: aoliva at gcc dot gnu.org @ 2022-02-25  1:44 UTC (permalink / raw)
  To: gcc-bugs

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

Alexandre Oliva <aoliva at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #7 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Already fixed, testcase added.

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

* [Bug tree-optimization/103845] ICE in execute, at gimple-harden-conditionals.cc:552 -fharden-compares -fno-ipa-pure-const and returns_twice
  2021-12-27 10:19 [Bug tree-optimization/103845] New: ICE in execute, at gimple-harden-conditionals.cc:552 asolokha at gmx dot com
                   ` (6 preceding siblings ...)
  2022-02-25  1:44 ` aoliva at gcc dot gnu.org
@ 2022-05-10 10:19 ` jakub at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-05-10 10:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103845
Bug 103845 depends on bug 104263, which changed state.

Bug 104263 Summary: [10 Regression] '-fcompare-debug' failure (length) w/ -O2 -fnon-call-exceptions -fno-inline-small-functions since r10-3575-g629387a6586a7531
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104263

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

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

end of thread, other threads:[~2022-05-10 10:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-27 10:19 [Bug tree-optimization/103845] New: ICE in execute, at gimple-harden-conditionals.cc:552 asolokha at gmx dot com
2021-12-28  2:25 ` [Bug tree-optimization/103845] " pinskia at gcc dot gnu.org
2022-02-17 12:58 ` [Bug tree-optimization/103845] ICE in execute, at gimple-harden-conditionals.cc:552 -fharden-compares -fno-ipa-pure-const and returns_twice aoliva at gcc dot gnu.org
2022-02-17 13:07 ` asolokha at gmx dot com
2022-02-17 15:33 ` aoliva at gcc dot gnu.org
2022-02-17 16:44 ` aoliva at gcc dot gnu.org
2022-02-25  1:20 ` cvs-commit at gcc dot gnu.org
2022-02-25  1:44 ` aoliva at gcc dot gnu.org
2022-05-10 10:19 ` jakub 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).