[Bug c/110910] New: weakref should allow incomplete array type

2023-08-04 Thread jrtc27 at jrtc27 dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110910 Bug ID: 110910 Summary: weakref should allow incomplete array type Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c

[Bug libstdc++/110909] Missed optimization: Suboptimal codegen in vector copy assignment

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110909 Andrew Pinski changed: What|Removed |Added Component|c++ |libstdc++ --- Comment #1 from Andrew

[Bug c++/110909] New: Suboptimal codegen in vector copy assignment

2023-08-04 Thread hiraditya at msn dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110909 Bug ID: 110909 Summary: Suboptimal codegen in vector copy assignment Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug tree-optimization/96695] Failure to optimize combination of pointer comparison to nullptr and another pointer

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

[Bug fortran/110888] Missing optimization for trivial MATMUL cases, requires -fno-signed-zeros

2023-08-04 Thread rimvydas.jas at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110888 --- Comment #5 from Rimvydas (RJ) --- It is more like this problem: $ cat foo.c void foo_(double *x, double *y, double *z) { int i; __builtin_memset(z, 0, 8); /* z[0] = 0.0; */ for (i=0; i<1 ; i++) z[0] += x[0] * y[0]; } $ gcc -O2

[Bug target/108743] [objective-c, NeXT runtime] -fconstant-cfstrings not supported

2023-08-04 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108743 --- Comment #12 from Eric Gallager --- So I'm assuming this is staying open for backports to the 12 and 11 branches?

[Bug tree-optimization/56096] Sub-optimal code generated for conditional shift

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56096 --- Comment #4 from Andrew Pinski --- I think one way to improve the constant forming is during isel if we have condition exec (e.g. arm or ia64) we should transform: _7 = _1 != 0; _8 = (int) _7; _9 = _8 << 3; to: _9 = _1 ? 8 : 0; That

[Bug tree-optimization/56096] Sub-optimal code generated for conditional shift

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56096 --- Comment #3 from Andrew Pinski --- GCC 7-10 produced: movwr3, #32896 tst r1, r3 it ne lsrne r0, r0, #8 bx lr But GCC 11 produces: movwr3, #32896 tst r1, r3

[Bug tree-optimization/70901] vectorized sin cos is wrongly optimized into scalar sincos

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70901 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement

[Bug tree-optimization/88387] Possible code optimization when right shift count >= width of type

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88387 Andrew Pinski changed: What|Removed |Added Resolution|--- |INVALID Target Milestone|---

[Bug tree-optimization/84997] Optimize integer operations on floating point constants without -ffast-math but with -fno-trapping-math

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84997 Andrew Pinski changed: What|Removed |Added Summary|Optimize integer operations |Optimize integer operations

[Bug tree-optimization/20514] hoisting of label out of jumptable would take place at cse, should happen at trees

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=20514 --- Comment #9 from Andrew Pinski --- in GCC 13+ we get now (for the testcase in comment #0) at -O3: ``` [local count: 452984831]: # i_lsm.4_2 = PHI if (i_lsm.4_2 == 5) goto ; [25.00%] else goto ; [75.00%] [local count:

[Bug tree-optimization/80740] Aliasing with the return value

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80740 Andrew Pinski changed: What|Removed |Added Last reconfirmed|2021-05-25 00:00:00 |2023-8-4 Severity|normal

[Bug tree-optimization/53947] [meta-bug] vectorizer missed-optimizations

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947 Bug 53947 depends on bug 49773, which changed state. Bug 49773 Summary: use of class data members prevent vectorization https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49773 What|Removed |Added

[Bug tree-optimization/49773] use of class data members prevent vectorization

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49773 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Target Milestone|---

[Bug target/110908] [aarch64] Internal compiler error when using -ffixed-x30

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110908 --- Comment #3 from Andrew Pinski --- This is most likely the fix: diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 7cd230c4602..4d26c8789ce 100644 --- a/gcc/config/aarch64/aarch64.cc +++

[Bug target/110908] [aarch64] Internal compiler error when using -ffixed-x30

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110908 --- Comment #2 from Andrew Pinski --- Does LLVM still save/restore LR with -ffixed-x30 ?

