Re: [PATCH v6] LoongArch: Fixed a compilation failure with '%c' in inline assembly [PR107731].

2023-01-19 Thread chenglulu
在 2023/1/18 下午5:14, Richard Sandiford 写道: Lulu Cheng writes: Co-authored-by: Yang Yujie gcc/ChangeLog: * config/loongarch/loongarch.cc (loongarch_classify_address): Add precessint for CONST_INT. (loongarch_print_operand_reloc): Operand modifier 'c' is supported.

Re: git out-of-order commit (was Re: [PATCH] Fortran: Remove unused declaration)

2023-01-19 Thread Bernhard Reutner-Fischer via Gcc-patches
On 19 January 2023 20:39:08 CET, Jason Merrill wrote: >On Sat, Nov 12, 2022 at 4:24 PM Harald Anlauf via Gcc-patches > wrote: >> >> Am 12.11.22 um 22:05 schrieb Bernhard Reutner-Fischer via Gcc-patches: >> > This function definition was removed years ago, remove it's prototype. >> > >> > gcc/fortr

[PATCH] RISC-V: Add vlse/vsse C/C++ API intrinsics support

2023-01-19 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/predicates.md (pmode_reg_or_0_operand): New predicate. * config/riscv/riscv-vector-builtins-bases.cc (class loadstore): Add vlse/vsse intrinsic support. (BASE): Ditto. * config/riscv/riscv-vector-builtins-bases.h:

[PATCH] xtensa: Revise 89afb2e86fcb29c559b2957fdcbea0d01740c49b

2023-01-19 Thread Takayuki 'January June' Suwa via Gcc-patches
In the previously posted patch "xtensa: Make complex hard register clobber elimination more robust and accurate", the check code for insns that refer to the [DS]Cmode hard register before it is overwritten after it is clobbered is incomplete. Fortunately such insns are seldom emitted, so it didn'

[PATCH] RISC-V: Add vle/vse C++ overloaded API intrinsic testcases

2023-01-19 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/testsuite/ChangeLog: * g++.target/riscv/rvv/base/vle-1.C: New test. * g++.target/riscv/rvv/base/vle_tu-1.C: New test. * g++.target/riscv/rvv/base/vle_tum-1.C: New test. * g++.target/riscv/rvv/base/vle_tumu-1.C: New test. * g++.target

[PATCH] RISC-V: Fix vop_m overloaded C++ API name.

2023-01-19 Thread juzhe . zhong
From: Ju-Zhe Zhong According to https://github.com/riscv-non-isa/rvv-intrinsic-doc/tree/master/ For "vop_m" intrinsics, C++ overloaded API does not have "_m" suffix. gcc/ChangeLog: * config/riscv/riscv-vector-builtins-shapes.cc (struct loadstore_def): Remove _m suffix for "vop_m" C++ o

[PATCH] c++: Quash bogus -Wunused-value with new [PR107797]

2023-01-19 Thread Marek Polacek via Gcc-patches
We shouldn't emit "right operand of comma operator has no effect" when that comma operator was created by the compiler for "new int{}". convert_to_void/COMPOUND_EXPR already checks warning_suppressed_p so we can just suppress -Wunused-value. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for tr

[PATCH v3] c++: -Wdangling-reference with reference wrapper [PR107532]

2023-01-19 Thread Marek Polacek via Gcc-patches
On Thu, Jan 19, 2023 at 01:02:02PM -0500, Jason Merrill wrote: > On 1/18/23 20:13, Marek Polacek wrote: > > On Wed, Jan 18, 2023 at 04:07:59PM -0500, Jason Merrill wrote: > > > On 1/18/23 12:52, Marek Polacek wrote: > > > > Here, -Wdangling-reference triggers where it probably shouldn't, causing >

Re: [PATCH] c++: Fix up handling of references to anon union members in initializers [PR53932]

2023-01-19 Thread Andrew Pinski via Gcc-patches
On Thu, Jan 19, 2023 at 12:13 PM Jakub Jelinek via Gcc-patches wrote: > > Hi! > > For anonymous union members we create artificial VAR_DECLs which > have DECL_VALUE_EXPR for the actual COMPONENT_REF. That works > just fine inside of functions (including global dynamic constructors), > because dur

Re: [PATCH] value-relation: Fix up relation_union [PR108447]

2023-01-19 Thread Andrew MacLeod via Gcc-patches
On 1/19/23 15:16, Jakub Jelinek wrote: Hi! While looking at the PR, I've noticed one row in rr_union_table is wrong. relation_union should be commutative, but due to that bug is not. The following patch adds a self-test for that property (fails without the first hunk) and fixes that line. B

