[Bug middle-end/109907] Missed optimization for bit extraction (uses shift instead of single bit-test)

2023-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109907 --- Comment #16 from Andrew Pinski --- (In reply to Andrew Pinski from comment #14) > Actually I take back on what is going on those 3. But I will be looking into > it. > > > x.0_1 = (signed long) x_4(D); > _2 = x.0_1 >> 31; > _3 = (unsi

[Bug middle-end/109907] Missed optimization for bit extraction (uses shift instead of single bit-test)

2023-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109907 --- Comment #15 from Andrew Pinski --- So there is another way of fixing this. take: Trying 6 -> 12: 6: r49:SI=r50:SI>>0x1f REG_DEAD r50:SI 12: r24:QI=r49:SI#0&0x1 REG_DEAD r49:SI Failed to match this instruction: (set (reg/i:

[Bug middle-end/109919] [14 Regression] ICE on valid code at -O2 and -O3 with "-fno-tree-dce -fno-tree-vrp" on x86_64-linux-gnu: in emit_move_insn, at expr.cc:4224

2023-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109919 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug middle-end/109919] [14 Regression] ICE on valid code at -O2 and -O3 with "-fno-tree-dce -fno-tree-vrp" on x86_64-linux-gnu: in emit_move_insn, at expr.cc:4224

2023-05-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109919 --- Comment #3 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:ee0f1f2294baaecfa0c038fe7e8361949d1ebd68 commit r14-1020-gee0f1f2294baaecfa0c038fe7e8361949d1ebd68 Author: Andrew Pinski Date: Sa

[Bug libobjc/109913] [14 regression] r14-976-g9907413a3a6aa3 causes more than 300 objc/objc++ failures

2023-05-20 Thread rep.dot.nop at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109913 --- Comment #6 from rep.dot.nop at gmail dot com --- On 21 May 2023 01:27:29 CEST, "pinskia at gcc dot gnu.org" wrote: >https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109913 > >--- Comment #5 from Andrew Pinski --- >(In reply to rep.dot@gma

[Bug middle-end/108847] [10/11/12/13/14 Regression] unnecessary bitwise AND on boolean types and shifting of the "sign" bit

2023-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108847 --- Comment #4 from Andrew Pinski --- VRP starting doing this in GCC 5: Folding statement: _5 = _4 != 0; Folded into: _5 = (bool) _4;

[Bug middle-end/108847] [10/11/12/13/14 Regression] unnecessary bitwise AND on boolean types and shifting of the "sign" bit

2023-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108847 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |14.0 Keywords|

[Bug middle-end/108847] [10/11/12/13/14 Regression] unnecessary bitwise AND on boolean types and shifting of the "sign" bit

2023-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108847 Andrew Pinski changed: What|Removed |Added Severity|enhancement |trivial

[Bug middle-end/108847] unnecessary bitwise AND on boolean types and shifting of the "sign" bit

2023-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108847 --- Comment #3 from Andrew Pinski --- So looking into this a little futher. The problem is VRP turns !=0 into (bool) and then expand comes along and decides that a cast to bool needs &1 because well it just. I am going to look into see if I can

[Bug libobjc/109913] [14 regression] r14-976-g9907413a3a6aa3 causes more than 300 objc/objc++ failures

2023-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109913 --- Comment #5 from Andrew Pinski --- (In reply to rep.dot@gmail.com from comment #4) > On 20 May 2023 00:39:45 CEST, "pinskia at gcc dot gnu.org" > wrote: > >https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109913 > > > >Andrew Pinski changed

[Bug libobjc/109913] [14 regression] r14-976-g9907413a3a6aa3 causes more than 300 objc/objc++ failures

2023-05-20 Thread rep.dot.nop at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109913 --- Comment #4 from rep.dot.nop at gmail dot com --- On 20 May 2023 00:39:45 CEST, "pinskia at gcc dot gnu.org" wrote: >https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109913 > >Andrew Pinski changed: > > What|Removed

[Bug analyzer/109432] [meta-bug] tracker bug for issues with -Wanalyzer-out-of-bounds

2023-05-20 Thread vultkayn at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109432 Bug 109432 depends on bug 109437, which changed state. Bug 109437 Summary: -Wanalyzer-out-of-bounds is emitted at most once per frame. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109437 What|Removed |Added ---

[Bug analyzer/109437] -Wanalyzer-out-of-bounds is emitted at most once per frame.

2023-05-20 Thread vultkayn at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109437 Benjamin Priour changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug analyzer/109439] RFE: Spurious -Wanalyzer-use-of-uninitialized-value tagging along -Wanalyzer-out-of-bounds

2023-05-20 Thread vultkayn at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109439 --- Comment #1 from Benjamin Priour --- *** Bug 109437 has been marked as a duplicate of this bug. ***