[Bug target/110908] [aarch64] Internal compiler error when using -ffixed-x30

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110908 --- Comment #1 from Andrew Pinski --- ``` Treat the register named reg as a fixed register; generated code should never refer to it (except perhaps as a stack pointer, frame pointer or in some other fixed role). ```

[Bug tree-optimization/69489] missed vectorization for boolean loop, missed if-conversion

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69489 Andrew Pinski changed: What|Removed |Added Last reconfirmed|2016-01-26 00:00:00 |2023-8-4 --- Comment #20 from Andrew

[Bug target/110908] New: [aarch64] Internal compiler error when using -ffixed-x30

2023-08-04 Thread zach-gcc at cs dot stanford.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110908 Bug ID: 110908 Summary: [aarch64] Internal compiler error when using -ffixed-x30 Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal

Re: Re: cpymem for RISCV with v extension

2023-08-04 Thread 钟居哲
>> Umm, this patch has been queued up for at least a couple weeks now. Oh. I am sorry I didn't see this patch since this patch doesn't CC me. I didn't subscribe GCC-patch, so I may miss some patches that didn't explicitly CC me. I just happen to see your reply email today then reply.

Re: Re: cpymem for RISCV with v extension

2023-08-04 Thread 钟居哲
>> Testing what specifically? Are you asking for correctness tests, >> performance/code quality tests? Add memcpy test using RVV instructions, just like we are adding testcases for auto-vectorization support. For example: #include #include #include void foo (int32_t * a, int32_t * b, int

Re: [PATCH-1, combine] Don't widen shift mode when target has rotate/mask instruction on original mode [PR93738]

2023-08-04 Thread Jeff Law via Gcc-patches
On 7/20/23 18:59, HAO CHEN GUI wrote: Hi Jeff, 在 2023/7/21 5:27, Jeff Law 写道: Wouldn't it make more sense to just try rotate/mask in the original mode before trying a shift in a widened mode?  I'm not sure why we need a target hook here. There is no change to try rotate/mask with the

Re: cpymem for RISCV with v extension

2023-08-04 Thread Jeff Law via Gcc-patches
On 8/4/23 17:10, 钟居哲 wrote: Could you add testcases for this patch? Testing what specifically? Are you asking for correctness tests, performance/code quality tests? +;; The (use (and (match_dup 1) (const_int 127))) is here to prevent the +;; optimizers from changing cpymem_loop_* into

cpymem for RISCV with v extension