Re: [PATCH] tree-optimization/104475 - bogus -Wstringop-overflow

2023-01-19 Thread Jason Merrill via Gcc-patches
On 1/18/23 03:06, Richard Biener wrote: On Tue, 17 Jan 2023, Jason Merrill wrote: On 12/7/22 06:25, Richard Biener wrote: The following avoids a bogus -Wstringop-overflow diagnostic by properly recognizing that &d->m_mutex cannot be nullptr in C++ even if m_mutex is at offset zero. The fronte

Re: [PATCH] c++: Fix up handling of references to anon union members in initializers [PR53932]

2023-01-19 Thread Jason Merrill via Gcc-patches
On 1/19/23 15:13, Jakub Jelinek wrote: Hi! For anonymous union members we create artificial VAR_DECLs which have DECL_VALUE_EXPR for the actual COMPONENT_REF. That works just fine inside of functions (including global dynamic constructors), because during gimplification such VAR_DECLs are gimpl

Re: git out-of-order commit (was Re: [PATCH] Fortran: Remove unused declaration)

2023-01-19 Thread Harald Anlauf via Gcc-patches
Am 19.01.23 um 20:39 schrieb Jason Merrill via Gcc-patches: On Sat, Nov 12, 2022 at 4:24 PM Harald Anlauf via Gcc-patches wrote: Am 12.11.22 um 22:05 schrieb Bernhard Reutner-Fischer via Gcc-patches: This function definition was removed years ago, remove it's prototype. gcc/fortran/ChangeLog

[PATCH] value-relation: Fix up relation_union [PR108447]

2023-01-19 Thread Jakub Jelinek via Gcc-patches
Hi! While looking at the PR, I've noticed one row in rr_union_table is wrong. relation_union should be commutative, but due to that bug is not. The following patch adds a self-test for that property (fails without the first hunk) and fixes that line. Bootstrapped/regtested on x86_64-linux and i

[PATCH] c++: Fix up handling of references to anon union members in initializers [PR53932]

2023-01-19 Thread Jakub Jelinek via Gcc-patches
Hi! For anonymous union members we create artificial VAR_DECLs which have DECL_VALUE_EXPR for the actual COMPONENT_REF. That works just fine inside of functions (including global dynamic constructors), because during gimplification such VAR_DECLs are gimplified as their DECL_VALUE_EXPR. This is

[PATCH] niter: Fix up unused var warning [PR108457]

2023-01-19 Thread Jakub Jelinek via Gcc-patches
Hi! tree-ssa-loop-niter.cc (build_cltz_expr) gets unused variable mode warning on some architectures where C[LT]Z_DEFINED_VALUE_AT_ZERO macro(s) don't use the first argument (which includes the defaults.h definitions of: #define CLZ_DEFINED_VALUE_AT_ZERO(MODE, VALUE) 0 #define CTZ_DEFINED_VALUE_A

[committed] openmp: Fix up OpenMP expansion of non-rectangular loops [PR108459]

2023-01-19 Thread Jakub Jelinek via Gcc-patches
Hi! expand_omp_for_init_counts was using for the case where collapse(2) inner loop has init expression dependent on non-constant multiple of the outer iterator and the condition upper bound expression doesn't depend on the outer iterator fold_unary (NEGATE_EXPR, ...). This will just return NULL i

git out-of-order commit (was Re: [PATCH] Fortran: Remove unused declaration)

2023-01-19 Thread Jason Merrill via Gcc-patches
On Sat, Nov 12, 2022 at 4:24 PM Harald Anlauf via Gcc-patches wrote: > > Am 12.11.22 um 22:05 schrieb Bernhard Reutner-Fischer via Gcc-patches: > > This function definition was removed years ago, remove it's prototype. > > > > gcc/fortran/ChangeLog: > > > > * gfortran.h (gfc_check_include):

[committed] analyzer: use dominator info in -Wanalyzer-deref-before-check [PR108455]

2023-01-19 Thread David Malcolm via Gcc-patches
My integration testing [1] of -fanalyzer in GCC 13 is showing a lot of diagnostics from the new -Wanalyzer-deref-before-check warning on real-world C projects, and most of these seem to be false positives. This patch updates the warning to make it much less likely to fire: - only intraprocedural c

Re: [PATCH] c++: Fix up handling of non-dependent subscript with static operator[] [PR108437]

2023-01-19 Thread Jason Merrill via Gcc-patches
On 1/19/23 03:52, Jakub Jelinek wrote: Hi! As the following testcases shows, when adding static operator[] support I've missed that the 2 build_min_non_dep_op_overload functions need to be adjusted. The first one we only use for the single index case, but as cp_tree_code_length (ARRAY_REF) is 2

