public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/113373] New: ice in verify_ssa
@ 2024-01-13  9:43 dcb314 at hotmail dot com
  2024-01-13 14:47 ` [Bug tree-optimization/113373] [14 regression] ICE " dcb314 at hotmail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: dcb314 at hotmail dot com @ 2024-01-13  9:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113373
           Summary: ice in verify_ssa
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Created attachment 57069
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57069&action=edit
C++ source code

Still some fallout from recent gcc trunk changes.

The attached code does this:

foundBugs $ /home/dcb38/gcc/results.20231221.asan.ubsan/bin/g++ -c -w -O3
-march=znver3 bug996.cc
foundBugs $ /home/dcb38/gcc/results.20231227.asan.ubsan/bin/g++ -c -w -O3
-march=znver3 bug996.cc
../sdk/angelscript/source/as_restore.cpp: In member function ‘void
asCReader::TranslateFunction(asCScriptFunction*)’:
../sdk/angelscript/source/as_restore.cpp:2824:6: error: definition in block 453
does not dominate use in block 457
for SSA_NAME: _1244 in statement:
size_1336 = PHI <_1244(457), 0(227)>
PHI argument
_1244
for PHI node
size_1336 = PHI <_1244(457), 0(227)>
during GIMPLE pass: vect
../sdk/angelscript/source/as_restore.cpp:2824:6: internal compiler error:
verify_ssa failed

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

* [Bug tree-optimization/113373] [14 regression] ICE in verify_ssa
  2024-01-13  9:43 [Bug c++/113373] New: ice in verify_ssa dcb314 at hotmail dot com
@ 2024-01-13 14:47 ` dcb314 at hotmail dot com
  2024-01-13 21:22 ` dcb314 at hotmail dot com
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dcb314 at hotmail dot com @ 2024-01-13 14:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from David Binderman <dcb314 at hotmail dot com> ---
$  /home/dcb38/gcc/results.20231221.asan.ubsan/bin/g++  -v 2>&1 | grep exp
gcc version 14.0.0 20231221 (experimental) (514ea1df444ca7f6) 
$  /home/dcb38/gcc/results.20231227.asan.ubsan/bin/g++  -v 2>&1 | grep expgcc
version 14.0.0 20231227 (experimental) (f19ceb2d49afdfa5) 
$ git log 514ea1df444ca7f6..f19ceb2d49afdfa5 | grep -c "^commit"
83
$

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

* [Bug tree-optimization/113373] [14 regression] ICE in verify_ssa
  2024-01-13  9:43 [Bug c++/113373] New: ice in verify_ssa dcb314 at hotmail dot com
  2024-01-13 14:47 ` [Bug tree-optimization/113373] [14 regression] ICE " dcb314 at hotmail dot com
@ 2024-01-13 21:22 ` dcb314 at hotmail dot com
  2024-01-13 21:27 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dcb314 at hotmail dot com @ 2024-01-13 21:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from David Binderman <dcb314 at hotmail dot com> ---
Reducing ...

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

* [Bug tree-optimization/113373] [14 regression] ICE in verify_ssa
  2024-01-13  9:43 [Bug c++/113373] New: ice in verify_ssa dcb314 at hotmail dot com
  2024-01-13 14:47 ` [Bug tree-optimization/113373] [14 regression] ICE " dcb314 at hotmail dot com
  2024-01-13 21:22 ` dcb314 at hotmail dot com
@ 2024-01-13 21:27 ` pinskia at gcc dot gnu.org
  2024-01-13 21:45 ` dcb314 at hotmail dot com
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-13 21:27 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0
           Keywords|                            |ice-on-valid-code

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

* [Bug tree-optimization/113373] [14 regression] ICE in verify_ssa
  2024-01-13  9:43 [Bug c++/113373] New: ice in verify_ssa dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2024-01-13 21:27 ` pinskia at gcc dot gnu.org
@ 2024-01-13 21:45 ` dcb314 at hotmail dot com
  2024-01-13 22:56 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dcb314 at hotmail dot com @ 2024-01-13 21:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from David Binderman <dcb314 at hotmail dot com> ---
Reduced C++ code seems to be:

void __assert_fail(char *, char *, int, const char *)
    __attribute__((__noreturn__));
template <class T> struct asCArray {
  asCArray(int);
  T &operator[](unsigned);
  T *array;
  int length;
};
template <class T> T &asCArray<T>::operator[](unsigned index) {
  index < length ? void() : __assert_fail("", "", 8, __PRETTY_FUNCTION__);
  return array[index];
}
unsigned asCReaderTranslateFunction_bc_1;
int asCReaderTranslateFunction_bcLength;
void asCReaderTranslateFunction() {
  asCArray<unsigned> bcSizes(asCReaderTranslateFunction_bcLength);
  int offset, size;
  for (int num; offset--; num++)
    size += bcSizes[num];
  asCReaderTranslateFunction_bc_1 = size;
}

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

* [Bug tree-optimization/113373] [14 regression] ICE in verify_ssa
  2024-01-13  9:43 [Bug c++/113373] New: ice in verify_ssa dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2024-01-13 21:45 ` dcb314 at hotmail dot com
@ 2024-01-13 22:56 ` pinskia at gcc dot gnu.org
  2024-01-13 22:56 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-13 22:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 57076
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57076&action=edit
Reduced C testcase

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

* [Bug tree-optimization/113373] [14 regression] ICE in verify_ssa
  2024-01-13  9:43 [Bug c++/113373] New: ice in verify_ssa dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2024-01-13 22:56 ` pinskia at gcc dot gnu.org
