[Bug tree-optimization/105832] [13/14 Regression] Dead Code Elimination Regression at -O3 (trunk vs. 12.1.0)

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105832 --- Comment #16 from Andrew Pinski --- Created attachment 55833 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55833&action=edit Patch which I am testing

[Bug tree-optimization/105832] [13/14 Regression] Dead Code Elimination Regression at -O3 (trunk vs. 12.1.0)

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105832 --- Comment #15 from Andrew Pinski --- So there is a pattern for: /* Simplify ((C <> x) & D) != 0 where C and D are power of two constants, either to false if D is smaller (unsigned comparison) than C, or to x == log2 (D) - log2 (C). Simi

[Bug c++/111274] ice in fixup_blocks_walker with -O1 and -fopenmp

2023-09-02 Thread sandra at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111274 --- Comment #9 from sandra at gcc dot gnu.org --- The problem is that it's tripping over a BIND_EXPR with a null BIND_EXPR_BLOCK. The attached patch stops the testcase from ICE'ing but hasn't been otherwise tested yet. I'm not sure what a null B

[Bug c++/111274] ice in fixup_blocks_walker with -O1 and -fopenmp

2023-09-02 Thread sandra at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111274 --- Comment #8 from sandra at gcc dot gnu.org --- Created attachment 55832 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55832&action=edit first attempt at fix

[Bug tree-optimization/103536] Suboptimal codegen for && and || combination.

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103536 --- Comment #4 from Andrew Pinski --- Note with `--param=logical-op-non-short-circuit=0` this is optimized earlier due to getting many bb instead of ``` _1 = a_4(D) | b_5(D); if (_1 != 0) goto ; [INV] else goto ; [INV] : _2 =

[Bug rtl-optimization/31889] compiler misses opportunity to combine multiple identical function return paths

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31889 --- Comment #6 from Andrew Pinski --- (In reply to Andrew Pinski from comment #5) > Except it is no longer fixed by that. That broke in GCC 10. It broke in GCC 10 because we now have: ``` if (_10 < _12) goto ; [1.04%] else goto ; [9

[Bug middle-end/63311] [11/12 Regression] -O1 optimization introduces valgrind warning

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63311 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug tree-optimization/67628] [tree-optimization] (a && b) && c shows better codegen than a && (b && c)

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67628 Andrew Pinski changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned a

[Bug tree-optimization/25643] VRP does not remove -fbounds-check for Fortran

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25643 --- Comment #14 from Andrew Pinski --- So the difference now is: ``` void f0(int n, float *v) { int i; if (n <= 0) return; else { i = 1; do { if (i > n) __builtin_abort (); v[i] = 0.0; i++;

[Bug tree-optimization/111276] rewrite_to_defined_overflow rewrites already defined code

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111276 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2023-09-03 Status|UNCONFIRM

[Bug tree-optimization/111276] New: rewrite_to_defined_overflow rewrites already defined code

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111276 Bug ID: 111276 Summary: rewrite_to_defined_overflow rewrites already defined code Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: compile-time-hog, in

[Bug c++/102609] [C++23] P0847R7 - Deducing this

2023-09-02 Thread gasper.azman at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102609 --- Comment #19 from Gašper Ažman --- Correct, the use of the capture is the source of the error, not the instantiation with an unrelated type. On Sat, Sep 2, 2023, 09:54 waffl3x at protonmail dot com < gcc-bugzi...@gcc.gnu.org> wrote: > https

[Bug tree-optimization/111275] New: ifcombine and reassociation does not like to produce `a ^ b` sometimes

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111275 Bug ID: 111275 Summary: ifcombine and reassociation does not like to produce `a ^ b` sometimes Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: missed-

[Bug rtl-optimization/99199] [11/12/13/14 Regression] Very large boolean expression leads to quite a few return statements

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99199 Andrew Pinski changed: What|Removed |Added CC||pinskia at gcc dot gnu.org --- Comment #

[Bug tree-optimization/111273] Spurious array-bounds error when copying data using _GLIBCXX_DEBUG iterators

2023-09-02 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111273 --- Comment #1 from Jonathan Wakely --- That's not an error, it's a warning. It's only an error because you asked for it to be an error.

[Bug tree-optimization/110413] [14 Regression] Missed Dead Code Elimination when using __builtin_unreachable since r14-1880-g827e208fa64

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110413 --- Comment #2 from Andrew Pinski --- I noticed on many of these, the return value of the static function is an address (constant). Seems like we could do something like IPA-CCP for return values. And that will fix almost all of them ...

[Bug middle-end/104986] [12/13/14 Regression] bogus writing 1 byte into a region of size 0 with -fwrapv and -O2 -fpeel-loops since r12-4698-gf6d012338bf87f42

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104986 Andrew Pinski changed: What|Removed |Added Keywords||needs-bisection Known to work|

[Bug tree-optimization/52708] suboptimal code with __builtin_constant_p

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52708 Andrew Pinski changed: What|Removed |Added Assignee|pinskia at gcc dot gnu.org |unassigned at gcc dot gnu.org

[Bug libstdc++/83077] sso-string @ gnu-versioned-namespace.

2023-09-02 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83077 --- Comment #9 from Iain Sandoe --- (In reply to Iain Sandoe from comment #8) > (In reply to François Dumont from comment #7) > > Sure, if you follow the email thread you'll see my latest patch: > > > > https://gcc.gnu.org/pipermail/gcc-patches/

[Bug c++/111274] ice in fixup_blocks_walker with -O1 and -fopenmp

2023-09-02 Thread sandra at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111274 sandra at gcc dot gnu.org changed: What|Removed |Added Last reconfirmed||2023-09-02 Statu

