[RFC] Support for nonzero attribute

2022-06-05 Thread Miika via Gcc
Based on Jakub's and Yair's comments I created a new attribute "inrange". Inrage takes three arguments, pos min and max. Pos being the argument position in the function, and min and max defines the range of valid integer. Both min and max are inclusive and work with enums. Warnings are enabled

Connecting From LinkedIn

2022-06-05 Thread Jacco Minnaar via Gcc
-- Hello from LinkedIn, Is your email still active?

gcc-13-20220605 is now available

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

[Bug c/105853] New: ice in pieces_addr constructor

2022-06-05 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105853 Bug ID: 105853 Summary: ice in pieces_addr constructor Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c

[Bug middle-end/105853] [13 regression] ice in pieces_addr constructor

2022-06-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105853 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |13.0 Version|12.0

Re: [1/2] PR96463 - aarch64 specific changes

2022-06-05 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 1 Jun 2022 at 14:12, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Thu, 12 May 2022 at 16:15, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> > On Wed, 11 May 2022 at 12:44, Richard Sandiford > >> > wrote: > >> >> > >> >> Prathamesh Kulkarni

[Bug c++/105851] Error: "Duplicate key positions selected" when recreating cfns.h

2022-06-05 Thread schwab--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105851 Andreas Schwab changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|---

[Bug libstdc++/80331] unused const std::string not optimized away

2022-06-05 Thread glisse at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80331 --- Comment #10 from Marc Glisse --- (In reply to AK from comment #9) > can't repro this with gcc 12.1 Seems like this is fixed? No. As stated in other comments, it still reproduces with a longer string (or with -D_GLIBCXX_USE_CXX11_ABI=0).

[Bug tree-optimization/105855] missed optimization - vectorization -fsanitize=signed-integer-overflow

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

[Bug target/105856] ice in emit_move_insn, at expr.cc:4011

2022-06-05 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105856 --- Comment #1 from David Binderman --- The bug first appears sometime after git hash de57440858591a88.

[Bug libstdc++/105857] codecvt::do_length causes unexpected buffer overflow

2022-06-05 Thread andysem at mail dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105857 --- Comment #2 from andysem at mail dot ru --- > outside the [s, s + max_size) range This should be [from, from_to) range. Sorry, posted a little too soon.

[x86 PATCH] Double word implementation of and; cmp to not; test optimization.

2022-06-05 Thread Roger Sayle
This patch extends the recent and;cmp to not;test optimization to also perform this transformation for TImode on TARGET_64BIT and DImode on -m32, One motivation for this is that it's a step to fixing the current failure of gcc.target/i386/pr65105-5.c on -m32. A more direct benefit for x86_64 is

[Bug tree-optimization/105855] missed optimization - vectorization -fsanitize=signed-integer-overflow

2022-06-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105855 Andrew Pinski changed: What|Removed |Added Keywords||missed-optimization --- Comment #1

[Bug target/105856] New: ice in emit_move_insn, at expr.cc:4011

2022-06-05 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105856 Bug ID: 105856 Summary: ice in emit_move_insn, at expr.cc:4011 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target

RE: [x86 PATCH] PR target/91681: zero_extendditi2 pattern for more optimizations.

