[PATCH 4/4] RISC-V: Add conditional autovec convert(INT<->FP) patterns

2023-08-31 Thread Lehua Ding
gcc/ChangeLog: * config/riscv/autovec-opt.md (*cond_): New combine pattern. (*cond_): Ditto. (*cond_): Ditto. (*cond_): Ditto. (*cond_): Ditto. (*cond_2): Ditto. * config/riscv/autovec.md (2): Adjust. (2): Adjust.

[PATCH 3/4] RISC-V: Add conditional autovec convert(FP<->FP) patterns

2023-08-31 Thread Lehua Ding
gcc/ChangeLog: * config/riscv/autovec-opt.md (*cond_extend): New combine pattern. (*cond_trunc): Ditto. * config/riscv/autovec.md: Adjust. * config/riscv/riscv-v.cc (needs_fp_rounding): Add FP extend. gcc/testsuite/ChangeLog: *

[PATCH 2/4] RISC-V: Add conditional autovec convert(INT<->INT) patterns

2023-08-31 Thread Lehua Ding
gcc/ChangeLog: * config/riscv/autovec-opt.md (*cond_): New combine pattern. (*cond_): Ditto. (*cond_): Ditto. (*cond_trunc): Ditto. * config/riscv/autovec.md (2): Adjust. (2): Ditto. gcc/testsuite/ChangeLog: *

[PATCH 0/4] Add conditional autovec convert patterns

2023-08-31 Thread Lehua Ding
Hi, these patchs support combining convert_op + vcond_mask to convert_op with mask operand. The method is to keep the vector convert pattern simple (by changing define_expand to define_insn_and_split) until the combine pass and introduce the corresponding pattern to match the pattern after the

[PATCH 1/4] RISC-V: Adjust expand_cond_len_{unary,binop,op} api

2023-08-31 Thread Lehua Ding
This patch change expand_cond_len_{unary,binop}'s argument `rtx_code code` to `unsigned icode` and use the icode directly to determine whether the rounding_mode operand is required. gcc/ChangeLog: * config/riscv/autovec.md: Adjust. * config/riscv/riscv-protos.h

[PATCH v1] RISC-V: Support FP ADD/SUB/MUL/DIV autovec for VLS mode

2023-08-31 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to allow the VLS mode autovec for the floating-point binary operation ADD/SUB/MUL/DIV. Given below code example: test (float *out, float *in1, float *in2) { for (int i = 0; i < 128; i++) out[i] = in1[i] + in2[i]; } Before this patch: test: csrr

[Bug libstdc++/111258] std::string cannot to be moved in constant evaluated expression

2023-08-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111258 Andrew Pinski changed: What|Removed |Added Keywords||rejects-valid --- Comment #1 from

[Bug target/111232] RISC-V: Failed to combine vwmul + vadd into vwmacc

2023-08-31 Thread lehua.ding at rivai dot ai via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111232 --- Comment #1 from Lehua Ding --- reproduce on compiler explorer: https://godbolt.org/z/Mq3bzajn6

[Bug target/110484] Spec2017 541 after adding the '-flto-fomit-frame-pointer' optimization, after optimizing the rnreg, directly replaced other registers with the $r22 register, so that the value of t

2023-08-31 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110484 --- Comment #6 from CVS Commits --- The releases/gcc-12 branch has been updated by LuluCheng : https://gcc.gnu.org/g:d60c00492eb5818493560f299f06d1e3d9efcc69 commit r12-9840-gd60c00492eb5818493560f299f06d1e3d9efcc69 Author: Lulu Cheng Date:

[PATCH v6] LoongArch:Implement 128-bit floating point functions in gcc.

2023-08-31 Thread chenxiaolong
Brief version history of patch set: v1 -> v2: According to the GNU code specification, adjust the format of the function implementation with "q" as the suffix function. v2 - >v3: 1.On the LoongArch architecture, refer to the functionality of 64-bit functions and modify the underlying

[Bug tree-optimization/111262] [14 Regression] error: count of bb not initialized with -O3

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

[Bug tree-optimization/111262] [14 Regression] error: count of bb not initialized with -O3

2023-08-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111262 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |14.0 Version|unknown

[Bug other/111264] [14 regression] gcc.dg/plugin/analyzer_cpython_plugin.c breaks after r14-3580-g597b9ec69bca8a

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

[Bug other/111264] [14 regression] gcc.dg/plugin/analyzer_cpython_plugin.c breaks after r14-3580-g597b9ec69bca8a

2023-08-31 Thread hp at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111264 Hans-Peter Nilsson changed: What|Removed |Added URL||https://gcc.gnu.org/piperma