Re: [PATCH v2] c++: -Wdangling-reference with reference wrapper [PR107532]

2023-01-19 Thread Jason Merrill via Gcc-patches
On 1/18/23 20:13, Marek Polacek wrote: On Wed, Jan 18, 2023 at 04:07:59PM -0500, Jason Merrill wrote: On 1/18/23 12:52, Marek Polacek wrote: Here, -Wdangling-reference triggers where it probably shouldn't, causing some grief. The code in question uses a reference wrapper with a member function

Re: [PATCH] IPA: do not release body if still needed

2023-01-19 Thread Martin Jambor
Hi, On Wed, Jan 18 2023, Jan Hubicka wrote: >> The code removing function bodies when the last call graph clone of a >> node is removed is too aggressive when there are nodes up the >> clone_of chain which still need them. Fixed by expanding the check. >> >> gcc/ChangeLog: >> >> 2023-01-18 Mar

[PATCH] PR target/107299: Fix build issue when long double is IEEE 128-bit

2023-01-19 Thread Michael Meissner via Gcc-patches
This patch updates the IEEE 128-bit types used in libgcc. At the moment, we cannot build GCC when the target uses IEEE 128-bit long doubles, such as building the compiler for a native Fedora 36 system. The build dies when it is trying to build the _mulkc3.c and _divkc3 modules. This patch change

Re: [PATCH] modula-2, testsuite: Make libs and interfaces consistent.

2023-01-19 Thread Gaius Mulley via Gcc-patches
Iain Sandoe writes: > Tested on x86_64-linux-gnu (with a 32b multilib), powerpc, i686 and > x86_64-darwin. OK for trunk? > thanks, > Iain LGTM, thank you regards, Gaius

[committed] wwwdocs: gcc-4.9: Adjust www.open-std.org links to https

2023-01-19 Thread Gerald Pfeifer
Pushed. Gerald --- htdocs/gcc-4.9/changes.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/gcc-4.9/changes.html b/htdocs/gcc-4.9/changes.html index 274bd814..9090c0ea 100644 --- a/htdocs/gcc-4.9/changes.html +++ b/htdocs/gcc-4.9/changes.html @@ -222,7 +222,7 @@

[committed] style: Tweak a comment

2023-01-19 Thread Gerald Pfeifer
Pushed. Gerald --- htdocs/style.mhtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/style.mhtml b/htdocs/style.mhtml index 8afaa1e1..1b778151 100644 --- a/htdocs/style.mhtml +++ b/htdocs/style.mhtml @@ -9,7 +9,7 @@ > -;;; Redefine the tag so that we can add de

[Patch] OpenMP/Fortran: Partially fix non-rect loop nests [PR107424]

2023-01-19 Thread Tobias Burnus
This is all about non-rectangular loop nests in OpenMP. The attached patch depends on the obvious fix for https://gcc.gnu.org/PR108459, which is together with a nice testcase in Jakub's WIP patch attached to the PR; without, gfortran.dg/gomp/canonical-loop-1.f90 fails with an ICE (segfault). My

[PATCH] RISC-V: Add vse.v C API intrinsics testcases

2023-01-19 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/vse-1.c: New test. * gcc.target/riscv/rvv/base/vse-2.c: New test. * gcc.target/riscv/rvv/base/vse-3.c: New test. * gcc.target/riscv/rvv/base/vse_m-1.c: New test. * gcc.target/riscv/rvv

Re: [PATCH 1/2] aarch64: fix ICE in aarch64_layout_arg [PR108411]

2023-01-19 Thread Christophe Lyon via Gcc-patches
On 1/19/23 10:22, Richard Sandiford wrote: Christophe Lyon writes: The previous patch added an assert which should not be applied to PST types (Pure Scalable Types) because alignment does not matter in this case. This patch moves the assert after the PST case is handled to avoid the ICE.

Re: [PATCH] modula2/108144 - fix --enable-version-specific-runtime-libs

2023-01-19 Thread Gaius Mulley via Gcc-patches
Richard Biener writes: > The following fixes --enable-version-specific-runtime-libs for > the modula2 target libraries. The issue is that the install > happens via for example > > toolexeclib_LTLIBRARIES = libm2cor.la > > and toolexeclibdir is set to $(toolexecdir)/$(gcc_version)$(MULTISUBDIR) >

Re: [PATCH 1/2] gcc/file-prefix-map: Allow remapping of relative paths