[Bug middle-end/109907] Missed optimization for bit extraction (uses shift instead of single bit-test)

2023-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109907 Andrew Pinski changed: What|Removed |Added Depends on|108847 | --- Comment #14 from Andrew Pinski --

[Bug middle-end/109907] Missed optimization for bit extraction (uses shift instead of single bit-test)

2023-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109907 Andrew Pinski changed: What|Removed |Added Depends on||108847 --- Comment #13 from Andrew Pins

[Bug middle-end/109919] [14 Regression] ICE on valid code at -O2 and -O3 with "-fno-tree-dce -fno-tree-vrp" on x86_64-linux-gnu: in emit_move_insn, at expr.cc:4224

2023-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109919 --- Comment #2 from Andrew Pinski --- Simple one line fix: ``` apinski@xeond:~/src/upstream-gcc/gcc/objdir/gcc$ git diff diff --git a/gcc/expr.cc b/gcc/expr.cc index 2070198acda..02f24c00148 100644 --- a/gcc/expr.cc +++ b/gcc/expr.cc @@ -12956,7

[Bug middle-end/109919] [14 Regression] ICE on valid code at -O2 and -O3 with "-fno-tree-dce -fno-tree-vrp" on x86_64-linux-gnu: in emit_move_insn, at expr.cc:4224

2023-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109919 Andrew Pinski changed: What|Removed |Added Keywords||ice-on-valid-code Assignee|un

[Bug rtl-optimization/109919] New: ICE on valid code at -O2 and -O3 with "-fno-tree-dce -fno-tree-vrp" on x86_64-linux-gnu: in emit_move_insn, at expr.cc:4224