Re: [PATCH] analyzer: implement reference count checking for CPython plugin [PR107646]

2023-08-31 Thread Hans-Peter Nilsson via Gcc
(Looks like this was committed as r14-3580-g597b9ec69bca8a) > Cc: gcc@gcc.gnu.org, gcc-patc...@gcc.gnu.org, Eric Feng > From: Eric Feng via Gcc > gcc/testsuite/ChangeLog: > PR analyzer/107646 > * gcc.dg/plugin/analyzer_cpython_plugin.c: Implements reference count > * checking for

Re: [PATCH] analyzer: implement reference count checking for CPython plugin [PR107646]

2023-08-31 Thread Hans-Peter Nilsson via Gcc-patches
(Looks like this was committed as r14-3580-g597b9ec69bca8a) > Cc: g...@gcc.gnu.org, gcc-patches@gcc.gnu.org, Eric Feng > From: Eric Feng via Gcc > gcc/testsuite/ChangeLog: > PR analyzer/107646 > * gcc.dg/plugin/analyzer_cpython_plugin.c: Implements reference count > * checking for

[Bug target/110484] Spec2017 541 after adding the '-flto-fomit-frame-pointer' optimization, after optimizing the rnreg, directly replaced other registers with the $r22 register, so that the value of t

2023-08-31 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110484 --- Comment #5 from CVS Commits --- The releases/gcc-13 branch has been updated by LuluCheng : https://gcc.gnu.org/g:3f23fa7e74fa01828d649e8ee7230701b6fb1e19 commit r13-7773-g3f23fa7e74fa01828d649e8ee7230701b6fb1e19 Author: Lulu Cheng Date:

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

2023-08-31 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 Keywords||patch URL|

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

2023-08-31 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

[PATCH] MATCH: `(nop_convert)-a` into -(nop_convert)a if the negate is single use and a is known not to be signed min value

2023-08-31 Thread Andrew Pinski via Gcc-patches
This pushes the conversion further down the chain which allows to optimize away more conversions in many cases. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. PR tree-optimization/107765 PR tree-optimization/107137 gcc/ChangeLog: * match.pd

[Bug c++/110936] if constexpr: member function pointers cannot be checked with ubsan

2023-08-31 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110936 --- Comment #2 from Johel Ernesto Guerrero Peña --- FWIW, it seems that you can use to test the validity during constant evaluation. It seems that an invalid constant

[Bug target/110484] Spec2017 541 after adding the '-flto-fomit-frame-pointer' optimization, after optimizing the rnreg, directly replaced other registers with the $r22 register, so that the value of t

2023-08-31 Thread chenglulu at loongson dot cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110484 chenglulu changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED

[Bug other/111264] [14 regression] gcc.dg/plugin/analyzer_cpython_plugin.c breaks after r14-3580-g597b9ec69bca8a

2023-08-31 Thread hp at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111264 Hans-Peter Nilsson changed: What|Removed |Added CC||hp at gcc dot gnu.org --- Comment

Re: [PING][PATCH] LoongArch: initial ada support on linux

2023-08-31 Thread Yujie Yang
On Thu, Aug 31, 2023 at 03:09:52PM +0200, Marc Poulhiès wrote: > > Yang Yujie writes: > > Hello Yujie, > > > gcc/ChangeLog: > > > > * ada/Makefile.rtl: Add LoongArch support. > > * ada/libgnarl/s-linux__loongarch.ads: New. > > * ada/libgnat/system-linux-loongarch.ads: New. > >

[Bug target/110484] Spec2017 541 after adding the '-flto-fomit-frame-pointer' optimization, after optimizing the rnreg, directly replaced other registers with the $r22 register, so that the value of t

2023-08-31 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110484 --- Comment #3 from CVS Commits --- The master branch has been updated by LuluCheng : https://gcc.gnu.org/g:1967f21d000e09d3d3190317af7923b578ce02b1 commit r14-3605-g1967f21d000e09d3d3190317af7923b578ce02b1 Author: Lulu Cheng Date: Thu Jun

[Bug c++/110936] if constexpr: member function pointers cannot be checked with ubsan

2023-08-31 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110936 --- Comment #1 from Johel Ernesto Guerrero Peña --- This should block BUG101603.

Re: [PATCH] analyzer: implement reference count checking for CPython plugin [PR107646]