2023-01-19 Thread Jakub Jelinek via Gcc-patches
On Tue, Nov 01, 2022 at 01:46:20PM -0600, Jeff Law via Gcc-patches wrote: > > On 8/17/22 06:15, Richard Purdie via Gcc-patches wrote: > > Relative paths currently aren't remapped by -ffile-prefix-map and friends. > > When cross compiling with separate 'source' and 'build' directories, the > > sam

Re: [PATCH] wwwdocs: Announce Solaris 11.3 obsoletion

2023-01-19 Thread Rainer Orth
Hi Gerald, >> Btw., I noticed the -gz=zstd addition is listed under Caveats. I don't >> think this belongs here and probably only landed due to the -gz=zlib-gnu >> removal above. > > Agreed. Can you address this on the way? sure: done like so: gcc-13: Move -gz=zstd to General Improvemen

Re: [aarch64] Use wzr/xzr for assigning vector element to 0

2023-01-19 Thread Prathamesh Kulkarni via Gcc-patches
On Wed, 18 Jan 2023 at 19:59, Richard Sandiford wrote: > > Prathamesh Kulkarni writes: > > On Tue, 17 Jan 2023 at 18:29, Richard Sandiford > > wrote: > >> > >> Prathamesh Kulkarni writes: > >> > Hi Richard, > >> > For the following (contrived) test: > >> > > >> > void foo(int32x4_t v) > >> > {

Re: [RFC] Introduce -finline-memset-loops

2023-01-19 Thread Richard Biener via Gcc-patches
On Thu, Jan 19, 2023 at 12:25 PM Alexandre Oliva wrote: > > On Jan 16, 2023, Richard Biener wrote: > > > On Sat, Jan 14, 2023 at 2:55 AM Alexandre Oliva wrote: > >> Target-specific code is great for tight optimizations, but the main > >> purpose of this feature is not an optimization. AFAICT it

Re: [RFC] Introduce -finline-memset-loops

2023-01-19 Thread Alexandre Oliva via Gcc-patches
On Jan 16, 2023, Richard Biener wrote: > On Sat, Jan 14, 2023 at 2:55 AM Alexandre Oliva wrote: >> Target-specific code is great for tight optimizations, but the main >> purpose of this feature is not an optimization. AFAICT it actually >> slows things down in general (due to code growth, and t

[PATCH] modula2/108144 - fix --enable-version-specific-runtime-libs

2023-01-19 Thread Richard Biener via Gcc-patches
The following fixes --enable-version-specific-runtime-libs for the modula2 target libraries. The issue is that the install happens via for example toolexeclib_LTLIBRARIES = libm2cor.la and toolexeclibdir is set to $(toolexecdir)/$(gcc_version)$(MULTISUBDIR) but the Makefile.am do not define $(gc

Re: [PATCH] wwwdocs: Announce Solaris 11.3 obsoletion

2023-01-19 Thread Gerald Pfeifer
On Wed, 18 Jan 2023, Rainer Orth wrote: > Here's the changes.html patch corresponding to the Solaris 11.3 > obsoletion notice in > > https://gcc.gnu.org/pipermail/gcc/2022-December/240322.html > https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608384.html > > Since this is the

Re: [PATCH 1/2] select .rodata for const volatile variables.

2023-01-19 Thread Cupertino Miranda via Gcc-patches
Hi Jeff, Kindly calling your attention to this thread. Regards, Cupertino Cupertino Miranda via Gcc-patches writes: > Richard Biener writes: > >> On Mon, Dec 5, 2022 at 7:07 PM Jeff Law via Gcc-patches >> wrote: >>> >>> >>> >>> On 12/2/22 10:52, Cupertino Miranda via Gcc-patches wrote: >>> >

[PATCH] tree-optimization/108449 - keep maybe_special_function_p behavior

2023-01-19 Thread Richard Biener via Gcc-patches
When we have a static declaration without definition we diagnose that and turn it into an extern declaration. That can alter the outcome of maybe_special_function_p here and there's really no point in doing that, so don't. Bootstrapped and tested on x86_64-unknown-linux-gnu, OK? Thanks, Richard.

Re: [PATCH 5/8 v2] middle-end: Add cltz_complement idiom recognition

2023-01-19 Thread Richard Biener via Gcc-patches
On Thu, Jan 19, 2023 at 10:19 AM Jan-Benedict Glaw wrote: > > On Thu, 2022-12-22 17:42:16 +, Andrew Carlotti via Gcc-patches > wrote: > > New patch below, bootstrapped and regression tested on > > aarch64-unknown-linux-gnu and x86_64-pc-linux-gnu - ok to merge? > > > diff --git a/gcc/tree-ss

Re: [PATCH] forwprop: Further fixes for simplify_rotate [PR108440]

2023-01-19 Thread Aldy Hernandez via Gcc-patches
On 1/19/23 09:41, Jakub Jelinek wrote: + range_query *q = get_range_query (cfun); + if (q == get_global_range_query ()) + q = enable_ranger (cfun); Oh, neat. Clever. I hadn't thought about that. + if (!q->range_of_expr (r, rotcnt, check_range_stmt)) +

[committed] wwwdocs: gitwrite: Structure a section some more

2023-01-19 Thread Gerald Pfeifer
On the way properly mark up a command-line option. Pushed. (The diff locks quite bigger than it actually is.) Gerald --- htdocs/gitwrite.html | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/htdocs/gitwrite.html b/htdocs/gitwrite.html index e4dadb27..1ffda77a 100

[committed] wwwdocs: gcc-3.3: Adjust www.open-std.org links to https

2023-01-19 Thread Gerald Pfeifer
Pushed. Gerald --- htdocs/gcc-3.3/changes.html | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/gcc-3.3/changes.html b/htdocs/gcc-3.3/changes.html index 93d96e65..da4165f3 100644 --- a/htdocs/gcc-3.3/changes.html +++ b/htdocs/gcc-3.3/changes.html @@ -560,7

Re: [Patch] Resolve bugzilla #108150 and #108192 for mingw

2023-01-19 Thread Jonathan Yong via Gcc-patches
On 1/11/23 09:56, Jonathan Yong wrote: Are the patches and changelogs OK? Ping1.

Re: [PATCH 2/2] aarch64: add -fno-stack-protector to some tests [PR108411]

2023-01-19 Thread Richard Sandiford via Gcc-patches
Christophe Lyon writes: > As discussed in the PR, these recently added tests fail when the > testsuite is executed with -fstack-protector-strong. To avoid this, > this patch adds -fno-stack-protector to dg-options. > > PR target/108411 > gcc/testsuite > * g++.target/aarch64/bitf

Re: [PATCH 1/2] aarch64: fix ICE in aarch64_layout_arg [PR108411]

2023-01-19 Thread Richard Sandiford via Gcc-patches
Christophe Lyon writes: > The previous patch added an assert which should not be applied to PST > types (Pure Scalable Types) because alignment does not matter in this > case. This patch moves the assert after the PST case is handled to > avoid the ICE. > > PR target/108411 > gcc/ >

Re: [PATCH 5/8 v2] middle-end: Add cltz_complement idiom recognition

2023-01-19 Thread Jan-Benedict Glaw
On Thu, 2022-12-22 17:42:16 +, Andrew Carlotti via Gcc-patches wrote: > New patch below, bootstrapped and regression tested on > aarch64-unknown-linux-gnu and x86_64-pc-linux-gnu - ok to merge? > diff --git a/gcc/tree-ssa-loop-niter.cc b/gcc/tree-ssa-loop-niter.cc > index > fece876099c16875

[PATCH] c++: Fix up handling of non-dependent subscript with static operator[] [PR108437]

2023-01-19 Thread Jakub Jelinek via Gcc-patches
Hi! As the following testcases shows, when adding static operator[] support I've missed that the 2 build_min_non_dep_op_overload functions need to be adjusted. The first one we only use for the single index case, but as cp_tree_code_length (ARRAY_REF) is 2, we were running into an assertion there

Re: [PATCH] forwprop: Further fixes for simplify_rotate [PR108440]

2023-01-19 Thread Richard Biener via Gcc-patches
On Thu, 19 Jan 2023, Jakub Jelinek wrote: > Hi! > > As mentioned in the simplify_rotate comment, for e.g. >((T) ((T2) X << (Y & (B - 1 | ((T) ((T2) X >> ((-Y) & (B - 1 > we already emit >X r<< (Y & (B - 1)) > as replacement. This PR is about the >((T) ((T2) X << Y)) OP ((T) (

[PATCH] forwprop: Further fixes for simplify_rotate [PR108440]

2023-01-19 Thread Jakub Jelinek via Gcc-patches
Hi! As mentioned in the simplify_rotate comment, for e.g. ((T) ((T2) X << (Y & (B - 1 | ((T) ((T2) X >> ((-Y) & (B - 1 we already emit X r<< (Y & (B - 1)) as replacement. This PR is about the ((T) ((T2) X << Y)) OP ((T) ((T2) X >> (B - Y))) ((T) ((T2) X << (int) Y)) OP ((T) ((