2023-05-20 Thread zhendong.su at inf dot ethz.ch via Gcc-bugs
e-checking=yes --prefix=/local/suz-local/software/local/gcc-trunk --enable-sanitizers --enable-languages=c,c++ --disable-werror --disable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 14.0.0 20230520 (experimental) [master r14-924-gd709841ae0f] (GCC) [612] % [61

[Bug fortran/109846] Pointer-valued function reference rejected as actual argument

2023-05-20 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109846 anlauf at gcc dot gnu.org changed: What|Removed |Added Resolution|--- |FIXED Target Milestone|---

[Bug fortran/109846] Pointer-valued function reference rejected as actual argument

2023-05-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109846 --- Comment #9 from CVS Commits --- The releases/gcc-11 branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:fb47733938b352c6d84ef342fc11d2bd478d1218 commit r11-10795-gfb47733938b352c6d84ef342fc11d2bd478d1218 Author: Harald Anlauf

[Bug fortran/109846] Pointer-valued function reference rejected as actual argument

2023-05-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109846 --- Comment #8 from CVS Commits --- The releases/gcc-12 branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:7259fd5bd4c922f396465c9cfec2ec342969f9a9 commit r12-9628-g7259fd5bd4c922f396465c9cfec2ec342969f9a9 Author: Harald Anlauf

[Bug c++/109918] [10/11/12/13/14 Regression] Unexpected -Woverloaded-virtual with virtual conversion operators

2023-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109918 Andrew Pinski changed: What|Removed |Added Keywords||needs-bisection Summary|Unex

[Bug middle-end/101807] bool0 < bool1 Should expand as !bool0 &bool1 and bool0 <= bool1 as !bool0 | bool1

2023-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101807 --- Comment #6 from Andrew Pinski --- Looks like I only implemented this for do_store_flag which is good but it needs to also implemented for do_jump too. Take: ``` #define bool _Bool bool j(void); bool h(void); bool f(bool a, bool b) { if(

[Bug c++/109918] New: Unexpected -Woverloaded-virtual with virtual conversion operators

2023-05-20 Thread romain.geissler at amadeus dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109918 Bug ID: 109918 Summary: Unexpected -Woverloaded-virtual with virtual conversion operators Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal

[Bug middle-end/101807] bool0 < bool1 Should expand as !bool0 &bool1 and bool0 <= bool1 as !bool0 | bool1

2023-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101807 --- Comment #5 from Andrew Pinski --- Created attachment 55128 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55128&action=edit Patch which I am testing This one includes the cost model here. Did a quick test on mips to see it produces th

[Bug target/109257] `-masm=intel` generates weird syntax for indirect jumps

2023-05-20 Thread lh_mouse at 126 dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109257 --- Comment #6 from LIU Hao --- gcc/config/i386/i386.cc: ``` void ix86_print_operand (FILE *file, rtx x, int code) { if (code) { switch (code) { case 'A': switch (ASSEMBLER_DIALECT) {

[Bug middle-end/109917] gcctk hangs at -O0 but normally terminates at -O2

2023-05-20 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109917 --- Comment #2 from wierton <141242068 at smail dot nju.edu.cn> --- (In reply to Andrew Pinski from comment #1) > Dup of bug 109520. > > Where is this code located anyways? > > *** This bug has been marked as a duplicate of bug 109520 *** Tha

[Bug ipa/109914] --suggest-attribute=pure misdiagnoses static functions

2023-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109914 --- Comment #1 from Andrew Pinski --- *** Bug 109915 has been marked as a duplicate of this bug. ***

[Bug ipa/109915] --suggest-attribute=const misdiagnoses static functions

2023-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109915 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE Status|UNCONFIRME

[Bug middle-end/109520] compiler never terminates with an inline-asm goto and an output with high register pressure

2023-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109520 Andrew Pinski changed: What|Removed |Added CC||141242068 at smail dot nju.edu.cn ---

[Bug middle-end/109917] gcctk hangs at -O0 but normally terminates at -O2

2023-05-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109917 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE Status|UNCONFIRME

[Bug libstdc++/109891] Null pointer special handling in ostream's operator << for C-strings

2023-05-20 Thread mimomorin at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109891 --- Comment #9 from Michel Morin --- > (which even mentions the std::string((const char*)nullptr) case): > https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode_semantics.html Oh, that's good to know. Understood that PEDASSERT fits better.

[Bug c/109917] New: gcctk hangs at -O0 but normally terminates at -O2

2023-05-20 Thread 141242068 at smail dot nju.edu.cn via Gcc-bugs
ome/wierton/disk/gcc-project-trunk-compile/install --enable-languages=c,c++ --disable-bootstrap --disable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 14.0.0 20230520 (experimental) (GCC) $ gcctk --version gcc (GCC) 14.0.0 20230520 (experimental) Copyright (C)

[Bug c/96114] ICE in make_ssa_name_fn, at tree-ssanames.c:279 since r7-536-g381cdae49785fc4b

2023-05-20 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96114 Martin Uecker changed: What|Removed |Added CC||muecker at gwdg dot de --- Comment #3 fr

[Bug middle-end/80922] #pragma diagnostic ignored not honoured with -flto

2023-05-20 Thread amonakov at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80922 Alexander Monakov changed: What|Removed |Added CC||bruno at clisp dot org --- Comment #

[Bug ipa/109916] warning reported despite of "#pragma GCC diagnostic ignored", due to -flto

2023-05-20 Thread amonakov at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109916 Alexander Monakov changed: What|Removed |Added Resolution|--- |DUPLICATE Status|UNCONF

[Bug ipa/109916] New: warning reported despite of "#pragma GCC diagnostic ignored", due to -flto

2023-05-20 Thread bruno at clisp dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109916 Bug ID: 109916 Summary: warning reported despite of "#pragma GCC diagnostic ignored", due to -flto Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: n

[Bug ipa/109915] New: --suggest-attribute=const misdiagnoses static functions

2023-05-20 Thread bruno at clisp dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109915 Bug ID: 109915 Summary: --suggest-attribute=const misdiagnoses static functions Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal Pri

[Bug ipa/85734] --suggest-attribute=malloc misdiagnoses static functions

2023-05-20 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85734 --- Comment #6 from Sam James --- Paul noted at https://lists.gnu.org/archive/html/bug-gnulib/2023-05/msg00139.html that this seems to have come back, but interestingly, this bug never got closed in the first place.

[Bug ipa/109914] New: --suggest-attribute=pure misdiagnoses static functions

2023-05-20 Thread bruno at clisp dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109914 Bug ID: 109914 Summary: --suggest-attribute=pure misdiagnoses static functions Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Co

[Bug middle-end/109505] (t | 15) & svcntb() causes an OOM/ICE

2023-05-20 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109505 Jakub Jelinek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned

[Bug middle-end/109907] Missed optimization for bit extraction (uses shift instead of single bit-test)

2023-05-20 Thread gjl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109907 --- Comment #12 from Georg-Johann Lay --- ...my bad, I tried "extzv", which didn't work out as expected. So we have shifts : bit-extract = 3 : 2. Is it worth trying to write combine patterns to catch this? Or will there be better lowering for

[Bug middle-end/109907] Missed optimization for bit extraction (uses shift instead of single bit-test)

2023-05-20 Thread gjl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109907 --- Comment #11 from Georg-Johann Lay --- I tried with the test case, but the expensive shifts are still there except for the cset_32bit30_not case, which improved as noted above. cset_32bit30 however goes from the 3-instruction code to: cset_

[Bug middle-end/109505] (t | 15) & svcntb() causes an OOM/ICE

2023-05-20 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109505 --- Comment #17 from Sam James --- Is there by chance a workaround we can apply for this downstream (some flag)? It prevents building Chromium on arm64 for us w/ gcc unfortunately.