2023-08-31 Thread Eric Feng via Gcc
On Thu, Aug 31, 2023 at 4:19 PM David Malcolm wrote: > > On Thu, 2023-08-31 at 15:09 -0400, Eric Feng wrote: > > On Thu, Aug 31, 2023 at 1:01 PM David Malcolm > > wrote: > > > > > > On Wed, 2023-08-30 at 18:15 -0400, Eric Feng wrote: > > [...] > > > > > > > > > Thanks; pushed to trunk with nits

Re: Re: [PATCH 1/2] allow targets to check shrink-wrap-separate enabled or not

2023-08-31 Thread Fei Gao
On 2023-08-29 09:46  Jeff Law wrote: > > > >On 8/28/23 19:28, Fei Gao wrote: >> On 2023-08-29 06:54  Jeff Law wrote: >>> >>> >>> >>> On 8/28/23 01:47, Fei Gao wrote: no functional changes but allow targets to check shrink-wrap-separate enabled or not.       gcc/ChangeLog:

Re: [PATCH v2 1/4] LoongArch: improved target configuration interface

2023-08-31 Thread Yujie Yang
On Thu, Aug 31, 2023 at 05:56:26PM +, Joseph Myers wrote: > On Thu, 31 Aug 2023, Yujie Yang wrote: > > > -If none of such suffix is present, the configured value of > > -@option{--with-multilib-default} can be used as a common default suffix > > -for all library ABI variants. Otherwise, the

Re: [PATCH] analyzer: Add support of placement new and improved operator new [PR105948,PR94355]

2023-08-31 Thread David Malcolm via Gcc-patches
On Fri, 2023-09-01 at 00:04 +0200, priour...@gmail.com wrote: > Hi, > > Succesfully regstrapped off trunk 7f2ed06ddc825e8a4e0edfd1d66b5156e6dc1d34 > on x86_64-linux-gnu. > > Is it OK for trunk ? Hi Benjamin. Thanks for the patch. It's OK as-is, but it doesn't cover every case...

[PATCH] Add Types to Un-Typed Pic Instructions:

2023-08-31 Thread Edwin Lu
Related Discussion: https://inbox.sourceware.org/gcc-patches/12fb5088-3f28-0a69-de1e-f387371a5...@gmail.com/ This patch updates the pic instructions to ensure that no insn is left without a type attribute. Tested for regressions using rv32/64 multilib with newlib/linux. gcc/Changelog:

[Bug other/111264] New: [14 regression] gcc.dg/plugin/analyzer_cpython_plugin.c breaks after r14-3580-g597b9ec69bca8a

2023-08-31 Thread seurer at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111264 Bug ID: 111264 Summary: [14 regression] gcc.dg/plugin/analyzer_cpython_plugin.c breaks after r14-3580-g597b9ec69bca8a Product: gcc Version: 14.0

[PATCH] RISC-V: Add dynamic LMUL compile option

2023-08-31 Thread Juzhe-Zhong
We are going to support dynamic LMUL support. gcc/ChangeLog: * config/riscv/riscv-opts.h (enum riscv_autovec_lmul_enum): Add dynamic enum. * config/riscv/riscv.opt: Add dynamic compile option. --- gcc/config/riscv/riscv-opts.h | 4 +++- gcc/config/riscv/riscv.opt| 3 +++ 2

[PATCH] RISC-V: Enable VECT_COMPARE_COSTS by default

2023-08-31 Thread Juzhe-Zhong
since we have added COST framework, we by default enable VECT_COMPARE_COSTS. Also, add 16/32/64 to provide more choices for COST comparison. This patch doesn't change any behavior from the current testsuite since we are using default COST model. gcc/ChangeLog: *

[Bug c++/66487] sanitizer/warnings for lifetime DSE

2023-08-31 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66487 Eric Gallager changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c++/109751] [13/14 Regression] boost iterator_interface fails concept check starting in gcc-13

2023-08-31 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109751 Jason Merrill changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c++/109751] [13/14 Regression] boost iterator_interface fails concept check starting in gcc-13

2023-08-31 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109751 --- Comment #25 from CVS Commits --- The releases/gcc-13 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:6396e37d451b2ef6d3cb9c11edbc06deeaccd808 commit r13-7771-g6396e37d451b2ef6d3cb9c11edbc06deeaccd808 Author: Jason Merrill

[Bug c++/92407] Destruction of objects returned from functions skipped by goto

2023-08-31 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92407 --- Comment #10 from CVS Commits --- The releases/gcc-13 branch has been updated by Jason Merrill : https://gcc.gnu.org/g:a645347c19b07cc7abd7bf276c6769fc41afc932 commit r13-7770-ga645347c19b07cc7abd7bf276c6769fc41afc932 Author: Jason Merrill

