[Bug tree-optimization/106909] [13 Regression] error: control flow in the middle of basic block since r13-2541-g78ef801b7263606d

2022-09-13 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106909

Richard Biener  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #7 from Richard Biener  ---
Fixed.

[Bug tree-optimization/106909] [13 Regression] error: control flow in the middle of basic block since r13-2541-g78ef801b7263606d

2022-09-13 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106909

--- Comment #6 from CVS Commits  ---
The master branch has been updated by Richard Biener :

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

commit r13-2640-g2c867232df70d3de304714906b4198ecb262eb32
Author: Richard Biener 
Date:   Tue Sep 13 08:59:41 2022 +0200

middle-end/106909 - CTRL altering flag after folding

The following makes sure to clear the CTRL altering flag when
folding emits a __builitin_unreachable in place of a virtual call
which now might become a trap.

PR middle-end/106909
* gimple-fold.cc (gimple_fold_call): Clear the ctrl-altering
flag of a unreachable call.

[Bug tree-optimization/106909] [13 Regression] error: control flow in the middle of basic block since r13-2541-g78ef801b7263606d

2022-09-13 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106909

Richard Biener  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Status|NEW |ASSIGNED

--- Comment #5 from Richard Biener  ---
 [local count: 1073741824]:
_80 = SR.96_116(D);
# DEBUG this => SR.96_116(D)
# DEBUG firstElement => ptrCopy_79(D)
# DEBUG elementCount => sizeCopy_83(D)
# DEBUG capacity => sizeCopy_83(D)
# DEBUG INLINE_ENTRY dispose
# DEBUG firstElement => ptrCopy_79(D)
# DEBUG elementCount => sizeCopy_83(D)
# DEBUG capacity => sizeCopy_83(D)
# DEBUG disposer => SR.96_116(D)
# DEBUG INLINE_ENTRY dispose
_81 = MEM[(const struct ArrayDisposer *)SR.96_116(D)]._vptr.ArrayDisposer;
_82 = *_81;
__builtin_unreachable ();
# DEBUG firstElement => NULL
# DEBUG elementCount => NULL
# DEBUG capacity => NULL
# DEBUG disposer => NULL
# DEBUG this => NULL
# DEBUG firstElement => NULL
# DEBUG elementCount => NULL
# DEBUG capacity => NULL

after some folding.  I fear this is the general
gimple_build_builtin_unreachable
which is now generally used but esp. folding should _not_ mark the call
as control altering but leave that to CFG fixup (CFG cleanup doesn't catch
this since it only looks at the last stmt of BBs).

I'm fixing up in the use.

[Bug tree-optimization/106909] [13 Regression] error: control flow in the middle of basic block since r13-2541-g78ef801b7263606d

2022-09-12 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106909

Martin Liška  changed:

   What|Removed |Added

  Attachment #53563|0   |1
is obsolete||
  Attachment #53566|0   |1
is obsolete||

--- Comment #4 from Martin Liška  ---
Created attachment 53567
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53567=edit
Reduced test-case

[Bug tree-optimization/106909] [13 Regression] error: control flow in the middle of basic block since r13-2541-g78ef801b7263606d

2022-09-12 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106909

Martin Liška  changed:

   What|Removed |Added

   Last reconfirmed||2022-09-12
 CC||marxin at gcc dot gnu.org,
   ||rguenth at gcc dot gnu.org
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
Summary|[13 Regression] error:  |[13 Regression] error:
   |control flow in the middle  |control flow in the middle
   |of basic block  |of basic block since
   ||r13-2541-g78ef801b7263606d

--- Comment #3 from Martin Liška  ---
Started with r13-2541-g78ef801b7263606d.

[Bug tree-optimization/106909] [13 Regression] error: control flow in the middle of basic block

2022-09-12 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106909

--- Comment #2 from David Binderman  ---
Created attachment 53566
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53566=edit
C++ source code

After an hour of reduction, this is what remains.

[Bug tree-optimization/106909] [13 Regression] error: control flow in the middle of basic block

2022-09-12 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106909

Andrew Pinski  changed:

   What|Removed |Added

Version|12.0|13.0
Summary|error: control flow in the  |[13 Regression] error:
   |middle of basic block   |control flow in the middle
   ||of basic block
   Target Milestone|--- |13.0