[Bug tree-optimization/110131] [12/13/14 Regression] Missed Dead Code Elimination when using __builtin_unreachable since r12-6924-gc2b610e7c6c

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110131 --- Comment #9 from Andrew Pinski --- (In reply to Andrew Pinski from comment #4) > So maybe: > ``` > (simplify > (cond > (eq:c@3 (convert1? @0) INTEGER_CST@1) > (convert2? @0) > INTEGER_CST@2 > ) > (if (INTEGRAL_TYPE_P (type)) > (con

[Bug tree-optimization/110131] [12/13/14 Regression] Missed Dead Code Elimination when using __builtin_unreachable since r12-6924-gc2b610e7c6c

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110131 Andrew Pinski changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c++/111274] ice in fixup_blocks_walker with -O1 and -fopenmp

2023-09-02 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111274 --- Comment #6 from David Binderman --- $ git bisect good 143151ac2013c22e 53891f18f32588d86ba0ec1c5e6206df63be714b is the first bad commit commit 53891f18f32588d86ba0ec1c5e6206df63be714b Author: Sandra Loosemore Date: Thu Aug 24 17:35:00 202

[Bug c++/111274] ice in fixup_blocks_walker with -O1 and -fopenmp

2023-09-02 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111274 David Binderman changed: What|Removed |Added CC||sandra at codesourcery dot com --- Co

[Bug c++/111274] ice in fixup_blocks_walker with -O1 and -fopenmp

2023-09-02 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111274 --- Comment #4 from David Binderman --- Git range is g:4024ddbe50c2d1cb .. g:87f9b6c2cfd7b829, so 9 commits left.

[Bug c++/111274] ice in fixup_blocks_walker with -O1 and -fopenmp

2023-09-02 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111274 --- Comment #3 from David Binderman --- All the OpenMP commits in that range are by Sandra Loosemore . Not sure yet, but a likely candidate so far.

[Bug c++/111274] ice in fixup_blocks_walker with -O1 and -fopenmp

2023-09-02 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111274 --- Comment #2 from David Binderman --- In git, there are 71 commits, so trying g:c28c579f0dd9cd27.

[Bug analyzer/110529] Analyzer fails to handle computed goto

2023-09-02 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110529 David Malcolm changed: What|Removed |Added Status|UNCONFIRMED |NEW Summary|-Wanalyzer-null-

[Bug analyzer/111213] -Wanalyzer-out-of-bounds false negative with `return arr[9];` at -O1 and above

2023-09-02 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111213 David Malcolm changed: What|Removed |Added Summary|-Wanalyzer-out-of-bounds|-Wanalyzer-out-of-bounds

[Bug c++/111274] ice in fixup_blocks_walker with -O1 and -fopenmp

2023-09-02 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111274 --- Comment #1 from David Binderman --- Reduced C++ code seems to be: struct _Vector_base { ~_Vector_base(); }; int ColumnSmallestLastOrdering_OMP_i_MaxNumThreads, ColumnSmallestLastOrdering_OMP_i_MaxDegree; void ColumnSmallestLastOrderin

[Bug c++/111274] New: ice in fixup_blocks_walker with -O1 and -fopenmp

2023-09-02 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111274 Bug ID: 111274 Summary: ice in fixup_blocks_walker with -O1 and -fopenmp Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Compone

[Bug libstdc++/83077] sso-string @ gnu-versioned-namespace.

2023-09-02 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83077 --- Comment #8 from Iain Sandoe --- (In reply to François Dumont from comment #7) > Sure, if you follow the email thread you'll see my latest patch: > > https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628399.html Well, I thought I have th

[Bug c++/102609] [C++23] P0847R7 - Deducing this

2023-09-02 Thread waffl3x at protonmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102609 --- Comment #18 from waffl3x --- (In reply to Gašper Ažman from comment #17) > Read through the patch quickly, want to suggest a few tests. > > When a lambda has captures, the explicit object parameter is used to get at > them *silently*, if th

[Bug tree-optimization/107765] missing (int)-(unsigned)int_val to just -int_val if int_val is known not to contain INT_MIN

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107765 --- Comment #5 from Andrew Pinski --- (In reply to Andrew Pinski from comment #4) > (In reply to Andrew Pinski from comment #2) > > Patch posted: > > https://gcc.gnu.org/pipermail/gcc-patches/2023-September/629018.html > > What I can do is exte

[Bug libstdc++/111050] [11/12/13/14 Regression] ABI break in _Hash_node_value_base since GCC 11

2023-09-02 Thread fdumont at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111050 --- Comment #3 from François Dumont --- For sure _Hash_node layout didn't change, that's why I couldn't think of any abi issue here. I see that you already had the solution ! It was some kind of test then, I failed :-). Did you try it ? If you

[Bug libstdc++/83077] sso-string @ gnu-versioned-namespace.

2023-09-02 Thread fdumont at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83077 --- Comment #7 from François Dumont --- Sure, if you follow the email thread you'll see my latest patch: https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628399.html

[Bug tree-optimization/107765] missing (int)-(unsigned)int_val to just -int_val if int_val is known not to contain INT_MIN

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107765 Andrew Pinski changed: What|Removed |Added URL|https://gcc.gnu.org/piperma | |il/gcc-patches/2023

[Bug tree-optimization/107137] (unsigned)-(int)(bool_var) should be optimized to -(unsigned)bool_var

2023-09-02 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107137 Andrew Pinski changed: What|Removed |Added URL|https://gcc.gnu.org/piperma |https://gcc.gnu.org/piperma