gcc-11-20230831 is now available

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

[PATCH] analyzer: Add support of placement new and improved operator new [PR105948, PR94355]

2023-08-31 Thread Benjamin Priour via Gcc-patches
From: benjamin priour Hi, Succesfully regstrapped off trunk 7f2ed06ddc825e8a4e0edfd1d66b5156e6dc1d34 on x86_64-linux-gnu. Is it OK for trunk ? Thanks, Benjamin. Patch below. --- Fixed spurious possibly-NULL warning always tagging along throwing operator new despite it never returning NULL.

[Bug target/111263] test case gfortran.dg/ieee/comparisons_3.F90 fails

2023-08-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111263 Andrew Pinski changed: What|Removed |Added Keywords||wrong-code Component|other

[Bug other/111263] New: test case gfortran.dg/ieee/comparisons_3.F90 fails

2023-08-31 Thread seurer at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111263 Bug ID: 111263 Summary: test case gfortran.dg/ieee/comparisons_3.F90 fails Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3

Re: [RFC PATCH] c++: Diagnose [basic.scope.block]/2 violations even for block externs [PR52953]

2023-08-31 Thread Jason Merrill via Gcc-patches
On 8/31/23 04:08, Jakub Jelinek wrote: Hi! C++17 had in [basic.block.scope]/2 "A parameter name shall not be redeclared in the outermost block of the function definition nor in the outermost block of any handler associated with a function-try-block." and in [basic.block.scope]/4 similar rule

Re: [RFC] gimple ssa: SCCP - A new PHI optimization pass

2023-08-31 Thread Andrew Pinski via Gcc-patches
On Thu, Aug 31, 2023 at 5:15 AM Richard Biener via Gcc-patches wrote: > > On Thu, 31 Aug 2023, Filip Kastl wrote: > > > > The most obvious places would be right after SSA construction and before > > > RTL expansion. > > > Can you provide measurements for those positions? > > > > The algorithm

[Bug tree-optimization/111262] error: count of bb not initialized with -O3

2023-08-31 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111262 --- Comment #1 from David Binderman --- Reduced C++ code is struct _Rb_tree_header { int _M_node_count; }; struct _Rb_tree { _Rb_tree_header _M_impl; bool empty() { return _M_impl._M_node_count; } }; struct Trans_NS_std_map { _Rb_tree

[Bug target/111246] PPC64 Sequentially Consistent Load allows Reordering of Stores

2023-08-31 Thread luke.geeson at cs dot ucl.ac.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111246 --- Comment #18 from Luke Geeson --- Indeed that is a plus - I have 167k concurrency tests that I feed through LLVM/GCC -O1/2/3/fast and for GCC -Og that test compilation from the C/C++ to PPC memory models. If you are interested I can provide

[Bug target/111246] PPC64 Sequentially Consistent Load allows Reordering of Stores

2023-08-31 Thread dje at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111246 --- Comment #17 from David Edelsohn --- I'm glad that we have confirmed that the GCC and LLVM code generation for PowerPC are correct for the memory model. And now your translation tool is more accurate.

[Bug target/111246] PPC64 Sequentially Consistent Load allows Reordering of Stores

2023-08-31 Thread luke.geeson at cs dot ucl.ac.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111246 Luke Geeson changed: What|Removed |Added Resolution|--- |INVALID Status|NEW

[Bug target/111246] PPC64 Sequentially Consistent Load allows Reordering of Stores

2023-08-31 Thread luke.geeson at cs dot ucl.ac.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111246 --- Comment #15 from Luke Geeson --- I am sorry to you all - I have wasted your time. It was a bug in the translation tool. In the future I will make absolutely sure that I check everything before submitting a bug - this is an embarrassing

[Bug c++/111262] New: error: count of bb not initialized with -O3

2023-08-31 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111262 Bug ID: 111262 Summary: error: count of bb not initialized with -O3 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug fortran/31059] bounds-check does not detect nonconforming assignment arrays

2023-08-31 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31059 anlauf at gcc dot gnu.org changed: What|Removed |Added Status|NEW |ASSIGNED

[PATCH] Fortran: runtime bounds-checking in presence of array constructors [PR31059]

2023-08-31 Thread Harald Anlauf via Gcc-patches
Dear all, gfortran's array bounds-checking code does a mostly reasonable job for array sections in expressions and assignments, but forgot the case that (rank-1) expressions can involve array constructors, which have a shape ;-) The attached patch walks over the loops generated by the

[Bug c++/110997] [13/14 Regression] internal compiler error: in cxx_eval_constant_expression, at cp/constexpr.cc:8005