@ 2024-01-13 22:56 ` pinskia at gcc dot gnu.org
  2024-01-15  8:32 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-13 22:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-01-13
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

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

* [Bug tree-optimization/113373] [14 regression] ICE in verify_ssa
  2024-01-13  9:43 [Bug c++/113373] New: ice in verify_ssa dcb314 at hotmail dot com
                   ` (5 preceding siblings ...)
  2024-01-13 22:56 ` pinskia at gcc dot gnu.org
@ 2024-01-15  8:32 ` rguenth at gcc dot gnu.org
  2024-01-15  8:49 ` [Bug tree-optimization/113373] [14 regression] ICE in verify_ssa since r14-6822 jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-15  8:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1

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

* [Bug tree-optimization/113373] [14 regression] ICE in verify_ssa since r14-6822
  2024-01-13  9:43 [Bug c++/113373] New: ice in verify_ssa dcb314 at hotmail dot com
                   ` (6 preceding siblings ...)
  2024-01-15  8:32 ` rguenth at gcc dot gnu.org
@ 2024-01-15  8:49 ` jakub at gcc dot gnu.org
  2024-01-16 13:57 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-01-15  8:49 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org
            Summary|[14 regression] ICE in      |[14 regression] ICE in
                   |verify_ssa                  |verify_ssa since r14-6822

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r14-6822-g01f4251b8775c832a92d55e2df57c9ac72eaceef

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

* [Bug tree-optimization/113373] [14 regression] ICE in verify_ssa since r14-6822
  2024-01-13  9:43 [Bug c++/113373] New: ice in verify_ssa dcb314 at hotmail dot com
                   ` (7 preceding siblings ...)
  2024-01-15  8:49 ` [Bug tree-optimization/113373] [14 regression] ICE in verify_ssa since r14-6822 jakub at gcc dot gnu.org
@ 2024-01-16 13:57 ` rguenth at gcc dot gnu.org
  2024-01-22  7:50 ` cvs-commit at gcc dot gnu.org
  2024-01-22  7:50 ` rguenth at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-16 13:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
All good after vect_do_peeling.  It's wrecked by
vect_create_epilog_for_reduction here:

          scalar_result = scalar_results[k];
          FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, orig_name)
            {
              FOR_EACH_IMM_USE_ON_STMT (use_p, imm_iter)
                SET_USE (use_p, scalar_result);
              update_stmt (use_stmt);

we have two reduction epilogues, one for the early and one for the late
exit but we mismatch the scalar use to replace.

We're also picking up a reduction that's only live on one edge on the other
(but that doesn't seem to result in a problem here).

It also seems we're doing epilogue code generation before creating some
exit PHIs required for that - vect_do_peeling fails to do that.

We can try to hack around that a bit, but there's more issues with this
testcase, like we generate useless epilogues - it seems we should
identify the scalar exit PHI to transform when calling epilogue generation
for a specific edge and skip if there isn't one.

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

* [Bug tree-optimization/113373] [14 regression] ICE in verify_ssa since r14-6822
  2024-01-13  9:43 [Bug c++/113373] New: ice in verify_ssa dcb314 at hotmail dot com
                   ` (8 preceding siblings ...)
  2024-01-16 13:57 ` rguenth at gcc dot gnu.org
@ 2024-01-22  7:50 ` cvs-commit at gcc dot gnu.org
  2024-01-22  7:50 ` rguenth at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-22  7:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from GCC 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:86f3cbdaa6f60eaff1cdb4ab2f1a9bc796b67207

commit r14-8330-g86f3cbdaa6f60eaff1cdb4ab2f1a9bc796b67207
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Jan 19 13:55:09 2024 +0100

    tree-optimization/113373 - add missing LC PHIs for live operations

    The following makes reduction epilogue code generation happy by properly
    adding LC PHIs to the exit blocks for multiple exit vectorized loops.

    Some refactoring might make the flow easier to follow but I've refrained
    from doing that with this patch.

    I've kept some fixes in reduction epilogue generation from the earlier
    attempt fixing this PR.

            PR tree-optimization/113373
            * tree-vect-loop-manip.cc (slpeel_tree_duplicate_loop_to_edge_cfg):
            Create LC PHIs in the exit blocks where necessary.
            * tree-vect-loop.cc (vectorizable_live_operation): Do not try
            to handle missing LC PHIs.
            (find_connected_edge): Remove.
            (vect_create_epilog_for_reduction): Cleanup use of auto_vec.

            * gcc.dg/vect/vect-early-break_104-pr113373.c: New testcase.

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

* [Bug tree-optimization/113373] [14 regression] ICE in verify_ssa since r14-6822
  2024-01-13  9:43 [Bug c++/113373] New: ice in verify_ssa dcb314 at hotmail dot com
                   ` (9 preceding siblings ...)
  2024-01-22  7:50 ` cvs-commit at gcc dot gnu.org
@ 2024-01-22  7:50 ` rguenth at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-22  7:50 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2024-01-22  7:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-13  9:43 [Bug c++/113373] New: ice in verify_ssa dcb314 at hotmail dot com
2024-01-13 14:47 ` [Bug tree-optimization/113373] [14 regression] ICE " dcb314 at hotmail dot com
2024-01-13 21:22 ` dcb314 at hotmail dot com
2024-01-13 21:27 ` pinskia at gcc dot gnu.org
2024-01-13 21:45 ` dcb314 at hotmail dot com
2024-01-13 22:56 ` pinskia at gcc dot gnu.org
2024-01-13 22:56 ` pinskia at gcc dot gnu.org
2024-01-15  8:32 ` rguenth at gcc dot gnu.org
2024-01-15  8:49 ` [Bug tree-optimization/113373] [14 regression] ICE in verify_ssa since r14-6822 jakub at gcc dot gnu.org
2024-01-16 13:57 ` rguenth at gcc dot gnu.org
2024-01-22  7:50 ` cvs-commit at gcc dot gnu.org
2024-01-22  7:50 ` 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).