public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/103856] New: ICE during GIMPLE pass: hardcmp since r12-4759-g95bb87b2458bfab4
@ 2021-12-29 12:06 marxin at gcc dot gnu.org
  2021-12-29 21:25 ` [Bug tree-optimization/103856] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-12-29 12:06 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103856
           Summary: ICE during GIMPLE pass: hardcmp since
                    r12-4759-g95bb87b2458bfab4
           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: marxin at gcc dot gnu.org
                CC: aoliva at gcc dot gnu.org
  Target Milestone: ---

The following fails:

$ cat ice.ii
struct S {
  S(float);
  S();
  operator float();
  ~S() {}
};

int
main() {
  S s_arr[]{2};
  S var1;
  if (var1)
    ;
}

$ g++ -Og -fnon-call-exceptions -fsignaling-nans -fharden-compares -c ice.ii
ice.ii: In function ‘int main()’:
ice.ii:9:1: error: missing ‘PHI’ def
    9 | main() {
      | ^~~~
_5 = PHI <&MEM <struct S[1]> [(void *)&s_arr + 1B](4), &MEM <struct S[1]>
[(void *)&s_arr + 1B](2), &MEM <struct S[1]> [(void *)&s_arr + 1B](3), (5)>
during GIMPLE pass: hardcmp
ice.ii:9:1: internal compiler error: verify_gimple failed
0x1289035 verify_gimple_in_cfg(function*, bool)
        /home/marxin/Programming/gcc/gcc/tree-cfg.c:5578
0x114f4ee execute_function_todo
        /home/marxin/Programming/gcc/gcc/passes.c:2084
0x114fb0b execute_todo
        /home/marxin/Programming/gcc/gcc/passes.c:2138
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

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

* [Bug tree-optimization/103856] ICE during GIMPLE pass: hardcmp since r12-4759-g95bb87b2458bfab4
  2021-12-29 12:06 [Bug tree-optimization/103856] New: ICE during GIMPLE pass: hardcmp since r12-4759-g95bb87b2458bfab4 marxin at gcc dot gnu.org
@ 2021-12-29 21:25 ` pinskia at gcc dot gnu.org
  2022-02-13  9:02 ` [Bug tree-optimization/103856] ICE during GIMPLE pass: hardcmp since r12-4759-g95bb87b2458bfab4 and -fnon-call-exceptions -fsignaling-nans pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-29 21:25 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed, unlike PR 103024, this one has a PHI node for the successor of the
bb containing the comparison at the end.

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

* [Bug tree-optimization/103856] ICE during GIMPLE pass: hardcmp since r12-4759-g95bb87b2458bfab4 and -fnon-call-exceptions -fsignaling-nans
  2021-12-29 12:06 [Bug tree-optimization/103856] New: ICE during GIMPLE pass: hardcmp since r12-4759-g95bb87b2458bfab4 marxin at gcc dot gnu.org
  2021-12-29 21:25 ` [Bug tree-optimization/103856] " pinskia at gcc dot gnu.org
@ 2022-02-13  9:02 ` pinskia at gcc dot gnu.org
  2022-02-17 12:41 ` aoliva at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-13  9:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zsojka at seznam dot cz

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 104518 has been marked as a duplicate of this bug. ***

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

* [Bug tree-optimization/103856] ICE during GIMPLE pass: hardcmp since r12-4759-g95bb87b2458bfab4 and -fnon-call-exceptions -fsignaling-nans
  2021-12-29 12:06 [Bug tree-optimization/103856] New: ICE during GIMPLE pass: hardcmp since r12-4759-g95bb87b2458bfab4 marxin at gcc dot gnu.org
  2021-12-29 21:25 ` [Bug tree-optimization/103856] " pinskia at gcc dot gnu.org
  2022-02-13  9:02 ` [Bug tree-optimization/103856] ICE during GIMPLE pass: hardcmp since r12-4759-g95bb87b2458bfab4 and -fnon-call-exceptions -fsignaling-nans pinskia at gcc dot gnu.org
