public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/97539] New: error: definition in block 5 does not dominate use in block 24
@ 2020-10-23  7:42 dcb314 at hotmail dot com
  2020-10-23  8:51 ` [Bug tree-optimization/97539] [10/11 Regression] ICE verify_ssa failed since r10-4200-gb7ff7cef5005721e marxin at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dcb314 at hotmail dot com @ 2020-10-23  7:42 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97539
           Summary: error: definition in block 5 does not dominate use in
                    block 24
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this C code:

int a, b;
void c() {
  char d;
  for (; b;)
    for (;;)
      for (; d <= 7; d += 1) {
        a = 7;
        for (; a; a += 1)
        e:
          d += d;
        d ^= 0;
      }
  goto e;
}

compiled by -g and -O3 on recent gcc trunk, does this:

$ /home/dcb/gcc/results/bin/gcc -c -g -O3 bug658.c
bug658.c: In function ‘c’:
bug658.c:2:6: error: definition in block 5 does not dominate use in block 24
    2 | void c() {
      |      ^
for SSA_NAME: d_20 in statement:
# DEBUG d => d_20
during GIMPLE pass: vect
bug658.c:2:6: internal compiler error: verify_ssa failed
0xf0c686 verify_ssa(bool, bool)
        ../../trunk.git/gcc/tree-ssa.c:1208
0xbd5d01 execute_function_todo(function*, void*)
        ../../trunk.git/gcc/passes.c:1999

The bug seems to have appeared sometime before 20200923.

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

* [Bug tree-optimization/97539] [10/11 Regression] ICE verify_ssa failed since r10-4200-gb7ff7cef5005721e
  2020-10-23  7:42 [Bug c/97539] New: error: definition in block 5 does not dominate use in block 24 dcb314 at hotmail dot com
@ 2020-10-23  8:51 ` marxin at gcc dot gnu.org
  2020-10-23 11:47 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-10-23  8:51 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
      Known to fail|                            |10.2.0, 11.0
   Last reconfirmed|                            |2020-10-23
          Component|c                           |tree-optimization
      Known to work|                            |9.3.0
     Ever confirmed|0                           |1
            Summary|error: definition in block  |[10/11 Regression] ICE
                   |5 does not dominate use in  |verify_ssa failed since
                   |block 24                    |r10-4200-gb7ff7cef5005721e
             Status|UNCONFIRMED                 |NEW
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r10-4200-gb7ff7cef5005721e with -fno-finite-loops.

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

* [Bug tree-optimization/97539] [10/11 Regression] ICE verify_ssa failed since r10-4200-gb7ff7cef5005721e
  2020-10-23  7:42 [Bug c/97539] New: error: definition in block 5 does not dominate use in block 24 dcb314 at hotmail dot com
  2020-10-23  8:51 ` [Bug tree-optimization/97539] [10/11 Regression] ICE verify_ssa failed since r10-4200-gb7ff7cef5005721e marxin at gcc dot gnu.org
@ 2020-10-23 11:47 ` rguenth at gcc dot gnu.org
  2020-10-26  9:07 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-23 11:47 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
   Target Milestone|---                         |10.3
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.

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

* [Bug tree-optimization/97539] [10/11 Regression] ICE verify_ssa failed since r10-4200-gb7ff7cef5005721e
  2020-10-23  7:42 [Bug c/97539] New: error: definition in block 5 does not dominate use in block 24 dcb314 at hotmail dot com
  2020-10-23  8:51 ` [Bug tree-optimization/97539] [10/11 Regression] ICE verify_ssa failed since r10-4200-gb7ff7cef5005721e marxin at gcc dot gnu.org
  2020-10-23 11:47 ` rguenth at gcc dot gnu.org
@ 2020-10-26  9:07 ` rguenth at gcc dot gnu.org
  2020-10-26 10:34 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-26  9:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the fundamental issue is that we have a debug-only live use and we do not
have LC SSA for those.  When vectorizer epilogue peeling then creates the
loop copy the debug use is still refering to the first loop but that def
no longer dominates the use because of the branch to the epilogue skipping
the vectorized loop.

The simplest workaround would be to first to a sweep over the original
loop body searching for such uses and resetting the corresponding debug binds.

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

* [Bug tree-optimization/97539] [10/11 Regression] ICE verify_ssa failed since r10-4200-gb7ff7cef5005721e
  2020-10-23  7:42 [Bug c/97539] New: error: definition in block 5 does not dominate use in block 24 dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2020-10-26  9:07 ` rguenth at gcc dot gnu.org
