public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/106534] New: [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap
@ 2022-08-05  9:02 burnus at gcc dot gnu.org
  2022-08-05  9:11 ` [Bug middle-end/106534] " rguenth at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: burnus at gcc dot gnu.org @ 2022-08-05  9:02 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106534
           Summary: [13 Regression][gcn] ICE 'verify_ssa failed' / 'error:
                    definition in block 18 does not dominate use in block
                    19' during libgfortran bootstrap
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: build, ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: ams at gcc dot gnu.org
  Target Milestone: ---
            Target: amdgcn-amdhsa

Build of amdgcn-amdhsa (as offloading compiler for/on x86_64-gnu-linux) fails
to build as follows. It did bootstrap successfully a few days back (like Aug 2
or 3):


src/gcc-mainline/libgfortran/io/unit.c: In function 'get_gfc_unit':
src/gcc-mainline/libgfortran/io/unit.c:326:1: error: definition in block 18
does not dominate use in block 19
  326 | get_gfc_unit (int n, int do_create)
      | ^~~~~~~~~~~~
for SSA_NAME: p_47 in statement:
p_30 = PHI <p_47(19), p_47(38)>
PHI argument
p_47
for PHI node
p_30 = PHI <p_47(19), p_47(38)>
during GIMPLE pass: phiopt
/scratch/ci-cs/amdtest/upstream-offload/src/gcc-mainline/libgfortran/io/unit.c:326:1:
internal compiler error: verify_ssa failed

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

* [Bug middle-end/106534] [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap
  2022-08-05  9:02 [Bug middle-end/106534] New: [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap burnus at gcc dot gnu.org
@ 2022-08-05  9:11 ` rguenth at gcc dot gnu.org
  2022-08-05 10:23 ` burnus at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-08-05  9:11 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org,
                   |                            |tnfchris at gcc dot gnu.org
   Target Milestone|---                         |13.0

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Can you please attach preprocessed source so it can be reproduced with a cc1
cross from x86_64?

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

* [Bug middle-end/106534] [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap
  2022-08-05  9:02 [Bug middle-end/106534] New: [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap burnus at gcc dot gnu.org
  2022-08-05  9:11 ` [Bug middle-end/106534] " rguenth at gcc dot gnu.org
@ 2022-08-05 10:23 ` burnus at gcc dot gnu.org
  2022-08-05 10:49 ` tnfchris at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: burnus at gcc dot gnu.org @ 2022-08-05 10:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Created attachment 53416
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53416&action=edit
Reduced testcase - fails with cc1 -O2 inp.i

Reduced inputfile attached.

Full code has the full ICE output:

src/gcc-mainline/libgfortran/io/unit.c: In function 'get_gfc_unit':
gcc-mainline/libgfortran/io/unit.c:326:1: error: definition in block 18 does
not dominate use in block 19
  326 | get_gfc_unit (int n, int do_create)
      | ^~~~~~~~~~~~
for SSA_NAME: p_47 in statement:
p_30 = PHI <p_47(19), p_47(38)>
PHI argument
p_47
for PHI node
p_30 = PHI <p_47(19), p_47(38)>
during GIMPLE pass: phiopt
gcc-mainline/libgfortran/io/unit.c:326:1: internal compiler error: verify_ssa
failed
0x11699ff verify_ssa(bool, bool)
        gcc-mainline/gcc/tree-ssa.cc:1211
0xe4e6dd execute_function_todo
        gcc-mainline/gcc/passes.cc:2098
0xe4eb7b execute_todo
        gcc-mainline/gcc/passes.cc:2145

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

* [Bug middle-end/106534] [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap
  2022-08-05  9:02 [Bug middle-end/106534] New: [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap burnus at gcc dot gnu.org
  2022-08-05  9:11 ` [Bug middle-end/106534] " rguenth at gcc dot gnu.org
  2022-08-05 10:23 ` burnus at gcc dot gnu.org
@ 2022-08-05 10:49 ` tnfchris at gcc dot gnu.org
  2022-08-05 10:54 ` burnus at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2022-08-05 10:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
Thanks for the repro, could you tell me what target I need to use or what
configure options to build amdgcn-amdhsa?

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

* [Bug middle-end/106534] [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap
  2022-08-05  9:02 [Bug middle-end/106534] New: [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap burnus at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-08-05 10:49 ` tnfchris at gcc dot gnu.org
@ 2022-08-05 10:54 ` burnus at gcc dot gnu.org
  2022-08-05 10:56 ` rguenther at suse dot de
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: burnus at gcc dot gnu.org @ 2022-08-05 10:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Seems as if the ICE is fixed for that file by reverting the following commit:

commit r13-1963-gc832ec4c3ec4853ad89ff3b0dbf6e9454e75e8cc
    middle-end: Fix phi-ssa assertion triggers.  [PR106519]

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

* [Bug middle-end/106534] [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap
  2022-08-05  9:02 [Bug middle-end/106534] New: [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap burnus at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-08-05 10:54 ` burnus at gcc dot gnu.org
@ 2022-08-05 10:56 ` rguenther at suse dot de
  2022-08-05 11:03 ` tnfchris at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenther at suse dot de @ 2022-08-05 10:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from rguenther at suse dot de <rguenther at suse dot de> ---
On Fri, 5 Aug 2022, burnus at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106534
> 
> --- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
> Seems as if the ICE is fixed for that file by reverting the following commit:
> 
> commit r13-1963-gc832ec4c3ec4853ad89ff3b0dbf6e9454e75e8cc
>     middle-end: Fix phi-ssa assertion triggers.  [PR106519]

As hinted in the e-mail exchange the earlier two transforms might need
guarding with !diamond_p since IIRC only minmax is capable of dealing
with it?

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

* [Bug middle-end/106534] [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap
  2022-08-05  9:02 [Bug middle-end/106534] New: [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap burnus at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-08-05 10:56 ` rguenther at suse dot de
@ 2022-08-05 11:03 ` tnfchris at gcc dot gnu.org
  2022-08-05 11:06 ` burnus at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2022-08-05 11:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
(In reply to rguenther@suse.de from comment #5)
> On Fri, 5 Aug 2022, burnus at gcc dot gnu.org wrote:
> 
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106534
> > 
> > --- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
> > Seems as if the ICE is fixed for that file by reverting the following commit:
> > 
> > commit r13-1963-gc832ec4c3ec4853ad89ff3b0dbf6e9454e75e8cc
> >     middle-end: Fix phi-ssa assertion triggers.  [PR106519]
> 
> As hinted in the e-mail exchange the earlier two transforms might need
> guarding with !diamond_p since IIRC only minmax is capable of dealing
> with it?

Yes, Though I didn't find any failing cases so I didn't guard store elim.
value_replacement is a weird one as it looks like it's already looking for some
kind of diamond form.  I can guard both to be safe, but that's essentially
doing a blind change if I can't reproduce this locally.

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

* [Bug middle-end/106534] [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap
  2022-08-05  9:02 [Bug middle-end/106534] New: [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap burnus at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2022-08-05 11:03 ` tnfchris at gcc dot gnu.org
@ 2022-08-05 11:06 ` burnus at gcc dot gnu.org
  2022-08-05 11:17 ` tnfchris at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: burnus at gcc dot gnu.org @ 2022-08-05 11:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Tamar Christina from comment #3)
> Thanks for the repro, could you tell me what target I need to use or what
> configure options to build amdgcn-amdhsa?

See https://gcc.gnu.org/wiki/Offloading#How_to_build_an_offloading-enabled_GCC
for some guidance. (But that's more for building a full compiler and more than
you need.)

I think you just need to know:  --target=amdgcn-amdhsa

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

* [Bug middle-end/106534] [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap
  2022-08-05  9:02 [Bug middle-end/106534] New: [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap burnus at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2022-08-05 11:06 ` burnus at gcc dot gnu.org
@ 2022-08-05 11:17 ` tnfchris at gcc dot gnu.org
  2022-08-05 11:24 ` tnfchris at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2022-08-05 11:17 UTC (permalink / raw)
  To: gcc-bugs

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

Tamar Christina <tnfchris at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |tnfchris at gcc dot gnu.org
   Last reconfirmed|                            |2022-08-05
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #8 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #7)
> (In reply to Tamar Christina from comment #3)
> > Thanks for the repro, could you tell me what target I need to use or what
> > configure options to build amdgcn-amdhsa?
> 
> See
> https://gcc.gnu.org/wiki/Offloading#How_to_build_an_offloading-enabled_GCC
> for some guidance. (But that's more for building a full compiler and more
> than you need.)
> 
> I think you just need to know:  --target=amdgcn-amdhsa

Thanks! Able to reproduce it now!

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

* [Bug middle-end/106534] [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap
  2022-08-05  9:02 [Bug middle-end/106534] New: [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap burnus at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2022-08-05 11:17 ` tnfchris at gcc dot gnu.org
@ 2022-08-05 11:24 ` tnfchris at gcc dot gnu.org
  2022-08-05 13:54 ` cvs-commit at gcc dot gnu.org
  2022-08-05 13:56 ` tnfchris at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2022-08-05 11:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
(In reply to Tamar Christina from comment #6)
> (In reply to rguenther@suse.de from comment #5)
> > On Fri, 5 Aug 2022, burnus at gcc dot gnu.org wrote:
> > 
> > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106534
> > > 
> > > --- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
> > > Seems as if the ICE is fixed for that file by reverting the following commit:
> > > 
> > > commit r13-1963-gc832ec4c3ec4853ad89ff3b0dbf6e9454e75e8cc
> > >     middle-end: Fix phi-ssa assertion triggers.  [PR106519]
> > 
> > As hinted in the e-mail exchange the earlier two transforms might need
> > guarding with !diamond_p since IIRC only minmax is capable of dealing
> > with it?
> 
> Yes, Though I didn't find any failing cases so I didn't guard store elim.
> value_replacement is a weird one as it looks like it's already looking for
> some kind of diamond form.  I can guard both to be safe, but that's
> essentially doing a blind change if I can't reproduce this locally.

This does seem to fix it, so bootstrapping now and will put up a patch once
done.

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

* [Bug middle-end/106534] [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap
  2022-08-05  9:02 [Bug middle-end/106534] New: [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap burnus at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2022-08-05 11:24 ` tnfchris at gcc dot gnu.org
@ 2022-08-05 13:54 ` cvs-commit at gcc dot gnu.org
  2022-08-05 13:56 ` tnfchris at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-08-05 13:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tamar Christina <tnfchris@gcc.gnu.org>:

https://gcc.gnu.org/g:1878ab3650d8c646a4db364df388adaec2a29870

commit r13-1975-g1878ab3650d8c646a4db364df388adaec2a29870
Author: Tamar Christina <tamar.christina@arm.com>
Date:   Fri Aug 5 14:53:28 2022 +0100

    middle-end: Guard value_replacement and store_elim from seeing diamonds.

    This excludes value_replacement and store_elim from diamonds as they don't
    handle the form properly.

    gcc/ChangeLog:

            PR middle-end/106534
            * tree-ssa-phiopt.cc (tree_ssa_phiopt_worker): Guard the
            value_replacement and store_elim from diamonds.

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

* [Bug middle-end/106534] [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap
  2022-08-05  9:02 [Bug middle-end/106534] New: [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap burnus at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2022-08-05 13:54 ` cvs-commit at gcc dot gnu.org
@ 2022-08-05 13:56 ` tnfchris at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2022-08-05 13:56 UTC (permalink / raw)
  To: gcc-bugs

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

Tamar Christina <tnfchris at gcc dot gnu.org> changed:

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

--- Comment #11 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
Fixed now.

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

end of thread, other threads:[~2022-08-05 13:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-05  9:02 [Bug middle-end/106534] New: [13 Regression][gcn] ICE 'verify_ssa failed' / 'error: definition in block 18 does not dominate use in block 19' during libgfortran bootstrap burnus at gcc dot gnu.org
2022-08-05  9:11 ` [Bug middle-end/106534] " rguenth at gcc dot gnu.org
2022-08-05 10:23 ` burnus at gcc dot gnu.org
2022-08-05 10:49 ` tnfchris at gcc dot gnu.org
2022-08-05 10:54 ` burnus at gcc dot gnu.org
2022-08-05 10:56 ` rguenther at suse dot de
2022-08-05 11:03 ` tnfchris at gcc dot gnu.org
2022-08-05 11:06 ` burnus at gcc dot gnu.org
2022-08-05 11:17 ` tnfchris at gcc dot gnu.org
2022-08-05 11:24 ` tnfchris at gcc dot gnu.org
2022-08-05 13:54 ` cvs-commit at gcc dot gnu.org
2022-08-05 13:56 ` tnfchris 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).