@ 2022-02-17 12:41 ` aoliva at gcc dot gnu.org
  2022-02-17 12:44 ` aoliva at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: aoliva at gcc dot gnu.org @ 2022-02-17 12:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #3 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Mine

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

* [Bug tree-optimization/103856] ICE during GIMPLE pass: hardcmp since r12-4759-g95bb87b2458bfab4 and -fnon-call-exceptions -fsignaling-nans
  2021-12-29 12:06 [Bug tree-optimization/103856] New: ICE during GIMPLE pass: hardcmp since r12-4759-g95bb87b2458bfab4 marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-02-17 12:41 ` aoliva at gcc dot gnu.org
@ 2022-02-17 12:44 ` aoliva at gcc dot gnu.org
  2022-02-25  1:19 ` cvs-commit at gcc dot gnu.org
  2022-02-25  1:43 ` aoliva at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: aoliva at gcc dot gnu.org @ 2022-02-17 12:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Created attachment 52458
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52458&action=edit
candidate patch under test

Here's a proposed fix

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

* [Bug tree-optimization/103856] ICE during GIMPLE pass: hardcmp since r12-4759-g95bb87b2458bfab4 and -fnon-call-exceptions -fsignaling-nans
  2021-12-29 12:06 [Bug tree-optimization/103856] New: ICE during GIMPLE pass: hardcmp since r12-4759-g95bb87b2458bfab4 marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-02-17 12:44 ` aoliva at gcc dot gnu.org
@ 2022-02-25  1:19 ` cvs-commit at gcc dot gnu.org
  2022-02-25  1:43 ` aoliva at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-25  1:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 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:e53bb1965db9c7882ded4a70296340d8db52053a

commit r12-7381-ge53bb1965db9c7882ded4a70296340d8db52053a
Author: Alexandre Oliva <oliva@adacore.com>
Date:   Thu Feb 24 22:03:32 2022 -0300

    Copy EH phi args for throwing hardened compares

    When we duplicate a throwing compare for hardening, the EH edge from
    the original compare gets duplicated for the inverted compare, but we
    failed to adjust any PHI nodes in the EH block.  This patch adds the
    needed adjustment, copying the PHI args from those of the preexisting
    edge.


    for  gcc/ChangeLog

            PR tree-optimization/103856
            * gimple-harden-conditionals.cc (non_eh_succ_edge): Enable the
            eh edge to be requested through an extra parameter.
            (pass_harden_compares::execute): Copy PHI args in the EH dest
            block for the new EH edge added for the inverted compare.

    for  gcc/testsuite/ChangeLog

            PR tree-optimization/103856
            * g++.dg/pr103856.C: New.

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

* [Bug tree-optimization/103856] ICE during GIMPLE pass: hardcmp since r12-4759-g95bb87b2458bfab4 and -fnon-call-exceptions -fsignaling-nans
  2021-12-29 12:06 [Bug tree-optimization/103856] New: ICE during GIMPLE pass: hardcmp since r12-4759-g95bb87b2458bfab4 marxin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-02-25  1:19 ` cvs-commit at gcc dot gnu.org
@ 2022-02-25  1:43 ` aoliva at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: aoliva at gcc dot gnu.org @ 2022-02-25  1:43 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Fixed

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

end of thread, other threads:[~2022-02-25  1:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-29 12:06 [Bug tree-optimization/103856] New: ICE during GIMPLE pass: hardcmp since r12-4759-g95bb87b2458bfab4 marxin at gcc dot gnu.org
2021-12-29 21:25 ` [Bug tree-optimization/103856] " pinskia at gcc dot gnu.org
2022-02-13  9:02 ` [Bug tree-optimization/103856] ICE during GIMPLE pass: hardcmp since r12-4759-g95bb87b2458bfab4 and -fnon-call-exceptions -fsignaling-nans pinskia at gcc dot gnu.org
2022-02-17 12:41 ` aoliva at gcc dot gnu.org
2022-02-17 12:44 ` aoliva at gcc dot gnu.org
2022-02-25  1:19 ` cvs-commit at gcc dot gnu.org
2022-02-25  1:43 ` aoliva 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).