@ 2020-10-26 10:34 ` cvs-commit at gcc dot gnu.org
  2020-10-26 10:35 ` [Bug tree-optimization/97539] [10 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-26 10:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:27c14056f4805c9d8cfc655ef2c846be128b02c9

commit r11-4376-g27c14056f4805c9d8cfc655ef2c846be128b02c9
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Oct 26 10:08:38 2020 +0100

    tree-optimization/97539 - reset out-of-loop debug uses before peeling

    This makes sure to reset out-of-loop debug uses before vectorizer
    loop peeling as we cannot make sure to retain the use-def dominance
    relationship when there are no LC SSA nodes.

    2020-10-26  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/97539
            * tree-vect-loop-manip.c (vect_do_peeling): Reset out-of-loop
            debug uses before peeling.

            * gcc.dg/pr97539.c: New testcase.

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

* [Bug tree-optimization/97539] [10 Regression] ICE verify_ssa failed since r10-4200-gb7ff7cef5005721e
  2020-10-23  7:42 [Bug c/97539] New: error: definition in block 5 does not dominate use in block 24 dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2020-10-26 10:34 ` cvs-commit at gcc dot gnu.org
@ 2020-10-26 10:35 ` rguenth at gcc dot gnu.org
  2020-12-01 15:44 ` cvs-commit at gcc dot gnu.org
  2020-12-01 15:46 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-26 10:35 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|11.0                        |
            Summary|[10/11 Regression] ICE      |[10 Regression] ICE
                   |verify_ssa failed since     |verify_ssa failed since
                   |r10-4200-gb7ff7cef5005721e  |r10-4200-gb7ff7cef5005721e
      Known to work|                            |11.0

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar.

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

* [Bug tree-optimization/97539] [10 Regression] ICE verify_ssa failed since r10-4200-gb7ff7cef5005721e
  2020-10-23  7:42 [Bug c/97539] New: error: definition in block 5 does not dominate use in block 24 dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2020-10-26 10:35 ` [Bug tree-optimization/97539] [10 " rguenth at gcc dot gnu.org
@ 2020-12-01 15:44 ` cvs-commit at gcc dot gnu.org
  2020-12-01 15:46 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-01 15:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:2acbc9d4d677d282eaeee4721a669c41d28e978a

commit r10-9101-g2acbc9d4d677d282eaeee4721a669c41d28e978a
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Oct 26 10:08:38 2020 +0100

    tree-optimization/97539 - reset out-of-loop debug uses before peeling

    This makes sure to reset out-of-loop debug uses before vectorizer
    loop peeling as we cannot make sure to retain the use-def dominance
    relationship when there are no LC SSA nodes.

    2020-10-26  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/97539
            * tree-vect-loop-manip.c (vect_do_peeling): Reset out-of-loop
            debug uses before peeling.

            * gcc.dg/pr97539.c: New testcase.

    (cherry picked from commit 27c14056f4805c9d8cfc655ef2c846be128b02c9)

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

* [Bug tree-optimization/97539] [10 Regression] ICE verify_ssa failed since r10-4200-gb7ff7cef5005721e
  2020-10-23  7:42 [Bug c/97539] New: error: definition in block 5 does not dominate use in block 24 dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2020-12-01 15:44 ` cvs-commit at gcc dot gnu.org
@ 2020-12-01 15:46 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-12-01 15:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
      Known to work|                            |10.2.1

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2020-12-01 15:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-23  7:42 [Bug c/97539] New: error: definition in block 5 does not dominate use in block 24 dcb314 at hotmail dot com
2020-10-23  8:51 ` [Bug tree-optimization/97539] [10/11 Regression] ICE verify_ssa failed since r10-4200-gb7ff7cef5005721e marxin at gcc dot gnu.org
2020-10-23 11:47 ` rguenth at gcc dot gnu.org
2020-10-26  9:07 ` rguenth at gcc dot gnu.org
2020-10-26 10:34 ` cvs-commit at gcc dot gnu.org
2020-10-26 10:35 ` [Bug tree-optimization/97539] [10 " rguenth at gcc dot gnu.org
2020-12-01 15:44 ` cvs-commit at gcc dot gnu.org
2020-12-01 15:46 ` rguenth 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).