[Bug target/107757] New: PPCLE: Inefficient vector constant creation

2022-11-18 Thread jens.seifert at de dot ibm.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107757 Bug ID: 107757 Summary: PPCLE: Inefficient vector constant creation Product: gcc Version: 12.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

Re: nvptx: In 'STARTFILE_SPEC', fix 'crt0.o' for '-mmainkernel' (was: [MentorEmbedded/nvptx-tools] Match standard 'ld' "search" behavior (PR #38))

2022-11-18 Thread Tom de Vries via Gcc-patches
On 11/19/22 00:25, Thomas Schwinge wrote: Hi! Re : On 2022-11-18T11:05:23-0800, I wrote: Actually, in GCC/nvptx target testing, this #38's commit 886a95faf66bf66a82fc0fe7d2a9fd9e9fec2820 "ld: Don't search for

[PATCH] i386: Only enable small loop unrolling in backend [PR 107602]

2022-11-18 Thread Hongyu Wang via Gcc-patches
Hi, Followed by the discussion in pr107602, -munroll-only-small-loops Does not turns on/off -funroll-loops, and current check in pass_rtl_unroll_loops::gate would cause -funroll-loops do not take effect. Revert the change about targetm.loop_unroll_adjust and apply the backend option change to

[Bug c/107756] New: Change in sizeof(enum) with -std=gnu11 breaks Linux kernel code compilation (PR c/36113 change regression)

2022-11-18 Thread macro at orcam dot me.uk via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107756 Bug ID: 107756 Summary: Change in sizeof(enum) with -std=gnu11 breaks Linux kernel code compilation (PR c/36113 change regression) Product: gcc Version: 13.0 Status:

Re: [PATCH] c++: cache the normal form of a concept-id

2022-11-18 Thread Jason Merrill via Gcc-patches
On 11/18/22 16:43, Patrick Palka wrote: We already cache the overall normal form of a declaration's constraints under the assumption that it can't change over the translation unit. But if we have two constrained declarations such as template void f() requires expensive && A; template void

Re: [PATCH] constexprify some tree variables

2022-11-18 Thread Andrew Pinski via Gcc-patches
On Fri, Nov 18, 2022 at 12:06 PM Jeff Law via Gcc-patches wrote: > > > On 11/18/22 11:05, apinski--- via Gcc-patches wrote: > > From: Andrew Pinski > > > > Since we use C++11 by default now, we can > > use constexpr for some const decls in tree-core.h. > > > > This patch does that and it allows

Re: [PATCH RFA] libstdc++: add experimental Contracts support

2022-11-18 Thread Jason Merrill via Gcc-patches
On 11/18/22 13:17, Jonathan Wakely wrote: On 03/11/22 15:57 -0400, Jason Merrill wrote: Tested x86_64-pc-linux-gnu.  OK for trunk? -- >8 -- This patch adds the library support for the experimental C++ Contracts implementation.  This now consists only of a default definition of the violation

Re: [PATCH v3] c++: P2448 - Relaxing some constexpr restrictions [PR106649]

2022-11-18 Thread Jason Merrill via Gcc-patches
On 11/16/22 15:27, Jason Merrill wrote: On 11/16/22 11:06, Marek Polacek wrote: On Wed, Nov 16, 2022 at 08:41:53AM -0500, Jason Merrill wrote: On 11/15/22 19:30, Marek Polacek wrote: @@ -996,19 +1040,26 @@ register_constexpr_fundef (const constexpr_fundef ) **slot = value;    } -/* FUN

Re: [PATCH v2] c++: Reject UDLs in certain contexts [PR105300]

2022-11-18 Thread Jason Merrill via Gcc-patches
On 11/18/22 18:52, Marek Polacek wrote: On Thu, Nov 17, 2022 at 07:06:34PM -0500, Jason Merrill wrote: On 11/16/22 20:12, Marek Polacek wrote: On Wed, Nov 16, 2022 at 08:22:39AM -0500, Jason Merrill wrote: On 11/15/22 19:35, Marek Polacek wrote: On Tue, Nov 15, 2022 at 06:58:39PM -0500,

[Bug c++/107755] ICE: in fold_convert_loc, at fold-const.c:2435, with -Wlogical-op, implicit user-defined conversion operator, template function, logical operator, and conditional operator

2022-11-18 Thread pokechu022+gccbugzilla at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107755 Pokechu22 changed: What|Removed |Added Known to fail||10.3.0, 12.2.0, 4.8.1, |

[Bug c++/107755] New: ICE: in fold_convert_loc, at fold-const.c:2435, with -Wlogical-op, implicit user-defined conversion operator, template function, logical operator, and conditional operator

2022-11-18 Thread pokechu022+gccbugzilla at gmail dot com via Gcc-bugs
mpiler-explorer/gcc-snapshot/bin/g++ Target: x86_64-linux-gnu Configured with: ../gcc-trunk-20221118/configure --prefix=/opt/compiler-explorer/gcc-build/staging --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --disable-bootstrap --enable-multiarch --with-abi=m64 --with-multili

[Bug analyzer/107582] - -Wanalyzer-use-of-uninitialized-value false positive with while loop in pthread_cleanup_push

2022-11-18 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107582 --- Comment #9 from David Malcolm --- s/earlier/earliest/

[Bug analyzer/107582] - -Wanalyzer-use-of-uninitialized-value false positive with while loop in pthread_cleanup_push

2022-11-18 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107582 --- Comment #8 from David Malcolm --- (In reply to David Malcolm from comment #7) > I hope to backport this to GCC 12; keeping this open to track that. I believe the buggy implementation of dynamic_call_info_t::update_model was introduced in

[Bug analyzer/107582] - -Wanalyzer-use-of-uninitialized-value false positive with while loop in pthread_cleanup_push

2022-11-18 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107582 --- Comment #7 from David Malcolm --- Fixed on trunk for GCC 13 by the above commit. I hope to backport this to GCC 12; keeping this open to track that.

[committed] analyzer: fix feasibility false +ve on jumps through function ptrs [PR107582]

2022-11-18 Thread David Malcolm via Gcc-patches
PR analyzer/107582 reports a false +ve from -Wanalyzer-use-of-uninitialized-value where the analyzer's feasibility checker erroneously decides that point (B) in the code below is reachable, with "x" being uninitialized there: pthread_cleanup_push(func, NULL); while (ret != ETIMEDOUT)

[Bug analyzer/107582] - -Wanalyzer-use-of-uninitialized-value false positive with while loop in pthread_cleanup_push

2022-11-18 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107582 --- Comment #6 from CVS Commits --- The master branch has been updated by David Malcolm : https://gcc.gnu.org/g:a7aef0a5a2b7e20048275a29bd80674c1a061a24 commit r13-4158-ga7aef0a5a2b7e20048275a29bd80674c1a061a24 Author: David Malcolm Date:

[Bug fortran/107753] gfortran returns NaN in complex divisions (x+x*I)/(x+x*I) and (x+x*I)/(x-x*I)

2022-11-18 Thread sgk at troutmask dot apl.washington.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107753 --- Comment #9 from Steve Kargl --- On Fri, Nov 18, 2022 at 11:24:29PM +, sgk at troutmask dot apl.washington.edu wrote: > > Does anyone know what is meant by "Fortran rules"? F66 does not > have any particular algorithm specified. I'll

[Bug ipa/96503] attribute alloc_size effect lost after inlining

2022-11-18 Thread pageexec at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96503 PaX Team changed: What|Removed |Added CC||pageexec at gmail dot com --- Comment #2

[PATCH v2] c++: Reject UDLs in certain contexts [PR105300]

2022-11-18 Thread Marek Polacek via Gcc-patches
On Thu, Nov 17, 2022 at 07:06:34PM -0500, Jason Merrill wrote: > On 11/16/22 20:12, Marek Polacek wrote: > > On Wed, Nov 16, 2022 at 08:22:39AM -0500, Jason Merrill wrote: > > > On 11/15/22 19:35, Marek Polacek wrote: > > > > On Tue, Nov 15, 2022 at 06:58:39PM -0500, Jason Merrill wrote: > > > > >

Re: [PATCH] c++: remove coerce_innermost_template_parms

2022-11-18 Thread Jason Merrill via Gcc-patches
On 11/18/22 16:59, Patrick Palka wrote: IIUC the only practical difference between coerce_innermost_template_parms and the main function coerce_template_parms is that the former takes a multi-level template parameter list and returns a template argument vector of the same depth, whereas the

[Bug fortran/107753] gfortran returns NaN in complex divisions (x+x*I)/(x+x*I) and (x+x*I)/(x-x*I)

2022-11-18 Thread weslley.pereira at ucdenver dot edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107753 --- Comment #8 from Weslley da Silva Pereira --- Created attachment 53927 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53927=edit Test case with many examples of complex division Test code used in LAPACK 3.11.0. Code extracted from

[Bug fortran/107753] gfortran returns NaN in complex divisions (x+x*I)/(x+x*I) and (x+x*I)/(x-x*I)

2022-11-18 Thread weslley.pereira at ucdenver dot edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107753 --- Comment #7 from Weslley da Silva Pereira --- (In reply to anlauf from comment #3) > I guess the reporter assumes that gcc uses a clever algorithm like Smith's > to handle such extreme cases of complex division. Not sure if that one is >

[Bug fortran/107753] gfortran returns NaN in complex divisions (x+x*I)/(x+x*I) and (x+x*I)/(x-x*I)

2022-11-18 Thread sgk at troutmask dot apl.washington.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107753 --- Comment #6 from Steve Kargl --- On Fri, Nov 18, 2022 at 11:24:29PM +, sgk at troutmask dot apl.washington.edu wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107753 > > --- Comment #5 from Steve Kargl --- > On Fri, Nov 18, 2022

nvptx: In 'STARTFILE_SPEC', fix 'crt0.o' for '-mmainkernel' (was: [MentorEmbedded/nvptx-tools] Match standard 'ld' "search" behavior (PR #38))

2022-11-18 Thread Thomas Schwinge
Hi! Re : On 2022-11-18T11:05:23-0800, I wrote: > Actually, in GCC/nvptx target testing, this #38's commit > 886a95faf66bf66a82fc0fe7d2a9fd9e9fec2820 "ld: Don't search for input files in > '-L'directories" is

[Bug fortran/107753] gfortran returns NaN in complex divisions (x+x*I)/(x+x*I) and (x+x*I)/(x-x*I)

2022-11-18 Thread sgk at troutmask dot apl.washington.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107753 --- Comment #5 from Steve Kargl --- On Fri, Nov 18, 2022 at 10:05:21PM +, kargl at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107753 > > --- Comment #4 from kargl at gcc dot gnu.org --- > (In reply to anlauf from

[Bug debug/99090] gsplit-dwarf broken on riscv64-linux

2022-11-18 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99090 Jeffrey A. Law changed: What|Removed |Added Status|ASSIGNED|RESOLVED CC|

[Bug rtl-optimization/100647] ICE during sms pass

2022-11-18 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100647 Jeffrey A. Law changed: What|Removed |Added Priority|P3 |P4 CC|

[Bug rtl-optimization/103296] Select satisfied register for deleting noop move instruction.

2022-11-18 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103296 Jeffrey A. Law changed: What|Removed |Added Resolution|--- |FIXED Status|UNCONFIRMED

gcc-11-20221118 is now available

2022-11-18 Thread GCC Administrator via Gcc
Snapshot gcc-11-20221118 is now available on https://gcc.gnu.org/pub/gcc/snapshots/11-20221118/ 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

Re: [PATCH] RISC-V: Optimise adding a (larger than simm12) constant

2022-11-18 Thread Jeff Law
On 11/18/22 14:26, Philipp Tomsich wrote: On Fri, 18 Nov 2022 at 22:13, Jeff Law wrote: On 11/9/22 16:07, Philipp Tomsich wrote: Handling the register-const_int addition has very quickly escalated to creating a full sign-extended 32bit constant and performing a register-register for RISC-V

[Bug fortran/107753] gfortran returns NaN in complex divisions (x+x*I)/(x+x*I) and (x+x*I)/(x-x*I)

2022-11-18 Thread kargl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107753 --- Comment #4 from kargl at gcc dot gnu.org --- (In reply to anlauf from comment #3) > I guess the reporter assumes that gcc uses a clever algorithm like Smith's > to handle such extreme cases of complex division. Not sure if that one is >

[committed] analyzer: move more impl_* to known_function

2022-11-18 Thread David Malcolm via Gcc-patches
Fix a missing check that the argument to __analyzer_dump_capacity must be a pointer type (which would otherwise lead to an ICE). Do so by using the known_function_manager rather than by doing lots of string matching. Do the same for many other functions. Doing so moves the type-checking closer

[PATCH] c++: remove coerce_innermost_template_parms

2022-11-18 Thread Patrick Palka via Gcc-patches
IIUC the only practical difference between coerce_innermost_template_parms and the main function coerce_template_parms is that the former takes a multi-level template parameter list and returns a template argument vector of the same depth, whereas the latter takes a single-level template parameter

[Bug tree-optimization/25290] PHI-OPT could be rewritten so that is uses match

2022-11-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25290 --- Comment #26 from Andrew Pinski --- (In reply to Andrew Pinski from comment #25) > The minmax is recorded as PR 101024. There is some more improvements to > gimple_simplify_phiopt needed for early_p as the way min/max patterns are >

[PATCH] c++: cache the normal form of a concept-id

2022-11-18 Thread Patrick Palka via Gcc-patches
We already cache the overall normal form of a declaration's constraints under the assumption that it can't change over the translation unit. But if we have two constrained declarations such as template void f() requires expensive && A; template void g() requires expensive && B; then despite

[Bug target/107692] [13 regression] r13-3950-g071e428c24ee8c breaks many test cases

2022-11-18 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107692 --- Comment #10 from Segher Boessenkool --- (In reply to Hongyu Wang from comment #9) > The difference is, -mno-unroll-only-small-loops -O2 would cause > rtl-loop-unroll takeing effect, No. -m{no-,}unroll-only-small-loops does not enable or

[Bug tree-optimization/107754] Confusing -Warray-bounds warning with strcpy with a null pointer and non-zero offset for struct array

2022-11-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107754 --- Comment #2 from Andrew Pinski --- Note in the origin "reduced" testcase, we had a conditional null pointer which was exposing the null pointer at -O2 due to optimizations.

[Bug tree-optimization/107754] Confusing -Warray-bounds warning with strcpy with a null pointer

2022-11-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107754 Andrew Pinski changed: What|Removed |Added Last reconfirmed||2022-11-18 Ever confirmed|0

Re: [PATCH] RISC-V: Optimise adding a (larger than simm12) constant

2022-11-18 Thread Philipp Tomsich
On Fri, 18 Nov 2022 at 22:13, Jeff Law wrote: > > > On 11/9/22 16:07, Philipp Tomsich wrote: > > Handling the register-const_int addition has very quickly escalated to > > creating a full sign-extended 32bit constant and performing a > > register-register for RISC-V in GCC so far, resulting in

[Bug fortran/107753] gfortran returns NaN in complex divisions (x+x*I)/(x+x*I) and (x+x*I)/(x-x*I)

2022-11-18 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107753 --- Comment #3 from anlauf at gcc dot gnu.org --- I guess the reporter assumes that gcc uses a clever algorithm like Smith's to handle such extreme cases of complex division. Not sure if that one is available by some compilation flag, and I

[Bug c/107754] New: Confusing -Warray-bounds warning with strcpy

2022-11-18 Thread nightstrike at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107754 Bug ID: 107754 Summary: Confusing -Warray-bounds warning with strcpy Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

Re: [PATCH] RISC-V: Optimise adding a (larger than simm12) constant

2022-11-18 Thread Jeff Law via Gcc-patches
On 11/9/22 16:07, Philipp Tomsich wrote: Handling the register-const_int addition has very quickly escalated to creating a full sign-extended 32bit constant and performing a register-register for RISC-V in GCC so far, resulting in sequences like (for the case of "a + 2048"): li

[Bug fortran/107753] gfortran returns NaN in complex divisions (x+x*I)/(x+x*I) and (x+x*I)/(x-x*I)

2022-11-18 Thread kargl at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107753 kargl at gcc dot gnu.org changed: What|Removed |Added CC||kargl at gcc dot gnu.org

Re: [PATCH v2] RISC-V: No extensions for SImode min/max against safe constant

2022-11-18 Thread Philipp Tomsich
Applied to master. Thanks! --Philipp. On Fri, 18 Nov 2022 at 21:11, Jeff Law wrote: > > On 11/8/22 17:06, Philipp Tomsich wrote: > > Optimize the common case of a SImode min/max against a constant > > that is safe both for sign- and zero-extension. > > E.g., consider the case > >int

[Bug analyzer/107582] - -Wanalyzer-use-of-uninitialized-value false positive with while loop in pthread_cleanup_push

2022-11-18 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107582 --- Comment #5 from David Malcolm --- It's a bug in feasibility-checking when jumping through a function pointer: dynamic_call_info_t::update_model blindly copies over the state from the exploded_node's state, overwriting the precise knowledge

Re: [PATCH v2] libcpp: Avoid remapping filenames within directives

2022-11-18 Thread Jeff Law via Gcc-patches
On 11/2/22 04:47, Richard Purdie via Gcc-patches wrote: Code such as: #include __FILE__ can interact poorly with the *-prefix-map options when cross compiling. In general you're after to remap filenames for use in target context but the local paths should be used to find include files at

Re: [PATCH v2] RISC-V: No extensions for SImode min/max against safe constant

2022-11-18 Thread Jeff Law via Gcc-patches
On 11/8/22 17:06, Philipp Tomsich wrote: Optimize the common case of a SImode min/max against a constant that is safe both for sign- and zero-extension. E.g., consider the case int f(unsigned int* a) { const int C = 1000; return *a * 3 > C ? C : *a * 3; } where the constant

[Bug libstdc++/101228] tbb/task.h is Deprecated in newer TBB.

2022-11-18 Thread kerukuro at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101228 kerukuro changed: What|Removed |Added CC||kerukuro at gmail dot com --- Comment #13

[Bug analyzer/107582] - -Wanalyzer-use-of-uninitialized-value false positive with while loop in pthread_cleanup_push

2022-11-18 Thread dmalcolm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107582 David Malcolm changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Ever confirmed|0

Re: [PATCH] RISC-V: Fix RVV testcases.

2022-11-18 Thread Jeff Law via Gcc-patches
On 11/5/22 18:13, Kito Cheng via Gcc-patches wrote: Alternative fix for those testcase has posted: https://gcc.gnu.org/pipermail/gcc-patches/2022-November/605126.html Did this ever get addressed, in either form? jeff

Re: [PATCH] constexprify some tree variables

2022-11-18 Thread Jeff Law via Gcc-patches
On 11/18/22 11:05, apinski--- via Gcc-patches wrote: From: Andrew Pinski Since we use C++11 by default now, we can use constexpr for some const decls in tree-core.h. This patch does that and it allows for better optimizations of GCC code with checking enabled and without LTO. For an

[Bug tree-optimization/107751] [11/12/13 regression] False positive -Wmaybe-uninitialized at -O0

2022-11-18 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107751 Marek Polacek changed: What|Removed |Added Keywords|needs-bisection | CC|

Re: [PATCH v2 0/2] Use Zbs with xori/ori/andi and polarity-reversed twobit-tests

2022-11-18 Thread Philipp Tomsich
(Both) applied to master. Thanks! --Philipp. On Fri, 18 Nov 2022 at 20:13, Jeff Law wrote: > > On 11/18/22 04:09, Philipp Tomsich wrote: > > We had a few patches on the list that shared predicates (for extending > > the reach of xori and ori -- and for the branches on two > > polarity-reversed

[Bug c++/107751] [11/12/13 regression] False positive -Wmaybe-uninitialized at -O0

2022-11-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107751 --- Comment #2 from Andrew Pinski --- Reduced testcase (removes the templates, also now able to compile as C): typedef const int T1; typedef const int T2; void std_equal(T1* a1, T1* a2, T2* b1); void f() { int a[3] = {1, 2, 3}; T1* x

[Bug c++/107751] [11/12/13 regression] False positive -Wmaybe-uninitialized at -O0

2022-11-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107751 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |11.4 Last reconfirmed|

Re: [PATCH] RISC-V: Optimize slli(.uw)? + addw + zext.w into sh[123]add + zext.w

2022-11-18 Thread Philipp Tomsich
On Fri, 18 Nov 2022 at 20:52, Jeff Law wrote: > Something to consider. We're gaining a lot of > > (subreg:SI (reg:DI) 0) kinds of operands. > > > Would it make sense to make an operand predicate that accepted > > (reg:SI) or (subreg:SI (reg:DI) 0)? > > > It will reduce my compaints about

Re: [PATCH] RISC-V: Optimize slli(.uw)? + addw + zext.w into sh[123]add + zext.w

2022-11-18 Thread Philipp Tomsich
Applied to master. Thanks. --Philipp. On Fri, 18 Nov 2022 at 20:52, Jeff Law wrote: > > On 11/8/22 12:57, Philipp Tomsich wrote: > > gcc/ChangeLog: > > > > * config/riscv/bitmanip.md: Handle corner-cases for combine > > when chaining slli(.uw)? + addw > > > >

Re: [PATCH] RISC-V: split to allow formation of sh[123]add before divw

2022-11-18 Thread Philipp Tomsich
Applied to master. Thanks! --Philipp. On Fri, 18 Nov 2022 at 20:37, Jeff Law wrote: > > On 11/8/22 12:56, Philipp Tomsich wrote: > > When using strength-reduction, we will reduce a multiplication to a > > sequence of shifts and adds. If this is performed with 32-bit types > > and followed by a

Re: [PATCH] RISC-V: Optimize branches testing a bit-range or a shifted immediate

2022-11-18 Thread Philipp Tomsich
Applied to master. Thanks! Philipp. On Fri, 18 Nov 2022 at 20:30, Jeff Law wrote: > > On 11/8/22 13:46, Philipp Tomsich wrote: > > gcc/ChangeLog: > > > > * config/riscv/predicates.md (shifted_const_arith_operand): > > (uimm_extra_bit_operand): > > * config/riscv/riscv.md >

[Bug sanitizer/107752] Lack of column information in AddressSanitizer reports

2022-11-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107752 Andrew Pinski changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed|

Re: [PATCH] RISC-V: allow bseti on SImode without sign-extension

2022-11-18 Thread Philipp Tomsich
Applied to master. Thanks! Philipp. On Fri, 18 Nov 2022 at 20:26, Jeff Law wrote: > > On 11/8/22 13:03, Philipp Tomsich wrote: > > As long as the SImode operand is not a partial subreg, we can use a > > bseti without postprocessing to or in a bit, as the middle end is > > smart enough to stay

Re: [PATCH] RISC-V: Optimize slli(.uw)? + addw + zext.w into sh[123]add + zext.w

2022-11-18 Thread Jeff Law via Gcc-patches
On 11/8/22 12:57, Philipp Tomsich wrote: gcc/ChangeLog: * config/riscv/bitmanip.md: Handle corner-cases for combine when chaining slli(.uw)? + addw gcc/testsuite/ChangeLog: * gcc.target/riscv/zba-shNadd-04.c: New test. OK. Something to consider.  We're gaining a

[Bug sanitizer/107752] Lack of column information in AddressSanitizer reports

2022-11-18 Thread shaohua.li at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107752 --- Comment #3 from Li Shaohua --- (In reply to Andrew Pinski from comment #1) > Do you mean the column information rather than offset? Yes, I meant the column information. I don’t know the implementation details of ASAN. But as UBsan can

[Bug fortran/107753] gfortran returns NaN in complex divisions (x+x*I)/(x+x*I) and (x+x*I)/(x-x*I)

2022-11-18 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107753 anlauf at gcc dot gnu.org changed: What|Removed |Added Last reconfirmed||2022-11-18

Re: [PATCH v2] genmultilib: Add sanity check

2022-11-18 Thread Jeff Law via Gcc-patches
On 11/3/22 03:52, Christophe Lyon via Gcc-patches wrote: When a list of dirnames is provided to genmultilib, its length is expected to match the number of options. If this is not the case, the build fails later for reasons not obviously related to this mistake. This patch adds a sanity check

Re: [PATCH] RISC-V: split to allow formation of sh[123]add before divw

2022-11-18 Thread Jeff Law via Gcc-patches
On 11/8/22 12:56, Philipp Tomsich wrote: When using strength-reduction, we will reduce a multiplication to a sequence of shifts and adds. If this is performed with 32-bit types and followed by a division, the lack of w-form sh[123]add will make combination impossible and lead to a slli + addw

[Bug target/107692] [13 regression] r13-3950-g071e428c24ee8c breaks many test cases

2022-11-18 Thread wwwhhhyyy333 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107692 --- Comment #9 from Hongyu Wang --- (In reply to Segher Boessenkool from comment #8) > (In reply to Jiu Fu Guo from comment #5) > > > -munroll-only-small-loops does not turn on or off -funroll-loops, and it > > > should not, so that it does

[Bug fortran/107753] New: gfortran returns NaN in complex divisions (x+x*I)/(x+x*I) and (x+x*I)/(x-x*I)

2022-11-18 Thread weslley.pereira at ucdenver dot edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107753 Bug ID: 107753 Summary: gfortran returns NaN in complex divisions (x+x*I)/(x+x*I) and (x+x*I)/(x-x*I) Product: gcc Version: 12.2.0 Status: UNCONFIRMED

Re: [PATCH] RISC-V: Optimize branches testing a bit-range or a shifted immediate

2022-11-18 Thread Jeff Law via Gcc-patches
On 11/8/22 13:46, Philipp Tomsich wrote: gcc/ChangeLog: * config/riscv/predicates.md (shifted_const_arith_operand): (uimm_extra_bit_operand): * config/riscv/riscv.md (*branch_shiftedarith_equals_zero): (*branch_shiftedmask_equals_zero):

Re: [PATCH] RISC-V: allow bseti on SImode without sign-extension

2022-11-18 Thread Jeff Law via Gcc-patches
On 11/8/22 13:03, Philipp Tomsich wrote: As long as the SImode operand is not a partial subreg, we can use a bseti without postprocessing to or in a bit, as the middle end is smart enough to stay away from the signbit. gcc/ChangeLog: * config/riscv/bitmanip.md (*bsetidisi): New

Re: [PATCH v2 0/2] Use Zbs with xori/ori/andi and polarity-reversed twobit-tests

2022-11-18 Thread Jeff Law via Gcc-patches
On 11/18/22 04:09, Philipp Tomsich wrote: We had a few patches on the list that shared predicates (for extending the reach of xori and ori -- and for the branches on two polarity-reversed bits) and thus depended on each other. These all had approval with requested changes, so these are now

[PATCH] gomp: Various fixes for SVE types [PR101018]

2022-11-18 Thread Richard Sandiford via Gcc-patches
[I posted this late in stage 4 as an RFC, but it wasn't suitable for GCC 12 at that point. I kind-of dropped the ball after that, sorry.] Various parts of the omp code checked whether the size of a decl was an INTEGER_CST in order to determine whether the decl was variable-sized or not. If it

[Bug fortran/107680] ICE in arith_power, at fortran/arith.cc:989 and :1006

2022-11-18 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107680 anlauf at gcc dot gnu.org changed: What|Removed |Added Resolution|--- |FIXED

Re: [PATCH 2/5] c++: Set the locus of the function result decl

2022-11-18 Thread Bernhard Reutner-Fischer via Gcc-patches
On Fri, 18 Nov 2022 11:06:29 -0500 Jason Merrill wrote: > Ah, so the problem is deferred parsing of methods, rather than > templates. Building the DECL_RESULT sooner does seem like the right > approach to handling that, whether that's in grokfndecl or grokmethod. > >> I'd like to get the

[Bug fortran/107576] [10/11/12/13 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.cc:6193

2022-11-18 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107576 --- Comment #11 from CVS Commits --- The master branch has been updated by Harald Anlauf : https://gcc.gnu.org/g:820c25c83561085f54268bd536f9d216d03c3e18 commit r13-4147-g820c25c83561085f54268bd536f9d216d03c3e18 Author: Harald Anlauf Date:

Re: [PATCH RFA] libstdc++: add experimental Contracts support

2022-11-18 Thread Jonathan Wakely via Gcc-patches
On 03/11/22 15:57 -0400, Jason Merrill wrote: Tested x86_64-pc-linux-gnu. OK for trunk? -- >8 -- This patch adds the library support for the experimental C++ Contracts implementation. This now consists only of a default definition of the violation handler, which users can override through

[PATCH] constexprify some tree variables

2022-11-18 Thread apinski--- via Gcc-patches
From: Andrew Pinski Since we use C++11 by default now, we can use constexpr for some const decls in tree-core.h. This patch does that and it allows for better optimizations of GCC code with checking enabled and without LTO. For an example generic-match.cc compiling is speed up due to the less

Re: [Patch] libgomp/gcn: Prepare for reverse-offload callback handling

2022-11-18 Thread Andrew Stubbs
On 18/11/2022 17:41, Tobias Burnus wrote: Attached is the updated/rediffed version, which now uses the builtin instead of the 'asm("s8"). The code in principle works; that is: If no private stack variables are copied, it works. Or in other words: reverse-offload target regions that don't

Re: [Patch] gcn: Add __builtin_gcn_{get_stack_limit,first_call_this_thread_p}

2022-11-18 Thread Andrew Stubbs
On 18/11/2022 17:20, Tobias Burnus wrote: This patch adds two builtins (getting end-of-stack pointer and a Boolean answer whether it was the first call to the builtin on this thread). The idea is to replace some hard-coded values in newlib, permitting to move later to a manually allocated

Re: [Patch] libgomp/gcn: Prepare for reverse-offload callback handling

2022-11-18 Thread Tobias Burnus
Attached is the updated/rediffed version, which now uses the builtin instead of the 'asm("s8"). The code in principle works; that is: If no private stack variables are copied, it works. Or in other words: reverse-offload target regions that don't use firstprivate or mapping work, the rest would

[Bug testsuite/107689] [13 regression] r13-3979-g9d29dd2fcf2922 causes failures in diagnostic-format-json-2.c and others

2022-11-18 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107689 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org

[Bug sanitizer/107752] Lack of column information in AddressSanitizer reports

2022-11-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107752 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement Keywords|

[Bug sanitizer/107752] Lack of column information in AddressSanitizer reports

2022-11-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107752 Andrew Pinski changed: What|Removed |Added Summary|Lack of offset information |Lack of column information

[Bug sanitizer/107752] Lack of offset information in AddressSanitizer reports

2022-11-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107752 --- Comment #1 from Andrew Pinski --- Do you mean the column information rather than offset?

[Patch] gcn: Add __builtin_gcn_{get_stack_limit,first_call_this_thread_p}

2022-11-18 Thread Tobias Burnus
This patch adds two builtins (getting end-of-stack pointer and a Boolean answer whether it was the first call to the builtin on this thread). The idea is to replace some hard-coded values in newlib, permitting to move later to a manually allocated stack on the compiler side without the need to

[Bug c/106765] [12/13 Regression] ICE (invalid code) in tree check: expected class 'type', have 'exceptional' (error_mark) in create_tmp_from_val, at gimplify.cc since r12-7222-g3f10e0d50b5e3b3f

2022-11-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106765 Andrew Pinski changed: What|Removed |Added Target Milestone|12.3|13.0 Status|ASSIGNED

[Bug middle-end/107307] [12/13 Regression] ICE tree check: expected class 'type', have 'exceptional' (error_mark) in canonicalize_component_ref, at gimplify.cc:2923 since r12-3278-g823685221de986af

2022-11-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107307 Andrew Pinski changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c/106764] [12/13 Regression] ICE on invalid code in tree check: expected function_type or method_type, have error_mark in gimplify_call_expr, at gimplify.cc

2022-11-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106764 Andrew Pinski changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c/107705] [12/13 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in ix86_function_type_abi, at config/i386/i386.cc:1529

2022-11-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107705 Andrew Pinski changed: What|Removed |Added Target Milestone|12.3|13.0 Status|ASSIGNED

[Bug c/106764] [12/13 Regression] ICE on invalid code in tree check: expected function_type or method_type, have error_mark in gimplify_call_expr, at gimplify.cc

2022-11-18 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106764 --- Comment #5 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:bd0c9d9e706adaeea0d96152daade0a6819a8715 commit r13-4143-gbd0c9d9e706adaeea0d96152daade0a6819a8715 Author: Andrew Pinski Date:

[Bug middle-end/107307] [12/13 Regression] ICE tree check: expected class 'type', have 'exceptional' (error_mark) in canonicalize_component_ref, at gimplify.cc:2923 since r12-3278-g823685221de986af

2022-11-18 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107307 --- Comment #4 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:bd0c9d9e706adaeea0d96152daade0a6819a8715 commit r13-4143-gbd0c9d9e706adaeea0d96152daade0a6819a8715 Author: Andrew Pinski Date:

[Bug c/107705] [12/13 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in ix86_function_type_abi, at config/i386/i386.cc:1529

2022-11-18 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107705 --- Comment #3 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:ceba66ee230bb96b0889fc8ec7333c7ffae96d6e commit r13-4144-gceba66ee230bb96b0889fc8ec7333c7ffae96d6e Author: Andrew Pinski Date:

[Bug c/106765] [12/13 Regression] ICE (invalid code) in tree check: expected class 'type', have 'exceptional' (error_mark) in create_tmp_from_val, at gimplify.cc since r12-7222-g3f10e0d50b5e3b3f

2022-11-18 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106765 --- Comment #2 from CVS Commits --- The trunk branch has been updated by Andrew Pinski : https://gcc.gnu.org/g:bd0c9d9e706adaeea0d96152daade0a6819a8715 commit r13-4143-gbd0c9d9e706adaeea0d96152daade0a6819a8715 Author: Andrew Pinski Date:

Re: [PATCH] RISC-V: Note that __builtin_riscv_pause() implies Xgnuzihintpausestate

2022-11-18 Thread Palmer Dabbelt
On Thu, 17 Nov 2022 22:59:08 PST (-0800), Kito Cheng wrote: Wait, what's Xgnuzihintpausestate??? I just made it up, it's defined right next to the name like those profile extensions are. I figured that's the most RISC-V way to define something like this, but we could just drop it and run

RE: [PATCH 15/35] arm: Explicitly specify other float types for _Generic overloading [PR107515]

2022-11-18 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Andrea Corallo > Sent: Thursday, November 17, 2022 4:38 PM > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov ; Richard Earnshaw > ; Stam Markianos-Wright wri...@arm.com> > Subject: [PATCH 15/35] arm: Explicitly specify other float types for _Generic >

Re: [PATCH] c++, v4: Implement C++23 P2647R1 - Permitting static constexpr variables in constexpr functions

2022-11-18 Thread Jason Merrill via Gcc-patches
On 11/18/22 11:34, Jakub Jelinek wrote: On Fri, Nov 18, 2022 at 11:24:45AM -0500, Jason Merrill wrote: Right, that's the C++17 implicit constexpr for lambdas, finish_function: /* Lambda closure members are implicitly constexpr if possible. */ if (cxx_dialect >= cxx17 &&

RE: [PATCH 13/35] arm: further fix overloading of MVE vaddq[_m]_n intrinsic

2022-11-18 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Andrea Corallo > Sent: Thursday, November 17, 2022 4:38 PM > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov ; Richard Earnshaw > ; Stam Markianos-Wright wri...@arm.com> > Subject: [PATCH 13/35] arm: further fix overloading of MVE vaddq[_m]_n > intrinsic

RE: [PATCH 10/35] arm: improve tests for vabavq*

2022-11-18 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Andrea Corallo > Sent: Thursday, November 17, 2022 4:38 PM > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov ; Richard Earnshaw > ; Andrea Corallo > Subject: [PATCH 10/35] arm: improve tests for vabavq* > > gcc/testsuite/ChangeLog: > > *

RE: [PATCH 12/35] arm: improve tests and fix vabsq*

2022-11-18 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Andrea Corallo > Sent: Thursday, November 17, 2022 4:38 PM > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov ; Richard Earnshaw > ; Andrea Corallo > Subject: [PATCH 12/35] arm: improve tests and fix vabsq* > > gcc/ChangeLog: > > *

RE: [PATCH 11/35] arm: improve tests for vabdq*

2022-11-18 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Andrea Corallo > Sent: Thursday, November 17, 2022 4:38 PM > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov ; Richard Earnshaw > ; Andrea Corallo > Subject: [PATCH 11/35] arm: improve tests for vabdq* > > gcc/testsuite/ChangeLog: > > *

  1   2   3   >