2023-08-04 Thread 钟居哲
Could you add testcases for this patch? +;; The (use (and (match_dup 1) (const_int 127))) is here to prevent the +;; optimizers from changing cpymem_loop_* into this. +(define_insn "@cpymem_straight" + [(set (mem:BLK (match_operand:P 0 "register_operand" "r,r")) + (mem:BLK (match_operand:P

[Bug c++/110905] GCC rejects constexpr code that may re-initialize union member

2023-08-04 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110905 --- Comment #4 from danakj at orodu dot net --- Ok it only happens if the VecIntoIter class has a base class, even when it's empty the bug reproduces. But when I remove the IteratorBase base class, then GCC compiles it correctly. It's getting

[Bug tree-optimization/57650] Suboptimal code after TRUTH_AND_EXPR is changed into BIT_AND_EXPR

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57650 --- Comment #3 from Andrew Pinski --- Note I have seen differences like this due to just different FREE_SSANAMES happening too.

Re: Update and Questions on CPython Extension Module -fanalyzer plugin development

2023-08-04 Thread David Malcolm via Gcc
On Fri, 2023-08-04 at 18:42 -0400, David Malcolm wrote: > On Fri, 2023-08-04 at 16:48 -0400, Eric Feng wrote: > > On Fri, Aug 4, 2023 at 11:39 AM David Malcolm > > wrote: > > > > > > On Fri, 2023-08-04 at 11:02 -0400, Eric Feng wrote: > > > > Hi Dave, > > > > > > > > Tests related to our plugin

Re: Update and Questions on CPython Extension Module -fanalyzer plugin development

2023-08-04 Thread David Malcolm via Gcc
On Fri, 2023-08-04 at 16:48 -0400, Eric Feng wrote: > On Fri, Aug 4, 2023 at 11:39 AM David Malcolm > wrote: > > > > On Fri, 2023-08-04 at 11:02 -0400, Eric Feng wrote: > > > Hi Dave, > > > > > > Tests related to our plugin which depend on Python-specific > > > definitions have been run by

[Bug tree-optimization/57650] Suboptimal code after TRUTH_AND_EXPR is changed into BIT_AND_EXPR

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57650 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED

gcc-12-20230804 is now available

2023-08-04 Thread GCC Administrator via Gcc
Snapshot gcc-12-20230804 is now available on https://gcc.gnu.org/pub/gcc/snapshots/12-20230804/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 12 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch

[Bug tree-optimization/53806] Missed optimization (a<=b)&&(a>=b) with trapping

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53806 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 See Also|

[Bug tree-optimization/96167] fails to detect ROL pattern in simple case, but succeeds when operand goes through memcpy

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96167 Andrew Pinski changed: What|Removed |Added CC||msebor at gcc dot gnu.org --- Comment

[Bug tree-optimization/93721] swapping adjacent scalars could be more efficient

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

[Bug target/106265] RISC-V SPEC2017 507.cactu code bloat due to address generation

2023-08-04 Thread vineetg at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106265 Vineet Gupta changed: What|Removed |Added CC||vineetg at gcc dot gnu.org --- Comment

[Bug c++/110905] GCC rejects constexpr code that may re-initialize union member

2023-08-04 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110905 --- Comment #3 from danakj at orodu dot net --- Repro down from 37k to under 1000 lines now: https://godbolt.org/z/enMxaqjb6

[Bug tree-optimization/97225] Failure to optimize out conditional addition of zero

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

[Bug tree-optimization/96167] fails to detect ROL pattern in simple case, but succeeds when operand goes through memcpy

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96167 Andrew Pinski changed: What|Removed |Added Known to work||12.1.0 Known to fail|

Re: [PATCH 1/5] Middle-end _BitInt support [PR102989]

2023-08-04 Thread Joseph Myers
On Fri, 4 Aug 2023, Richard Biener via Gcc-patches wrote: > > Sorry, I hoped it wouldn't take me almost 3 months and would be much shorter > > as well, but clearly I'm not good at estimating stuff... > > Well, it’s definitely feature creep with now the _Decimal and bitfield stuff … I think

[PATCH] match.pd: Implement missed optimization ((x ^ y) & z) | x -> (z & y) | x [PR109938]

2023-08-04 Thread Drew Ross via Gcc-patches
Adds a simplification for ((x ^ y) & z) | x to be folded into (z & y) | x. Merges this simplification with ((x | y) & z) | x -> (z & y) | x to prevent duplicate pattern. Tested successfully on x86_64 and x86 targets. PR tree-opt/109938 gcc/ChangeLog: * match.pd ((x ^ y) & z) | x

[Bug c++/59883] Missed C++ front-end devirtualizations

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

Re: [PATCH v3] [RISC-V] Generate Zicond instruction for select pattern with condition eq or neq to 0

2023-08-04 Thread Jeff Law via Gcc-patches
On 8/1/23 19:38, Xiao Zeng wrote: This patch recognizes Zicond patterns when the select pattern with condition eq or neq to 0 (using eq as an example), namely: 1 rd = (rs2 == 0) ? non-imm : 0 2 rd = (rs2 == 0) ? non-imm : non-imm 3 rd = (rs2 == 0) ? reg : non-imm 4 rd = (rs2 == 0) ? reg : reg

[Bug analyzer/110907] New: ICE when using -fanalyzer-verbose-state-changes

2023-08-04 Thread vultkayn at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110907 Bug ID: 110907 Summary: ICE when using -fanalyzer-verbose-state-changes Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug rtl-optimization/110864] [14 Regression] ICE in combine.cc causes stage2 build failure on RISCV

2023-08-04 Thread patrick at rivosinc dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110864 Patrick O'Neill changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug middle-end/110906] __attribute__((optimize("no-math-errno"))) has no effect.

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110906 --- Comment #4 from Andrew Pinski --- Well "math-errno" has no effect if -fno-math-errno is supplied on the command line either, well can produce incorrect code too. Take: ``` __attribute__((optimize("math-errno"))) void g(double x) {

[Bug middle-end/110906] __attribute__((optimize("no-math-errno"))) has no effect.

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110906 --- Comment #3 from Andrew Pinski --- But even: ``` __attribute__((optimize("no-math-errno"))) double g(double x) { return __builtin_sqrt(x); } ``` Does not change here ...

[Bug middle-end/110906] __attribute__((optimize("no-math-errno"))) has no effect.

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110906 --- Comment #2 from Andrew Pinski --- Created attachment 55692 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55692=edit Full testcase

David Faust appointed BPF backend reviewer

2023-08-04 Thread David Edelsohn via Gcc
I am pleased to announce that the GCC Steering Committee has appointed David Faust as BPF backend reviewer. Please join me in congratulating David on his new role. David, please update your listings in the MAINTAINERS file. Happy hacking! David

[Bug middle-end/110906] __attribute__((optimize("no-math-errno"))) has no effect.

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110906 --- Comment #1 from Andrew Pinski --- well std::sqrt is not annotated with no-math-errno after all ...

[Bug middle-end/110906] New: __attribute__((optimize("no-math-errno"))) has no effect.

2023-08-04 Thread cassio.neri at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110906 Bug ID: 110906 Summary: __attribute__((optimize("no-math-errno"))) has no effect. Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal

Re: [PATCH V2] RISC-V: Support POPCOUNT auto-vectorization

2023-08-04 Thread Jeff Law via Gcc-patches
On 8/1/23 00:47, Robin Dapp via Gcc-patches wrote:  I'm not against continuing with the more well-known approach for now  but we should keep in mind that might still be potential for improvement. No. I don't think it's faster. I did a quick check on my x86 laptop and it's roughly 25%

Re: cpymem for RISCV with v extension

2023-08-04 Thread Jeff Law via Gcc-patches
On 7/17/23 22:47, Joern Rennecke wrote: Subject: cpymem for RISCV with v extension From: Joern Rennecke Date: 7/17/23, 22:47 To: GCC Patches As discussed on last week's patch call, this patch uses either a straight copy or an opaque pattern that emits the loop as assembly to optimize

Re: Update and Questions on CPython Extension Module -fanalyzer plugin development

2023-08-04 Thread Eric Feng via Gcc
On Fri, Aug 4, 2023 at 11:39 AM David Malcolm wrote: > > On Fri, 2023-08-04 at 11:02 -0400, Eric Feng wrote: > > Hi Dave, > > > > Tests related to our plugin which depend on Python-specific > > definitions have been run by including /* { dg-options "-fanalyzer > > -I/usr/include/python3.9" } */.

[Bug c++/110905] GCC rejects constexpr code that may re-initialize union member

2023-08-04 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110905 --- Comment #2 from danakj at orodu dot net --- Ah ok. Here's a big reproduction: https://godbolt.org/z/Kj7Tcd6P4 /opt/compiler-explorer/gcc-trunk-20230804/include/c++/14.0.0/bits/stl_construct.h:97:14: in 'constexpr' expansion of '((sus

[Bug tree-optimization/21998] (cond ? result1 : result2) is vectorized, where equivalent if-syntax isn't (store)

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21998 --- Comment #7 from Andrew Pinski --- We can vectorize test2 using mask stores

[Bug analyzer/110426] Missing buffer overflow warning with function pointer that has the alloc_size attribute

2023-08-04 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110426 David Malcolm changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[pushed] analyzer: handle function attribute "alloc_size" [PR110426]

2023-08-04 Thread David Malcolm via Gcc-patches
This patch makes -fanalyzer make use of the function attribute "alloc_size", allowing -fanalyzer to emit -Wanalyzer-allocation-size, -Wanalyzer-out-of-bounds, and -Wanalyzer-tainted-allocation-size on execution paths involving allocations using such functions. Successfully bootstrapped &

[pushed] analyzer: fix some svalue::dump_to_pp implementations

2023-08-04 Thread David Malcolm via Gcc-patches
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r14-3000-g187b213ddbe7ea. gcc/analyzer/ChangeLog: * svalue.cc (region_svalue::dump_to_pp): Support NULL type. (constant_svalue::dump_to_pp): Likewise. (initial_svalue::dump_to_pp): Likewise.

[Bug tree-optimization/18437] vectorizer failed for matrix multiplication

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18437 --- Comment #10 from Andrew Pinski --- (In reply to Andrew Pinski from comment #9) > For the original testcase in comment #0, with `-O3 -fno-vect-cost-model` GCC > can vectorize it on aarch64 but not on x86_64. I should say starting in GCC 6 .

[Bug analyzer/110902] Missing cast in region_model_manager::maybe_fold_binop on MULT_EXPR by 1

2023-08-04 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110902 --- Comment #1 from CVS Commits --- The master branch has been updated by David Malcolm : https://gcc.gnu.org/g:021077b94741c9300dfff3a24e95b3ffa3f508a7 commit r14-3001-g021077b94741c9300dfff3a24e95b3ffa3f508a7 Author: David Malcolm Date:

[Bug analyzer/110426] Missing buffer overflow warning with function pointer that has the alloc_size attribute

2023-08-04 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110426 --- Comment #2 from CVS Commits --- The master branch has been updated by David Malcolm : https://gcc.gnu.org/g:021077b94741c9300dfff3a24e95b3ffa3f508a7 commit r14-3001-g021077b94741c9300dfff3a24e95b3ffa3f508a7 Author: David Malcolm Date:

[Bug tree-optimization/18437] vectorizer failed for matrix multiplication

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18437 --- Comment #9 from Andrew Pinski --- For the original testcase in comment #0, with `-O3 -fno-vect-cost-model` GCC can vectorize it on aarch64 but not on x86_64.

[Bug tree-optimization/49955] Fails to do partial basic-block SLP

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49955 --- Comment #4 from Andrew Pinski --- The testcase in comment #0 started to be vectorized in GCC 13

[Bug tree-optimization/35224] scalar evolution analysis fails with "evolution of base is not affine"

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35224 --- Comment #1 from Andrew Pinski --- Created attachment 55691 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55691=edit testcase

Re: [committed][RISC-V] Fix 20010221-1.c with zicond

2023-08-04 Thread Jeff Law via Gcc-patches
On 8/4/23 03:29, Xiao Zeng wrote: On Thu, Aug 03, 2023 at 01:20:00 AM  Jeff Law wrote: In the wrong two optimization modes, I only considered the case of satisfying the ELSE branch, but in fact, like the correct two optimization modes, I should consider the case of satisfying both the

[Bug tree-optimization/30049] Variable-length arrays (VLA) should be converted to normal arrays if possible

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30049 --- Comment #3 from Andrew Pinski --- The only difference I saw is scheduling and some small IV-OPTs difference ...

[V2][PATCH 3/3] Use the counted_by attribute information in bound sanitizer[PR108896]

2023-08-04 Thread Qing Zhao via Gcc-patches
gcc/c-family/ChangeLog: PR C/108896 * c-ubsan.cc (ubsan_instrument_bounds): Use counted_by attribute information. gcc/testsuite/ChangeLog: PR C/108896 * gcc.dg/ubsan/flex-array-counted-by-bounds.c: New test. *

[V2][PATCH 2/3] Use the counted_by atribute info in builtin object size [PR108896]

2023-08-04 Thread Qing Zhao via Gcc-patches
gcc/ChangeLog: PR C/108896 * tree-object-size.cc (addr_object_size): Use the counted_by attribute info. * tree.cc (component_ref_has_counted_by_p): New function. (component_ref_get_counted_by): New function. * tree.h

[V2][PATCH 1/3] Provide counted_by attribute to flexible array member field (PR108896)

2023-08-04 Thread Qing Zhao via Gcc-patches
'counted_by (COUNT)' The 'counted_by' attribute may be attached to the flexible array member of a structure. It indicates that the number of the elements of the array is given by the field named "COUNT" in the same structure as the flexible array member. GCC uses this

[V2][PATCH 0/3] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2023-08-04 Thread Qing Zhao via Gcc-patches
Hi, This is the 2nd version of the patch, per our discussion based on the review comments for the 1st version, the major changes in this version are: 1. change the name "element_count" to "counted_by"; 2. change the parameter for the attribute from a STRING to an Identifier; 3. Add logic and

[Bug tree-optimization/30049] Variable-length arrays (VLA) should be converted to normal arrays if possible

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30049 --- Comment #2 from Andrew Pinski --- Created attachment 55690 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55690=edit testcase [apinski@xeond2 upstream-gcc-git]$ ~/upstream-gcc/bin/gcc t.c -march=opteron -ffast-math -funroll-loops

[Bug tree-optimization/32806] Missing optimization to remove backward dependencies

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32806 --- Comment #2 from Andrew Pinski --- Created attachment 55689 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55689=edit compilable testcase

Re: One question on the source code of tree-object-size.cc

2023-08-04 Thread Qing Zhao via Gcc-patches
> On Aug 4, 2023, at 3:09 PM, Siddhesh Poyarekar wrote: > > On 2023-08-04 15:06, Qing Zhao wrote: >>> Yes, that's what I'm thinking. >>> > so `q` must be pointing to a single element. So you could deduce: > > 1. the minimum size of the whole object that q points to. You

[Bug other/109910] GCC prologue/epilogue saves/restores callee-saved registers that are never changed

2023-08-04 Thread gjl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109910 Georg-Johann Lay changed: What|Removed |Added Last reconfirmed||2023-08-04

Re: One question on the source code of tree-object-size.cc

2023-08-04 Thread Siddhesh Poyarekar
On 2023-08-04 15:06, Qing Zhao wrote: Yes, that's what I'm thinking. so `q` must be pointing to a single element. So you could deduce: 1. the minimum size of the whole object that q points to. You mean that the TYPE will determine the minimum size of the whole object? (Does this include

Re: [committed][RISC-V] Remove errant hunk of code

2023-08-04 Thread Andrew Pinski via Gcc-patches
On Thu, Aug 3, 2023 at 10:31 PM Jeff Law via Gcc-patches wrote: > > > > On 8/3/23 17:38, Vineet Gupta wrote: > > >> ;-) Actually if you wanted to poke at zicond, the most interesting > >> unexplored area I've come across is the COND_EXPR handling in gimple. > >> When we expand a COND_EXPR into

Re: One question on the source code of tree-object-size.cc

2023-08-04 Thread Qing Zhao via Gcc-patches
> On Aug 4, 2023, at 12:36 PM, Siddhesh Poyarekar wrote: > > On 2023-08-04 11:27, Qing Zhao wrote: >>> On Aug 4, 2023, at 10:40 AM, Siddhesh Poyarekar wrote: >>> >>> On 2023-08-03 13:34, Qing Zhao wrote: One thing I need to point out first is, currently, even for regular fixed

[Bug c++/110905] GCC rejects constexpr code that may re-initialize union member

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110905 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2023-08-04

[Bug c++/110905] New: GCC rejects constexpr code that may re-initialize union member

2023-08-04 Thread danakj at orodu dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110905 Bug ID: 110905 Summary: GCC rejects constexpr code that may re-initialize union member Product: gcc Version: 13.2.1 Status: UNCONFIRMED Severity: normal

[Bug tree-optimization/110903] [12/13/14 Regression] Dead Code Elimination Regression

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110903 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2023-08-04

The gcc version used for compiling qt4.

2023-08-04 Thread amber.coles--- via Gcc
Did you ever solve this problem? I'm getting the exact same error.

[PATCH] _Decimal* to _BitInt conversion support [PR102989]

2023-08-04 Thread Jakub Jelinek via Gcc-patches
Hi! Repost because the patch was too large. On Fri, Jul 28, 2023 at 06:03:33PM +, Joseph Myers wrote: > Note that representations with too-large significand are defined to be > noncanonical representations of zero, so you need to take care of that in > decoding BID. Done. > You could e.g.

[Bug c++/109680] [13 Regression] is_convertible incorrectly true

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109680 Andrew Pinski changed: What|Removed |Added CC||nikolasklauser at berlin dot de ---

[Bug c++/110904] __is_convertible incorrectly reports non-referenceable function prototypes as convertible

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110904 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/110904] New: __is_convertible incorrectly reports non-referenceable function prototypes as convertible

2023-08-04 Thread nikolasklauser at berlin dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110904 Bug ID: 110904 Summary: __is_convertible incorrectly reports non-referenceable function prototypes as convertible Product: gcc Version: 13.0 Status: UNCONFIRMED

[Bug middle-end/110857] aarch64-linux-gnu profiledbootstrap broken

2023-08-04 Thread prathamesh3492 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110857 --- Comment #6 from prathamesh3492 at gcc dot gnu.org --- profiledbootstrap now works on aarch64-linux-gnu, thanks!

[Bug tree-optimization/110903] [14 Regression] Dead Code Elimination Regression since r14-1597-g64d90d06d2d

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110903 --- Comment #1 from Andrew Pinski --- Note the original testcase has some obvious use of an uninitialized variable. Anyways here is a fixed up testcase which does not have that uninitialized variable and GCC 13 was able to optimize away the

[PATCH] Add -Wdisabled-optimization warning for not optimizing sibling calls

2023-08-04 Thread Bradley Lucier via Gcc-patches
The patch at the end adds a warning when a tail/sibling call cannot be optimized for various reasons. I built and tested GCC with and without the patch with configuration Configured with: ../../gcc-mainline/configure --enable-languages=c --disable-multilib --prefix=/pkgs/gcc-mainline

Re: [PATCH] ipa-sra: Don't consider CLOBBERS as writes preventing splitting

2023-08-04 Thread Richard Biener via Gcc-patches
> Am 04.08.2023 um 18:26 schrieb Martin Jambor : > > Hello, > >> On Wed, Aug 02 2023, Richard Biener wrote: >>> On Mon, Jul 31, 2023 at 7:05 PM Martin Jambor wrote: >>> >>> Hi, >>> >>> when IPA-SRA detects whether a parameter passed by reference is >>> written to, it does not special case

[Bug tree-optimization/110903] New: [14 Regression] Dead Code Elimination Regression since r14-1597-g64d90d06d2d

2023-08-04 Thread theodort at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110903 Bug ID: 110903 Summary: [14 Regression] Dead Code Elimination Regression since r14-1597-g64d90d06d2d Product: gcc Version: 14.0 Status: UNCONFIRMED Severity:

[Bug tree-optimization/92335] [11/12/13 Regression] sinking of loads happen too early which causes vectorization not to be done

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92335 --- Comment #10 from Andrew Pinski --- *** Bug 95084 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/95084] [11/12/13/14 Regression] code sinking prevents if-conversion

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

[Bug middle-end/26163] [meta-bug] missed optimization in SPEC (2k17, 2k and 2k6 and 95)

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163 Bug 26163 depends on bug 95084, which changed state. Bug 95084 Summary: [11/12/13/14 Regression] code sinking prevents if-conversion https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95084 What|Removed |Added

[Bug middle-end/94442] [11/12/13/14 regression] Redundant loads/stores emitted at -O3

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94442 Andrew Pinski changed: What|Removed |Added Status|NEW |RESOLVED Target Milestone|11.5

[Bug target/95958] [meta-bug] Inefficient arm_neon.h code for AArch64

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95958 Bug 95958 depends on bug 94442, which changed state. Bug 94442 Summary: [11/12/13/14 regression] Redundant loads/stores emitted at -O3 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94442 What|Removed |Added

[Bug ada/110898] compilation of adacl-assert-integer.ads failed

2023-08-04 Thread krischik at users dot sourceforge.net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110898 Martin Krischik changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug target/110901] -march does not override -mcpu (big.little on aarch64

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110901 --- Comment #3 from Andrew Pinski --- With C code, these use of -march and -mcpu would normally be rejected even.

[Bug target/110901] -march does not override -mcpu on aarch64

2023-08-04 Thread raj.khem at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110901 --- Comment #2 from Khem Raj --- (In reply to Andrew Pinski from comment #1) > Order matters. In this case -march is after -mcpu ... It does not seem to be effective in this case. I tried to specify -mcpu after -march and vice-versa, result is

[Bug target/110901] -march does not override -mcpu on aarch64

2023-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110901 --- Comment #1 from Andrew Pinski --- Order matters. In this case -march is after -mcpu ...

[Bug analyzer/110902] New: Missing cast in region_model_manager::maybe_fold_binop on MULT_EXPR by 1

2023-08-04 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110902 Bug ID: 110902 Summary: Missing cast in region_model_manager::maybe_fold_binop on MULT_EXPR by 1 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity:

  1   2   3   >