2023-08-31 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110997 Marek Polacek changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |mpolacek at gcc dot gnu.org

Re: [PATCH] analyzer: implement reference count checking for CPython plugin [PR107646]

2023-08-31 Thread David Malcolm via Gcc
On Thu, 2023-08-31 at 15:09 -0400, Eric Feng wrote: > On Thu, Aug 31, 2023 at 1:01 PM David Malcolm > wrote: > > > > On Wed, 2023-08-30 at 18:15 -0400, Eric Feng wrote: [...] > > > > > > Thanks; pushed to trunk with nits fixed: > > >

[Bug c++/111261] New: No warning for out of order class initialisation when using class initialisers

2023-08-31 Thread matt at godbolt dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111261 Bug ID: 111261 Summary: No warning for out of order class initialisation when using class initialisers Product: gcc Version: 14.0 Status: UNCONFIRMED

[Bug fortran/31059] bounds-check does not detect nonconforming assignment arrays

2023-08-31 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=31059 anlauf at gcc dot gnu.org changed: What|Removed |Added Attachment #55821|0 |1 is obsolete|

[Bug target/111246] PPC64 Sequentially Consistent Load allows Reordering of Stores

2023-08-31 Thread dje at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111246 --- Comment #14 from David Edelsohn --- The conditional branch always will proceed to the next instruction, so the code that you showed in the PR is a correct "optimization" of the original code, but the processor does execute the conditional

[Bug tree-optimization/108397] Missed optimization with [0, 0][-1U,-1U] range arithmetics

2023-08-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108397 --- Comment #7 from Andrew Pinski --- (In reply to Andrew Pinski from comment #6) > Forwprop will not change _4 to _1 though. because t1_11 is used twice. But combined with PR 107137, we are able to optimize it just fine.

Re: [PATCH] c++: Diagnose [basic.scope.block]/2 violations even in compound-stmt of function-try-block [PR52953]

2023-08-31 Thread Jason Merrill via Gcc-patches
On 8/31/23 03:20, Jakub Jelinek wrote: Hi! As the following testcase shows, while check_local_shadow diagnoses most of the [basic.scope.block]/2 violations, it doesn't diagnose when parameter's name is redeclared inside of the compound-stmt of a function-try-block. There is in that case an

Re: [PATCH] libstdc++: Use GLIBCXX_CHECK_LINKER_FEATURES for cross-builds (PR111238)