2022-06-05 Thread Roger Sayle
Hi Uros, Many thanks for your speedy review. This revised patch implements all three of your recommended improvements; the use of ix86_binary_operator_ok with code UNKNOWN, the removal of "n" constraints from const_int_operand predicates, and the use of force_reg (for input operands, and REG_P

[Bug target/105506] Error building GCC 12.1.0 against MinGW-w64: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory

2022-06-05 Thread brechtsanders at users dot sourceforge.net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105506 --- Comment #5 from Brecht Sanders --- Created attachment 53088 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53088=edit Process Monitor when running `gcc -print-prog-name=cc1` Process Monitor when running `gcc -print-prog-name=cc1`

[Bug middle-end/105853] [13 regression] ice in pieces_addr constructor

2022-06-05 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105853 --- Comment #1 from David Binderman --- Reduced C code seems to be: struct { struct { short e16[3]; } } const eth_addr_zero = {{}}; void compose_nd_na_ipv6_src() { packet_set_nd(eth_addr_zero); } Note no -march= setting is required.

[Bug target/105854] New: ICE: in extract_constrain_insn, at recog.cc:2692 (insn does not satisfy its constraints: sse2_lshrv1ti3)

2022-06-05 Thread zsojka at seznam dot cz via Gcc-bugs
-992-20220605001627-gad6919374be-checking-yes-rtl-df-extra-nobootstrap-amd64 Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 13.0.0 20220605 (experimental) (GCC)

[C++ PATCH take #2] PR c++/96442: Improved error recovery in enumerations.

2022-06-05 Thread Roger Sayle
Hi Jason, My apologies for the long delay, but I've finally got around to implementing your suggested improvements (implied by your review): https://gcc.gnu.org/pipermail/gcc-patches/2022-March/591504.html of my patch for PR c++/96442:

[PATCH take #2] Fold truncations of left shifts in match.pd

2022-06-05 Thread Roger Sayle
Hi Richard, Many thanks for taking the time to explain how vectorization is supposed to work. I now see that vect_recog_rotate_pattern in tree-vect-patterns.cc is supposed to handle lowering of rotations to (vector) shifts, and completely agree that adding support for signed types (using

[PATCH] PR tree-optimization/105835: Two narrowing patterns for match.pd.

2022-06-05 Thread Roger Sayle
This patch resolves PR tree-optimization/105835, which is a code quality (dead code elimination) regression at -O1 triggered/exposed by a recent change to canonicalize X&-Y as X*Y. The new (shorter) form exposes some missed optimization opportunities that can be handled by adding some extra

[Bug target/105506] Error building GCC 12.1.0 against MinGW-w64: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory

2022-06-05 Thread brechtsanders at users dot sourceforge.net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105506 --- Comment #4 from Brecht Sanders --- I just ran `gcc -print-prog-name=cc1` and saw the output was only `cc1` while on working versions it reports a full path to `cc1.exe` (e.g.

[Bug tree-optimization/105855] New: missed optimization - vectorization -fsanitize=signed-integer-overflow

2022-06-05 Thread muecker at gwdg dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105855 Bug ID: 105855 Summary: missed optimization - vectorization -fsanitize=signed-integer-overflow Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal

[Bug libstdc++/105857] New: codecvt::do_length causes unexpected buffer overflow

2022-06-05 Thread andysem at mail dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105857 Bug ID: 105857 Summary: codecvt::do_length causes unexpected buffer overflow Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3

[Bug c++/105852] [13 Regression] ice in instantiate_decl

2022-06-05 Thread dcb314 at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105852 --- Comment #1 from David Binderman --- Reduced C++ code seems to be: template struct Local { friend Local False(int *); }; Local source_map_url; Local False(int *); void New() { False; } Local False(int *) {}

[Bug c++/105851] Error: "Duplicate key positions selected" when recreating cfns.h

2022-06-05 Thread qcorba at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105851 --- Comment #4 from Eric Tang --- (In reply to Andreas Schwab from comment #3) > $$ is makefile quoting, you need to resolve the quoting manually if you want > to run the command outside of make. Is there a means to check that? I removed

[Bug libstdc++/105857] codecvt::do_length causes unexpected buffer overflow

2022-06-05 Thread andysem at mail dot ru via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105857 --- Comment #1 from andysem at mail dot ru --- Created attachment 53089 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53089=edit Test case to reproduce the problem.

Re: [PING] PR middle-end/95126: Expand small const structs as immediate constants

2022-06-05 Thread Andreas Schwab
This breaks Ada on aarch64 in stage3, probably a miscompiled stage2 compiler. For example: /opt/gcc/gcc-20220605/Build/./prev-gcc/xgcc -B/opt/gcc/gcc-20220605/Build/./prev-gcc/ -B/usr/aarch64-suse-linux/bin/ -B/usr/aarch64-suse-linux/bin/ -B/usr/aarch64-suse-linux/lib/ -isystem /usr/aarch64

[Bug tree-optimization/105835] Dead Code Elimination Regression at -O1 (trunk vs. 12.1.0)

2022-06-05 Thread roger at nextmovesoftware dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105835 Roger Sayle changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned

Re: [x86 PATCH] Double word implementation of and; cmp to not; test optimization.

2022-06-05 Thread Uros Bizjak via Gcc-patches
On Sun, Jun 5, 2022 at 7:19 PM Roger Sayle wrote: > > > This patch extends the recent and;cmp to not;test optimization to also > perform this transformation for TImode on TARGET_64BIT and DImode on -m32, > One motivation for this is that it's a step to fixing the current failure > of

[Bug c++/105859] ICE in instantiate_decl

2022-06-05 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105859 --- Comment #3 from Sam James --- Ah, it's probably a dupe of bug 105852.

[Bug target/105856] [13 Regression] ice in emit_move_insn, at expr.cc:4011

2022-06-05 Thread roger at nextmovesoftware dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105856 Roger Sayle changed: What|Removed |Added Summary|ice in emit_move_insn, at |[13 Regression] ice in

[PATCH]: libgompd add parallel handle functions

2022-06-05 Thread Mohamed Sayed via Gcc-patches
This patch adds parallel region handles specified in section 5.5.3. >From examining libgomp code, I found that struct gomp_team describes the parallel region. The Thread handle gives the address of gomp_thread so, I tried to access *team gomp_thread->ts->team. The parallel handle is the team

Re: [PATCH] Update {skylake,icelake,alderlake}_cost to add a bit preference to vector store.

2022-06-05 Thread Hongtao Liu via Gcc-patches
On Wed, Jun 1, 2022 at 11:56 PM H.J. Lu via Gcc-patches wrote: > > On Tue, May 31, 2022 at 10:06 PM Cui,Lili wrote: > > > > This patch is to update {skylake,icelake,alderlake}_cost to add a bit > > preference to vector store. > > Since the interger vector construction cost has changed, we need

[Bug c/105858] New: MinGW-w64 64-bit build with --libstdcxx-pch: fatal error: cannot write PCH file: required memory segment unavailable

2022-06-05 Thread brechtsanders at users dot sourceforge.net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105858 Bug ID: 105858 Summary: MinGW-w64 64-bit build with --libstdcxx-pch: fatal error: cannot write PCH file: required memory segment unavailable Product: gcc

[Bug c++/105859] ICE in instantiate_decl

2022-06-05 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105859 --- Comment #2 from Sam James --- Created attachment 53091 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53091=edit vector.ii.orig.xz

Re: [PING] PR middle-end/95126: Expand small const structs as immediate constants

2022-06-05 Thread Rainer Orth
Andreas Schwab writes: > This breaks Ada on aarch64 in stage3, probably a miscompiled stage2 > compiler. For example: > > /opt/gcc/gcc-20220605/Build/./prev-gcc/xgcc > -B/opt/gcc/gcc-20220605/Build/./prev-gcc/ -B/usr/aarch64-suse-linux/bin/ > -B/usr/aarch64-suse-linux/bin/ -

[Bug c++/105852] [13 Regression] ice in instantiate_decl

2022-06-05 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105852 --- Comment #3 from Sam James --- Thanks for reporting, beat me to it. Looks like it's same on latest 11 (11.3.1 20220602) and 12 (12.1.1 20220604) snapshots.

[Bug c++/105852] [13 Regression] ice in instantiate_decl

2022-06-05 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105852 --- Comment #2 from Sam James --- *** Bug 105859 has been marked as a duplicate of this bug. ***

[Bug c++/105859] ICE in instantiate_decl

2022-06-05 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105859 Sam James changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

Re: [x86 PATCH] Recognize vpcmov in combine with -mxop.

2022-06-05 Thread Uros Bizjak via Gcc-patches
On Sat, Jun 4, 2022 at 1:03 PM Roger Sayle wrote: > > > By way of an apology for causing PR target/105791, where I'd overlooked > the need to support V1TImode in TARGET_XOP's vpcmov instruction, this > patch further improves support for TARGET_XOP's vpcmov instruction, by > recognizing it in

Re: [PATCH] x86: harmonize __builtin_ia32_psadbw*() types

2022-06-05 Thread Uros Bizjak via Gcc-patches
On Thu, Jun 2, 2022 at 5:04 PM Jan Beulich wrote: > > The 64-bit, 128-bit, and 512-bit variants have VDI return type, in > line with instruction behavior. Make the 256-bit builtin match, thus > also making it match the insn it expands to (using VI8_AVX2_AVX512BW). > > gcc/ > > *

[PATCH-1, rs6000] Replace shift and ior insns with one rotate and mask insn for bswap pattern [PR93453]

2022-06-05 Thread HAO CHEN GUI via Gcc-patches
Hi, This patch replaces shift and ior insns with one rotate and mask insn for the split patterns which are for DI byte swap on Power6 and before. The test cases shows the optimization. Bootstrapped and tested on ppc64 Linux BE and LE with no regressions. Is this okay for trunk? Any

Re: [x86 PATCH] PR target/91681: zero_extendditi2 pattern for more optimizations.

2022-06-05 Thread Uros Bizjak via Gcc-patches
On Sun, Jun 5, 2022 at 1:48 PM Roger Sayle wrote: > > > Hi Uros, > Many thanks for your speedy review. This revised patch implements > all three of your recommended improvements; the use of > ix86_binary_operator_ok with code UNKNOWN, the removal of > "n" constraints from const_int_operand

[Bug c++/105859] New: ICE in instantiate_decl

2022-06-05 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105859 Bug ID: 105859 Summary: ICE in instantiate_decl Product: gcc Version: 12.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++

[Bug target/105506] Error building GCC 12.1.0 against MinGW-w64: fatal error: cannot execute 'cc1': CreateProcess: No such file or directory

2022-06-05 Thread martin at martin dot st via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105506 Martin Storsjö changed: What|Removed |Added CC||martin at martin dot st --- Comment

Re: [PATCH] x86: harmonize __builtin_ia32_psadbw*() types

2022-06-05 Thread Hongtao Liu via Gcc-patches
On Mon, Jun 6, 2022 at 3:17 AM Uros Bizjak via Gcc-patches wrote: > > On Thu, Jun 2, 2022 at 5:04 PM Jan Beulich wrote: > > > > The 64-bit, 128-bit, and 512-bit variants have VDI return type, in > > line with instruction behavior. Make the 256-bit builtin match, thus > > also making it match the

[Bug middle-end/105853] [13 regression] ice in pieces_addr constructor

2022-06-05 Thread roger at nextmovesoftware dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105853 Roger Sayle changed: What|Removed |Added Last reconfirmed||2022-06-05 Priority|P3

[Bug c++/105859] ICE in instantiate_decl

2022-06-05 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105859 --- Comment #1 from Sam James --- Created attachment 53090 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53090=edit minimised.ii

[Bug target/105854] ICE: in extract_constrain_insn, at recog.cc:2692 (insn does not satisfy its constraints: sse2_lshrv1ti3)

2022-06-05 Thread crazylht at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105854 Hongtao.liu changed: What|Removed |Added CC||crazylht at gmail dot com --- Comment #1