2023-08-31 Thread Jonathan Wakely via Gcc-patches
On Thu, 31 Aug 2023 at 18:42, Jonathan Wakely wrote: > > On Thu, 31 Aug 2023 at 16:26, Christophe Lyon > wrote: > > > > As discussed in PR104167 (comments #8 and below), and PR111238, using > > -Wl,-gc-sections in the libstdc++ testsuite for arm-eabi > > (cross-toolchain) avoids link failures

Re: [PATCH] c++, v3: Fix up mangling of function/block scope static structured bindings and emit abi tags [PR111069]

2023-08-31 Thread Jason Merrill via Gcc-patches
On 8/31/23 15:14, Jakub Jelinek wrote: On Thu, Aug 31, 2023 at 01:11:57PM -0400, Jason Merrill wrote: 2023-08-28 Jakub Jelinek PR c++/111069 gcc/ * common.opt (fabi-version=): Document version 19. * doc/invoke.texi (-fabi-version=): Likewise. gcc/c-family/ *

Re: [PATCH] libstdc++: Use GLIBCXX_CHECK_LINKER_FEATURES for cross-builds (PR111238)

2023-08-31 Thread Hans-Peter Nilsson via Gcc-patches
> From: Hans-Peter Nilsson > Date: Thu, 31 Aug 2023 19:05:19 +0200 > > Date: Thu, 31 Aug 2023 17:25:45 +0200 > > From: Christophe Lyon via Gcc-patches > > However, this would hide the fact that libstdc++ somehow forces the > > user to use -Wl,-gc-sections to avoid undefined references to

[PATCH] c++, v3: Fix up mangling of function/block scope static structured bindings and emit abi tags [PR111069]

2023-08-31 Thread Jakub Jelinek via Gcc-patches
On Thu, Aug 31, 2023 at 01:11:57PM -0400, Jason Merrill wrote: > > 2023-08-28 Jakub Jelinek > > > > PR c++/111069 > > gcc/ > > * common.opt (fabi-version=): Document version 19. > > * doc/invoke.texi (-fabi-version=): Likewise. > > gcc/c-family/ > > * c-opts.cc

[Bug target/111246] PPC64 Sequentially Consistent Load allows Reordering of Stores

2023-08-31 Thread luke.geeson at cs dot ucl.ac.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111246 --- Comment #13 from Luke Geeson --- Please bear with me whilst I figure out what has happened here.

Re: [PATCH] analyzer: implement reference count checking for CPython plugin [PR107646]

2023-08-31 Thread Eric Feng via Gcc
On Thu, Aug 31, 2023 at 1:01 PM David Malcolm wrote: > > On Wed, 2023-08-30 at 18:15 -0400, Eric Feng wrote: > > On Tue, Aug 29, 2023 at 5:14 PM David Malcolm > > wrote: > > > > > > On Tue, 2023-08-29 at 13:28 -0400, Eric Feng wrote: > > > > Additionally, by using the old model and the pointer

[Bug target/111246] PPC64 Sequentially Consistent Load allows Reordering of Stores

2023-08-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111246 --- Comment #12 from Andrew Pinski --- (In reply to Luke Geeson from comment #11) > Do you have a trunk build of binutils to hand to test? Godbolt doesn't > support objdump. I will try to install binutils from source to reproduce. Yes it does.

[Bug target/111246] PPC64 Sequentially Consistent Load allows Reordering of Stores

2023-08-31 Thread luke.geeson at cs dot ucl.ac.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111246 --- Comment #11 from Luke Geeson --- I'm using `powerpc64le-linux-gnu-objdump -Dr --disassemble --section=.text --no-show-raw-insn`. installed using `binutils-powerpc64le-linux-gnu` under Ubuntu 20:04 (in a docker container running on an Arm

[Bug fortran/110987] Segmentation fault after finalization of a temporary variable

2023-08-31 Thread chilikin.k at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110987 --- Comment #2 from Kirill Chilikin --- Some additional information: $ gfortran -g -o test test.f90 -fdump-tree-original $ cat test.f90.005t.original | head -n 747 | tail -n 26 { struct t3 zero.25; struct array00_t3 desc.26;

[Bug target/111260] New: arm: ice in maybe_legitimize_operand, at optabs.cc:8054

2023-08-31 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111260 Bug ID: 111260 Summary: arm: ice in maybe_legitimize_operand, at optabs.cc:8054 Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal

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

2023-08-31 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 Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org

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

2023-08-31 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 Status|NEW |ASSIGNED Assignee|unassigned

[Bug target/111246] PPC64 Sequentially Consistent Load allows Reordering of Stores

2023-08-31 Thread dje at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111246 --- Comment #10 from David Edelsohn --- If I compile your testcase with either GCC 11.3 or GCC trunk, GCC produces P1: .LFB1: .cfi_startproc .localentry P1,1 pld 9,.LANCHOR0+8@pcrel sync lwz 9,0(9)

[Bug target/111259] [14 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1934 during riscv64 build

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

[Bug target/111259] New: [14 Regression] ICE: RTL check: expected code 'reg', have 'subreg' in rhs_regno, at rtl.h:1934 during riscv64 build

2023-08-31 Thread zsojka at seznam dot cz via Gcc-bugs
disable-libstdcxx-pch --prefix=/repo/gcc-trunk//binary-trunk-r14-3602-20230831181644-ga335cf241b9-checking-yes-rtl-df-extra-riscv64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 14.0.0 20230831 (experimental) (GCC)

[Bug target/111246] PPC64 Sequentially Consistent Load allows Reordering of Stores

2023-08-31 Thread luke.geeson at cs dot ucl.ac.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111246 --- Comment #9 from Luke Geeson --- apologies typos: bc -> bee bee -> beq

[Bug target/111246] PPC64 Sequentially Consistent Load allows Reordering of Stores

2023-08-31 Thread luke.geeson at cs dot ucl.ac.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111246 --- Comment #8 from Luke Geeson --- I have not, but I will contact him and link this discussion. In the meantime, I read that page and provide some more testing. Consider the passage: ``` bc;isync: this is a very low-overhead and very weak form

[Bug tree-optimization/19832] don't remove an if when we know the value is the same as with the if (subtraction)

2023-08-31 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19832 --- Comment #10 from Andrew Pinski --- Patch posted here: https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628995.html

Re: [PATCH] RISC-V: zicond: remove bogus opt2 pattern

2023-08-31 Thread Vineet Gupta
On 8/31/23 06:51, Jeff Law wrote: On 8/30/23 15:57, Vineet Gupta wrote: This was tripping up gcc.c-torture/execute/pr60003.c at -O1 since the pattern semantics can't be expressed by zicond instructions. This involves test code snippet:    if (a == 0) return 0;    else

Re: [PATCH v2 1/4] LoongArch: improved target configuration interface

2023-08-31 Thread Joseph Myers
On Thu, 31 Aug 2023, Yujie Yang wrote: > -If none of such suffix is present, the configured value of > -@option{--with-multilib-default} can be used as a common default suffix > -for all library ABI variants. Otherwise, the default build option > -@code{-march=abi-default} is applied when

Re: [PATCH] libstdc++: Use GLIBCXX_CHECK_LINKER_FEATURES for cross-builds (PR111238)

2023-08-31 Thread Jonathan Wakely via Gcc-patches
On Thu, 31 Aug 2023, 18:43 Jonathan Wakely via Libstdc++, < libstd...@gcc.gnu.org> wrote: > On Thu, 31 Aug 2023 at 16:26, Christophe Lyon > wrote: > > > > As discussed in PR104167 (comments #8 and below), and PR111238, using > > -Wl,-gc-sections in the libstdc++ testsuite for arm-eabi > >

Re: [PATCH] libstdc++: Use GLIBCXX_CHECK_LINKER_FEATURES for cross-builds (PR111238)

2023-08-31 Thread Jonathan Wakely via Gcc-patches
On Thu, 31 Aug 2023 at 16:26, Christophe Lyon wrote: > > As discussed in PR104167 (comments #8 and below), and PR111238, using > -Wl,-gc-sections in the libstdc++ testsuite for arm-eabi > (cross-toolchain) avoids link failures for a few tests: > > 27_io/filesystem/path/108636.cc I think this one

[PATCH] RISC-V Add Types to Un-Typed Thead Instructions:

2023-08-31 Thread Edwin Lu
Related Discussion: https://inbox.sourceware.org/gcc-patches/12fb5088-3f28-0a69-de1e-f387371a5...@gmail.com/ This patch updates the THEAD instructions to ensure that no insn is left without a type attribute. Tested for regressions using rv32/64 multilib for linux/newlib. gcc/Changelog:

[PATCH] RISC-V: Add Types to Un-Typed Risc-v Instructions:

2023-08-31 Thread Edwin Lu
Related Discussion: https://inbox.sourceware.org/gcc-patches/12fb5088-3f28-0a69-de1e-f387371a5...@gmail.com/ This patch updates the riscv instructions to ensure that no insn is left without a type attribute. Added new types: "trap" (self explanatory) and "cbo" (for cache related instructions)

[Bug middle-end/111243] The -Og option inlines functions, making for a poor debugging experience.

2023-08-31 Thread amohr at amohr dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111243 --- Comment #2 from Alex Mohr --- Thanks much for looking at this, Richard. I definitely understand what you're driving at with regard to stepping into lots of C++ abstraction stuff. But I think it gets blurry trying to distinguish what's

[Bug tree-optimization/110915] vector version of `x == MIN & x > y` is not optimized

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

[Bug tree-optimization/110915] vector version of `x == MIN & x > y` is not optimized

2023-08-31 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110915 --- Comment #4 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:16a268785f646b3d641acd8634ab487b24f51c33 commit r14-3603-g16a268785f646b3d641acd8634ab487b24f51c33 Author: Andrew Pinski Date:

[Bug middle-end/111156] [14 Regression] aarch64 aarch64/sve/mask_struct_store_4.c failures

2023-08-31 Thread adhemerval.zanella at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56 Adhemerval Zanella changed: What|Removed |Added Resolution|DUPLICATE |--- Status|RESOLVED

[PATCH] MATCH [PR19832]: Optimize some `(a != b) ? a OP b : c`

2023-08-31 Thread Andrew Pinski via Gcc-patches
This patch adds the following match patterns to optimize these: /* (a != b) ? (a - b) : 0 -> (a - b) */ /* (a != b) ? (a ^ b) : 0 -> (a ^ b) */ /* (a != b) ? (a & b) : a -> (a & b) */ /* (a != b) ? (a | b) : a -> (a | b) */ /* (a != b) ? min(a,b) : a -> min(a,b) */ /* (a != b) ? max(a,b) : a

[Bug fortran/99711] Crash when reading an allocated character array in namelist

2023-08-31 Thread kargl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99711 kargl at gcc dot gnu.org changed: What|Removed |Added Known to work||12.2.0, 14.0

[Bug fortran/99711] Crash when reading an allocated character array in namelist

2023-08-31 Thread sgk at troutmask dot apl.washington.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99711 --- Comment #19 from Steve Kargl --- On Thu, Aug 31, 2023 at 12:58:15PM +, philippe.wautelet at aero dot obs-mip.fr wrote: > > What is the status of this bug? > > It seems that it is not present any more in the 12.x and 13.x GCC versions.

Re: [PATCH] c++, v2: Fix up mangling of function/block scope static structured bindings and emit abi tags [PR111069]

2023-08-31 Thread Jason Merrill via Gcc-patches
On 8/28/23 09:58, Jakub Jelinek wrote: Hi! On Thu, Aug 24, 2023 at 06:39:10PM +0200, Jakub Jelinek via Gcc-patches wrote: Maybe do this in mangle_decomp, based on the actual mangling in process instead of this pseudo-mangling? Not sure that is possible, for 2 reasons: 1)

Re: [PATCH] libstdc++: Use GLIBCXX_CHECK_LINKER_FEATURES for cross-builds (PR111238)

2023-08-31 Thread Hans-Peter Nilsson via Gcc-patches
> Date: Thu, 31 Aug 2023 17:25:45 +0200 > From: Christophe Lyon via Gcc-patches > As discussed in PR104167 (comments #8 and below), and PR111238, using > -Wl,-gc-sections in the libstdc++ testsuite for arm-eabi > (cross-toolchain) avoids link failures for a few tests: > >

Re: [PATCH] analyzer: implement reference count checking for CPython plugin [PR107646]

2023-08-31 Thread David Malcolm via Gcc
On Wed, 2023-08-30 at 18:15 -0400, Eric Feng wrote: > On Tue, Aug 29, 2023 at 5:14 PM David Malcolm > wrote: > > > > On Tue, 2023-08-29 at 13:28 -0400, Eric Feng wrote: > > > Additionally, by using the old model and the pointer per your > > > suggestion, > > > we are able to find the

Re: [PATCH] analyzer: implement reference count checking for CPython plugin [PR107646]

2023-08-31 Thread David Malcolm via Gcc-patches
On Wed, 2023-08-30 at 18:15 -0400, Eric Feng wrote: > On Tue, Aug 29, 2023 at 5:14 PM David Malcolm > wrote: > > > > On Tue, 2023-08-29 at 13:28 -0400, Eric Feng wrote: > > > Additionally, by using the old model and the pointer per your > > > suggestion, > > > we are able to find the

[Bug gcov-profile/110827] C++20 coroutines aren't being measured by gcov

2023-08-31 Thread mwd at md5i dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110827 --- Comment #9 from Michael Duggan --- More data: The coroutine actor is marked as artificial in coro_build_actor_or_destroy_function. As a result, it is completely ignored by gcov. In gcov's process_all_functions function, artificial

[Bug target/111246] PPC64 Sequentially Consistent Load allows Reordering of Stores

2023-08-31 Thread dje at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111246 --- Comment #7 from David Edelsohn --- Have you reached out to Paul McKenney (now at Meta) who suggested the instruction sequences to implement the C/C++ memory for PowerPC? https://open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2745.html

Re: [PATCH] Darwin: homogenize spelling of macOS

2023-08-31 Thread FX Coudert via Gcc-patches
Hi, Thanks Sandra and Iain. Patch pushed. FX

Re: [PATCH] Darwin: homogenize spelling of macOS

2023-08-31 Thread Sandra Loosemore
On 8/31/23 05:27, Iain Sandoe wrote: Hi FX, +Sandra On 31 Aug 2023, at 12:13, FX Coudert wrote: This patch homogenizes to some extent the use of “Mac OS X” or “OS X” or “Mac OS” in the gcc/ folder to “macOS”, which is the modern way of writing it. It is not a global replacement though,

Confusing location of error in source code

2023-08-31 Thread Alejandro Colomar via Gcc
Hi! I've been confused for some time with a compilation error that pointed to a slightly-off location. I wasn't seeing that I used a temporary variable in a constant expression. The code could be reduced to: $ cat const.c int main(void) { int x = 42; _Static_assert(0 || 7 >

[PATCH] libstdc++: Use GLIBCXX_CHECK_LINKER_FEATURES for cross-builds (PR111238)

2023-08-31 Thread Christophe Lyon via Gcc-patches
As discussed in PR104167 (comments #8 and below), and PR111238, using -Wl,-gc-sections in the libstdc++ testsuite for arm-eabi (cross-toolchain) avoids link failures for a few tests: 27_io/filesystem/path/108636.cc std/time/clock/gps/1.cc std/time/clock/gps/io.cc std/time/clock/tai/1.cc

  1   2   3   >