Re: [PATCH] Fortran: Add IEEE_SIGNBIT and IEEE_FMA functions

2022-09-06 Thread Thomas Koenig via Gcc-patches
Hi FX, Maybe the ping is a bit early, as you know I’m not very active anymore, so I do not know what are the current policies. In particular, how much leeway do I have to commit the patch if there is no comment from another maintainer? I am fairly confident about the code, because I wrote the

Re: c: New C2x keywords

2022-09-06 Thread Richard Biener via Gcc-patches
> Am 07.09.2022 um 00:11 schrieb Joseph Myers : > > C2x follows C++ in making alignas, alignof, bool, false, > static_assert, thread_local and true keywords; implement this > accordingly. This implementation makes them normal keywords in C2x > mode just like any other keyword (C2x leaves open

Re: [PATCH] Using pli(paddi) and rotate to build 64bit constants

2022-09-06 Thread Jiufu Guo via Gcc-patches
"Kewen.Lin" writes: > Hi! > >> + >> + /* Use paddi for the low 32 bits. */ >> + if (ud2 != 0 && ud1 != 0 && can_use_paddi) >> +emit_move_insn (dest, gen_rtx_PLUS (DImode, dest, >> +GEN_INT ((ud2 << 16) | ud1))); >> + >> + /* Use

Re: [PATCH] Using pli(paddi) and rotate to build 64bit constants

2022-09-06 Thread Jiufu Guo via Gcc-patches
Segher Boessenkool writes: > Hi! > > On Tue, Sep 06, 2022 at 08:27:56PM +0800, Jiufu Guo wrote: >> + if (can_create_pseudo_p ()) >> +{ >> + /* pli A,H + pli B,L + rldimi A,B,32,0. */ > > A is the low one and B is the high one (the one that needs to be > shifted). rl[wd]imi is one

Re: [PATCH] c++: Implement C++23 P2266R1, Simpler implicit move [PR101165]

2022-09-06 Thread Jason Merrill via Gcc-patches
On 9/3/22 12:42, Marek Polacek wrote: This patch implements https://wg21.link/p2266, which, once again, changes the implicit move rules. Here's a brief summary of various changes in this area: r125211: Introduced moving from certain lvalues when returning them r171071: CWG 1148, enable move fro

[PATCH RFA] libstdc++: small dynamic_cast optimization

2022-09-06 Thread Jason Merrill via Gcc-patches
An email discussion of optimizing EH led me to wonder why we weren't doing this already. Not that this change affects EH at all. Tested x86_64-pc-linux-gnu. Does this seem worthwhile? libstdc++-v3/ChangeLog: * libsupc++/dyncast.cc (__dynamic_cast): Avoid virtual function call i

libgo patch committed: Ignore __morestack in runtime.Callers

2022-09-06 Thread Ian Lance Taylor via Gcc-patches
This libgo patch ignores the __morestack function in runtime.Callers. We were ignoring all functions starting with "__morestack_", but not the function "__morestack" itself. Without this change, some tests such as recover.go started failing recently, though I'm not sure exactly what changed. Boot

Re: [PATCH] libcpp, v3: Named universal character escapes and delimited escape sequence tweaks

2022-09-06 Thread Jason Merrill via Gcc-patches
On 9/3/22 06:54, Jakub Jelinek wrote: On Sat, Sep 03, 2022 at 12:29:52PM +0200, Jakub Jelinek wrote: On Thu, Sep 01, 2022 at 03:00:28PM -0400, Jason Merrill wrote: We might as well use the same flag name, and document it to mean what it currently means for GCC. Ok, following patch introduces

Re: [PATCH] Using pli(paddi) and rotate to build 64bit constants

2022-09-06 Thread Kewen.Lin via Gcc-patches
Hi! > + > + /* Use paddi for the low 32 bits. */ > + if (ud2 != 0 && ud1 != 0 && can_use_paddi) > + emit_move_insn (dest, gen_rtx_PLUS (DImode, dest, > + GEN_INT ((ud2 << 16) | ud1))); > + > + /* Use oris, ori for low 32 bits.

[PATCH] c: fix uninitialized c_expr::m_decimal [PR106830]

2022-09-06 Thread David Malcolm via Gcc-patches
I added c_expr::m_decimal in r13-2386-gbedfca647a9e9c1a as part of the implementation of -Wxor-used-as-pow, but I missed various places where the field needed to be initialized. Fixed thusly (based on searching for places that assign to the original_code field). Successfully bootstrapped & regrte

[PATCH 1/2] libstdc++: Optimize is_void and is_null_pointer

2022-09-06 Thread Patrick Palka via Gcc-patches
Instead of defining these in terms of a helper class template and the relatively expensive __remove_cv_t, just declare four explicit specializations of the main template, one for each choice of cv-quals. Tested on x86_64-pc-linux-gnu, does this look OK for trunk? The is_void change alone reduces m

[PATCH 2/2] libstdc++: Optimize is_reference

2022-09-06 Thread Patrick Palka via Gcc-patches
Instead of defining is_reference in terms of is_lvalue_reference and is_rvalue_reference, just define it directly. Tested on x86_64-pc-linux-gnu, does this look OK for trunk? This reduces memory usage of join.cc by 1%. libstdc++-v3/ChangeLog: * include/std/type_traits (is_reference): Mak

[GCC13][Patch][V4][PATCH 1/2] Add a new option -fstrict-flex-arrays[=n] and new attribute strict_flex_arrays

2022-09-06 Thread Qing Zhao via Gcc-patches
Add the following new option -fstrict-flex-arrays[=n] and a corresponding attribute strict_flex_arrays to GCC: '-fstrict-flex-arrays' Treat the trailing array of a structure as a flexible array member in a stricter way. The positive form is equivalent to '-fstrict-flex-arrays=3', w

[GCC13][Patch][V4][PATCH 2/2] Use array_at_struct_end_p in __builtin_object_size [PR101836]

2022-09-06 Thread Qing Zhao via Gcc-patches
Use array_at_struct_end_p to determine whether the trailing array of a structure is flexible array member in __builtin_object_size. gcc/ChangeLog: PR tree-optimization/101836 * tree-object-size.cc (addr_object_size): Use array_at_struct_end_p to determine a flexible array

[GCC13][Patch][V4][PATCH 0/2] Add a new option -fstrict-flex-array[=n] and attribute strict_flex_array(n) and use it in PR101836

2022-09-06 Thread Qing Zhao via Gcc-patches
This is the 4th version of the patch set. Compare to the 3rd version, the following are the major change: 1. delete all the warnings for the confliction between -std and -fstrict-flex-arrays per our discussion. 2. delete all the related testing cases for these warnings. 3. update all the wording c

Re: [PATCH] Improve converting between 128-bit modes that use the same format

2022-09-06 Thread Segher Boessenkool
On Fri, Sep 02, 2022 at 01:51:33PM -0400, Michael Meissner wrote: > On Tue, Aug 23, 2022 at 04:13:45PM -0500, Segher Boessenkool wrote: > > Please do not send new patches as replies to other patches. > > This was sent as a new patch. It probably was the partially copied to the mail body subject l

c: New C2x keywords

2022-09-06 Thread Joseph Myers
C2x follows C++ in making alignas, alignof, bool, false, static_assert, thread_local and true keywords; implement this accordingly. This implementation makes them normal keywords in C2x mode just like any other keyword (C2x leaves open the possibility of implementation using predefined macros inst

Re: [PATCH] d: Fix #error You must define PREFERRED_DEBUGGING_TYPE if DWARF is not supported (PR105659)

2022-09-06 Thread Iain Buclaw via Gcc-patches
Excerpts from Iain Buclaw's message of September 6, 2022 7:02 pm: > Excerpts from Rainer Orth's message of September 6, 2022 4:25 pm: >> Hi Iain, >> there is indeed ;-) The previous d21 emits binary./266566/gcc/d21 version v2.100.1 predefs GNU D_Version2 Litt

[PATCH v2] libstdc++: Add pretty printer for std::stringstreams

2022-09-06 Thread Philipp Fent via Gcc-patches
To display (o-,i-)stringstreams in the common case, we just print the underlying stringbuf, without the many ios_base members. In the unconventional case that the underlying streambuf was redirected, we report the redirected target. Signed-off-by: Philipp Fent --- libstdc++-v3/python/libstdcxx/v

[wwdocs PATCH RFA] contribute: link to kernel doc about patch email

2022-09-06 Thread Jason Merrill via Gcc-patches
It occurred to me that it would be useful to link to the kernel's documentation for emailing patches. OK? --- htdocs/contribute.html | 5 + 1 file changed, 5 insertions(+) diff --git a/htdocs/contribute.html b/htdocs/contribute.html index c985b87d..60bcf3f8 100644 --- a/htdocs/contribute.ht

[pushed] c++: C++23 operator[] allows default arguments

2022-09-06 Thread Jason Merrill via Gcc-patches
This usage was intended to be allowed by P2128, but it didn't make it into the final wording. Fixed by CWG 2507. Tested x86_64-pc-linux-gnu, applying to trunk. DR2507 gcc/cp/ChangeLog: * decl.cc (grok_op_properties): Return sooner for C++23 op[]. gcc/testsuite/ChangeLog:

Re: [PATCH v2, rs6000] Change insn condition from TARGET_64BIT to TARGET_POWERPC64 for VSX scalar extract/insert instructions

2022-09-06 Thread Segher Boessenkool
Hi! On Mon, Sep 05, 2022 at 02:36:30PM +0800, HAO CHEN GUI wrote: > On 2/9/2022 下午 11:56, Segher Boessenkool wrote: > >> - const signed long __builtin_vsx_scalar_extract_exp (double); > >> + const unsigned long long __builtin_vsx_scalar_extract_exp (double); > >> VSEEDP xsxexpdp {} > >> > >

Re: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality

2022-09-06 Thread David Edelsohn via Gcc-patches
* dwarf2out.cc (XCOFF_DEBUGGING_INFO): Likewise. (HAVE_XCOFF_DWARF_EXTRAS): Likewise. (output_fde): Likewise. (output_call_frame_info): Likewise. (have_macinfo): Likewise. (add_AT_loc_list): Likewise. (add_AT_view_list): Likewise. (out

Re: [PATCH] d: Fix #error You must define PREFERRED_DEBUGGING_TYPE if DWARF is not supported (PR105659)

2022-09-06 Thread Iain Buclaw via Gcc-patches
Excerpts from Rainer Orth's message of September 6, 2022 4:25 pm: > Hi Iain, > >>> there is indeed ;-) The previous d21 emits >>> >>> binary./266566/gcc/d21 >>> version v2.100.1 >>> >>> predefs GNU D_Version2 LittleEndian GNU_DWARF2_Exceptions >>> GNU_StackGrowsDown GNU_InlineAsm assert D

Re: [PATCH] Using pli(paddi) and rotate to build 64bit constants

2022-09-06 Thread Segher Boessenkool
Hi! On Tue, Sep 06, 2022 at 08:27:56PM +0800, Jiufu Guo wrote: > + if (can_create_pseudo_p ()) > + { > + /* pli A,H + pli B,L + rldimi A,B,32,0. */ A is the low one and B is the high one (the one that needs to be shifted). rl[wd]imi is one of our very few insns that has the outpu

Re: [PATCH 1/3] STABS: remove -gstabs and -gxcoff functionality

2022-09-06 Thread David Edelsohn via Gcc-patches
I fully support the plan to remove stabs support, but this patch broke bootstrap on AIX. It seems rather bad policy to remove support for a feature without ensuring that the removal does not negatively impact the targets touched by the patch. I should have been explicitly copied on these patches

Re: OpenMP patch ping

2022-09-06 Thread Tobias Burnus
Follow-up patch ping (updated) The first listed patches are smaller + should be quicker to be reviewable, but in terms of priority, it would be good to make some progress on the larger patches below as well. Especially as the first patches are only mine ... Smaller patches (i) preparing for true

RE: [PATCH] arm: unified syntax for libgcc clear_cache

2022-09-06 Thread Kyrylo Tkachov via Gcc-patches
Hi Seija, > -Original Message- > From: Gcc-patches bounces+kyrylo.tkachov=arm@gcc.gnu.org> On Behalf Of Seija Kijin via > Gcc-patches > Sent: Thursday, August 11, 2022 2:36 PM > To: gcc-patches@gcc.gnu.org > Subject: [PATCH] arm: unified syntax for libgcc clear_cache > > The patch to

Re: [PATCH] d: Fix #error You must define PREFERRED_DEBUGGING_TYPE if DWARF is not supported (PR105659)

2022-09-06 Thread Rainer Orth
Hi Iain, >> there is indeed ;-) The previous d21 emits >> >> binary./266566/gcc/d21 >> version v2.100.1 >> >> predefs GNU D_Version2 LittleEndian GNU_DWARF2_Exceptions >> GNU_StackGrowsDown GNU_InlineAsm assert D_PreConditions D_PostConditions >> D_Invariants D_ModuleInfo D_Exceptions D_T

Re: [PATCH] d: Fix #error You must define PREFERRED_DEBUGGING_TYPE if DWARF is not supported (PR105659)

2022-09-06 Thread Iain Buclaw via Gcc-patches
Excerpts from Rainer Orth's message of September 6, 2022 2:04 pm: > Hi Iain, > >> Is there a difference in output from `./gcc/d21 -quiet -v` ? >> >> Pay attention to any predefs that have suddenly appeared or disappeared. > > there is indeed ;-) The previous d21 emits > > binary./266566/gcc

Re: [PATCH] expand: Convert cst - x into cst xor x.

2022-09-06 Thread Robin Dapp via Gcc-patches
> cost might also depend on the context in case flag setting > behavior differs for xor vs sub (on x86 sub looks strictly more > powerful here). The same is probably true when looking for > a combination with another bitwise operation. > > Btw, why not perform the optimization in expand_binop? T

Re: [PATCH] Fortran: Add IEEE_SIGNBIT and IEEE_FMA functions

2022-09-06 Thread FX via Gcc-patches
ping on that patch from last week Maybe the ping is a bit early, as you know I’m not very active anymore, so I do not know what are the current policies. In particular, how much leeway do I have to commit the patch if there is no comment from another maintainer? I am fairly confident about the

[PING^2][PATCH][gdb/build] Fix build breaker with --enabled-shared

2022-09-06 Thread Tom de Vries via Gcc-patches
On 7/12/22 15:42, Tom de Vries wrote: [ dropped gdb-patches, since already applied there. ] On 6/27/22 15:38, Tom de Vries wrote: On 6/27/22 15:03, Tom de Vries wrote: Hi, When building gdb with --enabled-shared, I run into: ... ld: build/zlib/libz.a(libz_a-inffast.o): relocation R_X86_64_32S

[PATCH] tree-optimization/106754 - fix compute_control_dep_chain defect

2022-09-06 Thread Richard Biener via Gcc-patches
The following handles the situation of a loop exit along the control path to the PHI def or from there to the use in a different way, aoviding premature abort of the walks as noticed in the two cases where the exit is outermost (gcc.dg/uninit-pred-11.c) or wrapped in a condition that is on the path

Re: [PATCH] Handle > INF and < INF correctly in range-op-float.cc

2022-09-06 Thread Koning, Paul via Gcc-patches
> On Sep 6, 2022, at 8:06 AM, Jakub Jelinek via Gcc-patches > wrote: > > On Tue, Sep 06, 2022 at 01:47:43PM +0200, Aldy Hernandez wrote: >> Question...for !HONOR_NANS or !HONOR_INFINITIES or whatever, say the >> range for the domain is [-MIN, +MAX] for the min and max representable >> numbers

Re: [PATCH 1/2] Using pli(paddi) and rotate to build 64bit constants

2022-09-06 Thread Jiufu Guo via Gcc-patches
Segher Boessenkool writes: > On Mon, Sep 05, 2022 at 02:25:29PM +0800, Jiufu Guo wrote: >> > On Fri, Sep 02, 2022 at 02:56:21PM +0800, Jiufu Guo wrote: >> > Or force the testcase to use r0 some other way. Well, "forcing" cannot >> > be done, but we can probably encourage it (via a local register

Re: [PATCH] Handle > INF and < INF correctly in range-op-float.cc

2022-09-06 Thread Aldy Hernandez via Gcc-patches
On Tue, Sep 6, 2022 at 2:17 PM Richard Biener wrote: > > On Tue, Sep 6, 2022 at 2:06 PM Jakub Jelinek wrote: > > > > On Tue, Sep 06, 2022 at 01:47:43PM +0200, Aldy Hernandez wrote: > > > Question...for !HONOR_NANS or !HONOR_INFINITIES or whatever, say the > > > range for the domain is [-MIN, +MAX

Re: [PATCH] expand: Convert cst - x into cst xor x.

2022-09-06 Thread Richard Biener via Gcc-patches
On Tue, Sep 6, 2022 at 11:42 AM Robin Dapp wrote: > > Hi, > > posting this separately from PR91213 now. I wrote an s390 test and most > likely it could also be done for x86 which will give it broader coverage. > > Depending on the backend it might be better to convert > cst - x > into > cst x

[PATCH] Using pli(paddi) and rotate to build 64bit constants

2022-09-06 Thread Jiufu Guo via Gcc-patches
Hi, Test cases are updated/added, and code is refined as the comments in the review for previous version: https://gcc.gnu.org/pipermail/gcc-patches/2022-September/600768.html As mentioned in PR106550, since pli could support 34bits immediate, we could use less instructions(3insn would be ok) to b

Re: [PATCH] Handle > INF and < INF correctly in range-op-float.cc

2022-09-06 Thread Richard Biener via Gcc-patches
On Tue, Sep 6, 2022 at 2:06 PM Jakub Jelinek wrote: > > On Tue, Sep 06, 2022 at 01:47:43PM +0200, Aldy Hernandez wrote: > > Question...for !HONOR_NANS or !HONOR_INFINITIES or whatever, say the > > range for the domain is [-MIN, +MAX] for the min and max representable > > numbers. What happens for

[COMMITTED] xtensa: gcc: add static PIE support

2022-09-06 Thread Max Filippov via Gcc-patches
gcc/ * config/xtensa/linux.h (LINK_SPEC): Add static-pie. --- gcc/config/xtensa/linux.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc/config/xtensa/linux.h b/gcc/config/xtensa/linux.h index 540e4bf538f8..bc7bee71517d 100644 --- a/gcc/config/xtensa/linux.h +++

Re: [PATCH] Handle > INF and < INF correctly in range-op-float.cc

2022-09-06 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 06, 2022 at 01:47:43PM +0200, Aldy Hernandez wrote: > Question...for !HONOR_NANS or !HONOR_INFINITIES or whatever, say the > range for the domain is [-MIN, +MAX] for the min and max representable > numbers. What happens for MAX+1? Is that undefined? I wonder what > real.cc does for t

Re: [PATCH] d: Fix #error You must define PREFERRED_DEBUGGING_TYPE if DWARF is not supported (PR105659)

2022-09-06 Thread Rainer Orth
Hi Iain, > Is there a difference in output from `./gcc/d21 -quiet -v` ? > > Pay attention to any predefs that have suddenly appeared or disappeared. there is indeed ;-) The previous d21 emits binary./266566/gcc/d21 version v2.100.1 predefs GNU D_Version2 LittleEndian GNU_DWARF2_Excepti

Re: [PATCH] OpenMP, libgomp: Environment variable syntax extension.

2022-09-06 Thread Jakub Jelinek via Gcc-patches
On Wed, Aug 31, 2022 at 12:56:25PM +0200, Marcel Vollweiler wrote: > libgomp/ChangeLog: > > * config/gcn/icv-device.c (omp_get_default_device): Return device- > specific ICV. > (omp_get_max_teams): Added for GCN devices. > (omp_set_num_teams): Likewise. > (ialias): Li

Re: [PATCH] Handle > INF and < INF correctly in range-op-float.cc

2022-09-06 Thread Aldy Hernandez via Gcc-patches
On Tue, Sep 6, 2022 at 9:59 AM Jakub Jelinek wrote: > > On Tue, Sep 06, 2022 at 09:49:55AM +0200, Aldy Hernandez wrote: > > On Tue, Sep 6, 2022 at 9:44 AM Jakub Jelinek wrote: > > > > > > On Tue, Sep 06, 2022 at 09:40:59AM +0200, Aldy Hernandez wrote: > > > > if (x <= Inf) > > > > > > This will b

Re: [PATCH] msp430: Mark unused attribute

2022-09-06 Thread Nick Clifton via Gcc-patches
Hi Jan-Benedict, gcc/ChangeLog: * config/msp430/msp430.cc (msp430_single_op_cost): Mark unused argument. Okay for HEAD? Patch approved - please apply. (I think that this patch would also count as an "obvious" fix, but thanks for asking anyway). Cheers Nick

[PATCH] Fix use predicate computation for uninit analysis

2022-09-06 Thread Richard Biener via Gcc-patches
In uninit analysis we try to prove that a use is always properly guarded so it is never reached when the used value is not initialized. This fails to be conservative when during the computation of the use predicate components of the || .. || .. chain are dropped so we have to detect this case and

Re: [PATCH] riscv: implement TARGET_MODE_REP_EXTENDED

2022-09-06 Thread Alexander Monakov via Gcc-patches
On Mon, 5 Sep 2022, Philipp Tomsich wrote: > +riscv_mode_rep_extended (scalar_int_mode mode, scalar_int_mode mode_rep) > +{ > + /* On 64-bit targets, SImode register values are sign-extended to DImode. > */ > + if (TARGET_64BIT && mode == SImode && mode_rep == DImode) > +return SIGN_EXTEND

Re: [PATCH 2/2] libstdc++: Add pretty printer for std::stringstream

2022-09-06 Thread Jonathan Wakely via Gcc-patches
Thanks for the patch. Comments below. On Sun, 4 Sept 2022 at 19:48, Philipp Fent via Libstdc++ wrote: > > Signed-off-by: Philipp Fent > --- > libstdc++-v3/python/libstdcxx/v6/printers.py | 37 +++ > .../libstdc++-prettyprinters/debug.cc | 5 +++ > .../libstdc++-pretty

Re: [PATCH 1/2] libstdc++: Fix pretty printer tests of tuple indexes

2022-09-06 Thread Jonathan Wakely via Gcc-patches
On Tue, 6 Sept 2022 at 02:07, Will Hawkins wrote: > > Confirming that patch 1 of 2 *does* fix the failing tests here (x86-64). > > Will > > PS: Please tell me if emails like this are helpful or not. Just trying to > help! Thanks. I wasn't even seeing the failing tests, due to errors from GDB: D

Re: [PATCH] d: Fix #error You must define PREFERRED_DEBUGGING_TYPE if DWARF is not supported (PR105659)

2022-09-06 Thread Iain Buclaw via Gcc-patches
Excerpts from Rainer Orth's message of September 6, 2022 9:42 am: > Hi Iain, > >> Excerpts from Richard Biener's message of September 1, 2022 8:28 am: >>> On Wed, Aug 31, 2022 at 9:21 PM Iain Buclaw wrote: >>> >>> Ah yes - I think, even if a bit verbose, this is exactly how it was supposed >>> t

Re: [PATCH] nvptx: Silence unused variable warning

2022-09-06 Thread Tom de Vries via Gcc-patches
On 8/28/22 13:09, Jan-Benedict Glaw wrote: Hi! The nvptx backend defines ASM_OUTPUT_DEF along with ASM_OUTPUT_DEF_FROM_DECLS. Much like the rs6000 coff target, nvptx triggers an unused variable warning: /usr/lib/gcc-snapshot/bin/g++ -fno-PIE -c -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTUR

[PATCH] Enable shrink wrapping for the RISC-V target.

2022-09-06 Thread mtsamis
This commit implements the target macros (TARGET_SHRINK_WRAP_*) that enable separate shrink wrapping for function prologues/epilogues in RISC-V. Tested against SPEC CPU 2017, this change always has a net-positive effect on the dynamic instruction count. See the following table for the breakdown o

Re: [COMMITTED] Be even more conservative in intersection of NANs.

2022-09-06 Thread Aldy Hernandez via Gcc-patches
On Tue, Sep 6, 2022, 11:09 Richard Biener wrote: > On Tue, Sep 6, 2022 at 9:21 AM Aldy Hernandez wrote: > > > > On Mon, Sep 5, 2022 at 2:16 PM Richard Biener > > wrote: > > > > > > On Mon, Sep 5, 2022 at 1:45 PM Aldy Hernandez > wrote: > > > > > > > > On Mon, Sep 5, 2022 at 12:38 PM Richard Bi

RE: [PATCH][committed] aarch64: Suggest an -mcpu option when user passes CPU name to -march

2022-09-06 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Richard Earnshaw > Sent: Monday, September 5, 2022 2:43 PM > To: Kyrylo Tkachov ; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH][committed] aarch64: Suggest an -mcpu option when > user passes CPU name to -march > > > > On 05/09/2022 14:35, Kyrylo Tkachov v

[PATCH] expand: Convert cst - x into cst xor x.

2022-09-06 Thread Robin Dapp via Gcc-patches
Hi, posting this separately from PR91213 now. I wrote an s390 test and most likely it could also be done for x86 which will give it broader coverage. Depending on the backend it might be better to convert cst - x into cst xor x if cst + 1 is a power of two and 0 <= x <= cst. This patch comp

[PATCH] tree-optimization/106844 - fix ICE in init_use_preds

2022-09-06 Thread Richard Biener via Gcc-patches
The following fixes an oversight in the last change to compute_control_dep_chain where we have to return whether we found a chain. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/106844 * gimple-predicate-analysis.cc (compute_control_dep_chain):

Re: [COMMITTED] Be even more conservative in intersection of NANs.

2022-09-06 Thread Richard Biener via Gcc-patches
On Tue, Sep 6, 2022 at 9:21 AM Aldy Hernandez wrote: > > On Mon, Sep 5, 2022 at 2:16 PM Richard Biener > wrote: > > > > On Mon, Sep 5, 2022 at 1:45 PM Aldy Hernandez wrote: > > > > > > On Mon, Sep 5, 2022 at 12:38 PM Richard Biener > > > wrote: > > > > > > > > On Mon, Sep 5, 2022 at 12:24 PM Al

Re: [PATCH] msp430: Mark unused attribute

2022-09-06 Thread Richard Biener via Gcc-patches
On Tue, Sep 6, 2022 at 9:57 AM Jan-Benedict Glaw wrote: > > Hi Nick! > > This patch fixes a small warning in the msp430 backend (tested for > --target=msp430-elf and --target=msp430-elfbare). > > .../gcc/configure --prefix=... --enable-werror-always --enable-languages=all > --disable-gcov --disab

[PATCH] tree-optimization/106841 - gather and hybrid SLP

2022-09-06 Thread Richard Biener via Gcc-patches
Hybrid SLP detection currently fails to consider a not direct offset operand of a scatter/gather operation. The following fixes this. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/106841 * tree-vect-slp.cc (vect_detect_hybrid_slp): Also process

Re: [r13-2446 Regression] FAIL: gfortran.dg/gomp/doacross-5.f90 -O (test for excess errors) on Linux/x86_64

2022-09-06 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 06, 2022 at 10:12:39AM +0200, Tobias Burnus wrote: > On 06.09.22 09:49, Jakub Jelinek wrote: > > On Tue, Sep 06, 2022 at 07:54:05AM +0800, haochen.jiang via Gcc-patches > > wrote: > > > Fortran/openmp: Partial OpenMP 5.2 doacross and omp_cur_iteration > > > support > > > caused >

[PATCH] testsuite/s390: Add -mzarch to ifcvt test cases.

2022-09-06 Thread Robin Dapp via Gcc-patches
Hi, this adds a missing -mzarch to some ifcvt test cases. Going to commit this as obvious in some days barring objections. Regards Robin gcc/testsuite/ChangeLog: * gcc.target/s390/ifcvt-one-insn-bool.c: Add -mzarch. * gcc.target/s390/ifcvt-one-insn-char.c: Dito. * gcc.

Re: [r13-2446 Regression] FAIL: gfortran.dg/gomp/doacross-5.f90 -O (test for excess errors) on Linux/x86_64

2022-09-06 Thread Tobias Burnus
On 06.09.22 09:49, Jakub Jelinek wrote: On Tue, Sep 06, 2022 at 07:54:05AM +0800, haochen.jiang via Gcc-patches wrote: Fortran/openmp: Partial OpenMP 5.2 doacross and omp_cur_iteration support caused FAIL: gfortran.dg/gomp/doacross-5.f90 -O (test for errors, line 28) Seems this is stil

Re: [PATCH] Handle > INF and < INF correctly in range-op-float.cc

2022-09-06 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 06, 2022 at 09:49:55AM +0200, Aldy Hernandez wrote: > On Tue, Sep 6, 2022 at 9:44 AM Jakub Jelinek wrote: > > > > On Tue, Sep 06, 2022 at 09:40:59AM +0200, Aldy Hernandez wrote: > > > if (x <= Inf) > > > > This will be [-Inf, Inf] !NAN on the true side and > > NAN (either sign) on the

[PATCH] msp430: Mark unused attribute

2022-09-06 Thread Jan-Benedict Glaw
Hi Nick! This patch fixes a small warning in the msp430 backend (tested for --target=msp430-elf and --target=msp430-elfbare). .../gcc/configure --prefix=... --enable-werror-always --enable-languages=all --disable-gcov --disable-shared --disable-threads --target=msp430-elf --without-headers [...

Re: [PATCH] Handle > INF and < INF correctly in range-op-float.cc

2022-09-06 Thread Aldy Hernandez via Gcc-patches
On Tue, Sep 6, 2022 at 9:44 AM Jakub Jelinek wrote: > > On Tue, Sep 06, 2022 at 09:40:59AM +0200, Aldy Hernandez wrote: > > if (x <= Inf) > > This will be [-Inf, Inf] !NAN on the true side and > NAN (either sign) on the false side indeed. > > > if (x < -Inf) > > will be NAN (either sign) on the tr

Re: [r13-2446 Regression] FAIL: gfortran.dg/gomp/doacross-5.f90 -O (test for excess errors) on Linux/x86_64

2022-09-06 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 06, 2022 at 07:54:05AM +0800, haochen.jiang via Gcc-patches wrote: > On Linux/x86_64, > > 938cda536019cd6a1bc0dd2346381185b420bbf8 is the first bad commit > commit 938cda536019cd6a1bc0dd2346381185b420bbf8 > Author: Tobias Burnus > Date: Mon Sep 5 18:05:24 2022 +0200 > > Fortran

Re: [PATCH] Handle > INF and < INF correctly in range-op-float.cc

2022-09-06 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 06, 2022 at 09:40:59AM +0200, Aldy Hernandez wrote: > if (x <= Inf) This will be [-Inf, Inf] !NAN on the true side and NAN (either sign) on the false side indeed. > if (x < -Inf) will be NAN (either sign) on the true side and [-Inf, Inf] !NAN on the false side. Jakub

Re: [PATCH] d: Fix #error You must define PREFERRED_DEBUGGING_TYPE if DWARF is not supported (PR105659)

2022-09-06 Thread Rainer Orth
Hi Iain, > Excerpts from Richard Biener's message of September 1, 2022 8:28 am: >> On Wed, Aug 31, 2022 at 9:21 PM Iain Buclaw wrote: >>> >>> Excerpts from Joseph Myers's message of August 31, 2022 7:16 pm: >>> > On Wed, 31 Aug 2022, Iain Buclaw via Gcc-patches wrote: >>> > >>> >> Excerpts from J

Re: [PATCH] Handle > INF and < INF correctly in range-op-float.cc

2022-09-06 Thread Aldy Hernandez via Gcc-patches
On Tue, Sep 6, 2022 at 9:35 AM Jakub Jelinek wrote: > > On Tue, Sep 06, 2022 at 09:29:01AM +0200, Aldy Hernandez wrote: > > The gfortran.dg/minlocval*.f90 tests are generating conditionals past > > the infinities. For example: > > > > if (x <= +Inf) > > foo (x); > > else > >

Re: [PATCH] Handle > INF and < INF correctly in range-op-float.cc

2022-09-06 Thread Jakub Jelinek via Gcc-patches
On Tue, Sep 06, 2022 at 09:29:01AM +0200, Aldy Hernandez wrote: > The gfortran.dg/minlocval*.f90 tests are generating conditionals past > the infinities. For example: > > if (x <= +Inf) > foo (x); > else > bar (x); > > It seems to me that the only possible value for x

[committed] openmp: Fix ICE when splitting invalid depend(source)/depend(sink:vec) [PR106836]

2022-09-06 Thread Jakub Jelinek via Gcc-patches
Hi! As we now create OMP_CLAUSE_DOACROSS rather than OMP_CLAUSE_DEPEND when depend is used with source/sink modifiers, c_omp_split_clauses can see OMP_CLAUSE_DOACROSS clause too before we diagnose it as erroneous. The following patch treats it like OMP_CLAUSE_DEPEND during the splitting but adds

[PATCH] Handle > INF and < INF correctly in range-op-float.cc

2022-09-06 Thread Aldy Hernandez via Gcc-patches
The gfortran.dg/minlocval*.f90 tests are generating conditionals past the infinities. For example: if (x <= +Inf) foo (x); else bar (x); It seems to me that the only possible value for x on the false side is either NAN or undefined (for !HONOR_NANS). Is this

Re: [COMMITTED] Be even more conservative in intersection of NANs.

2022-09-06 Thread Aldy Hernandez via Gcc-patches
On Mon, Sep 5, 2022 at 2:16 PM Richard Biener wrote: > > On Mon, Sep 5, 2022 at 1:45 PM Aldy Hernandez wrote: > > > > On Mon, Sep 5, 2022 at 12:38 PM Richard Biener > > wrote: > > > > > > On Mon, Sep 5, 2022 at 12:24 PM Aldy Hernandez wrote: > > > > > > > > On Mon, Sep 5, 2022 at 11:53 AM Richa

[COMMITTED] C-SKY: Fix missing operand when do spilt for cskyv2_addcc and cskyv2_addcc_invert.

2022-09-06 Thread Xianmiao Qu via Gcc-patches
It will cause ICE when compiling the case: gcc/testsuite/gcc.dg/params/blocksort-part.c gcc/ * config/csky/csky.md (cskyv2_addcc): Fix missing operand. (cskyv2_addcc_invert): Likewise. --- gcc/config/csky/csky.md | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --

[Ada] Fix internal error on double renaming of private constant

2022-09-06 Thread Marc Poulhiès via Gcc-patches
The first renaming uses the type of the full view of the constant but not the second, which introduces problematic view conversions downstream. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/trans.cc (Full_View_Of_Private_Constant): New function return

[Ada] Fix problematic line debug info attached to call to finalizer

2022-09-06 Thread Marc Poulhiès via Gcc-patches
The End_Label is not defined for body nodes so a small tweak is needed. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/trans.cc (At_End_Proc_to_gnu): Use the End_Label of the child Handled_Statement_Sequence for body nodes. (set_end_locus_from_

[Ada] Fix missing name for access type in generic instantiation

2022-09-06 Thread Marc Poulhiès via Gcc-patches
Pointer types aren't named types in C so we need to take extra care in Ada to make sure that the name of access types is preserved. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gcc-interface/utils.cc (gnat_pushdecl): Preserve named TYPE_DECLs consistently for all

[Ada] Retain Has_Private_View flag for actuals of inlined subprograms

2022-09-06 Thread Marc Poulhiès via Gcc-patches
When instantiating a body to inline (either because frontend inlining is enabled with switch -gnatN or because of inlining-for-proof in GNATprove mode) we rewrite occurrences of formal parameters into the corresponding actual parameters. Then we switch type views, so that if the formal had a full v

[Ada] Enable lock free protected implementation by default

2022-09-06 Thread Marc Poulhiès via Gcc-patches
In the past, the Lock_Free aspect of a protected type (including an anonymous type) defaulted to False. In the case where an explicit "Lock_Free => True" aspect specification would be legal, the aspect now defaults to True (which means that a lock-free implementation is used to implement the type's

[Ada] Improve documentation of validation checking control switches

2022-09-06 Thread Marc Poulhiès via Gcc-patches
Correct incorrect text and clarify unclear text that has been identified in the "Validity Checking" section of the GNAT UG. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Improve -gnatVa, -gnatVc, -gnatVd, -gn

[Ada] Disable lock free protected implementation if target lacks support

2022-09-06 Thread Marc Poulhiès via Gcc-patches
Do not select a lock free implementation if Targparm.Support_Atomic_Primitives is False (which indicates that the target cannot support it). Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch9.adb (Allows_Lock_Free_Implementation): Return False if Support

[Ada] Restore missing Aggregate aspect for Ada.Containers.Ordered_Sets.Set

2022-09-06 Thread Marc Poulhiès via Gcc-patches
Ada RM A.18.9 includes a specification of the Aggregate aspect for the type Ada.Containers.Ordered_Sets. That aspect specification was deliberately commented out in a-coorse.ads at one time, but that workaround is no longer needed. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/

[Ada] Handle new At_End expansion during unnesting

2022-09-06 Thread Marc Poulhiès via Gcc-patches
This patch modifies the marking of nested subprograms requiring static links, so that the changes made to "At end" procedures get handled properly. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_unst.adb (Visit_Node): Add N_Block_Statement to the enclosing const

[Ada] Fix formal parameters list for secondary stack allocation procedure

2022-09-06 Thread Marc Poulhiès via Gcc-patches
The introduction of the Alignment parameter for the secondary stack allocator in previous change was missing the corresponding change in the Build_Allocate_Deallocate_Proc when creating the formal parameters list. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_util.adb

[Ada] Enforce matching of extra formals

2022-09-06 Thread Marc Poulhiès via Gcc-patches
This patch enforces matching of extra formals in overridden subprograms, subprogram renamings, and subprograms to which attributes 'Access, 'Unchecked_Access, or 'Unrestricted_Access is applied (for these access cases the subprogram is checked against its corresponding subprogram type). Tested on

[Ada] Cleanup unnecessary shadowing in expansion of attribute Old

2022-09-06 Thread Marc Poulhiès via Gcc-patches
Code cleanup; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Old]): Remove unnecessary local constant that was shadowing another constant with the same initial value.diff --git a/

[Ada] Slice length computation bug in Generic_Bounded_Length generics

2022-09-06 Thread Marc Poulhiès via Gcc-patches
In some cases involving null slices, the Slice subprograms (both the function and the procedure) in each of the three Generic_Bounded_Length generic packages (for String, Wide_String, and Wide_Wide_String) could raise Constraint_Error in cases where this is incorrect. Tested on x86_64-pc-lin

[Ada] Fix comment about mapping of parameters and inlining static funcs

2022-09-06 Thread Marc Poulhiès via Gcc-patches
Fix glitch in a cross-reference in comment. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * inline.adb (Replace_Formal): Fix name of the referenced routine.diff --git a/gcc/ada/inline.adb b/gcc/ada/inline.adb --- a/gcc/ada/inline.adb +++ b/gcc/ada/inline.adb @@ -4699,8 +4699

[Ada] Place "at end" on body nodes

2022-09-06 Thread Marc Poulhiès via Gcc-patches
This patch fixes a bug where finalization code might refer to variables outside their lifetime. The previous version moved declarations into the Handled_Statement_Sequence (HSS), so that the "at end" handler of the HSS could handle exceptions raised by those declarations. The First_Real_Statement f

[Ada] Temporarily simplify legality checks for Inox case statements

2022-09-06 Thread Marc Poulhiès via Gcc-patches
INOX (which is enabled via -gnatX) supports composite case-statement selectors. As a temporary measure, simplify the coverage-related compile-time checks for such case statements via two changes: an others choice is always required for such a case statement, and no legality checks relating to overl

[Ada] Document change to legality checks for Inox case statements

2022-09-06 Thread Marc Poulhiès via Gcc-patches
INOX (which is enabled via -gnatX) supports composite case-statement selectors. As a temporary measure, simplify the coverage-related compile-time checks for such case statements via two changes: an others choice is always required for such a case statement, and no legality checks relating to overl

[Ada] Cope with scalar subtypes that have a non-scalar basetype.

2022-09-06 Thread Marc Poulhiès via Gcc-patches
In some cases, the compiler builds a subtype entity Typ such that Is_Scalar (Typ) is True and Is_Scalar (Base_Type (Typ)) is False. This comes up in some cases involving a subtype of a private type, where the full view of the private type is a scalar type. In such a situation, it may also be the ca

[Ada] Fix a bug in the contract of formal ordered sets

2022-09-06 Thread Marc Poulhiès via Gcc-patches
There are 2 main issues in the postcondition of the function Replace of the formal ordered sets, in the sub package Generic_Keys. One is related to the fact that when the element is changed, the key is also changed. The second one is due to the fact that the arrival of the new element might modify

[Ada] Correctly round Value attribute for floating point in more cases

2022-09-06 Thread Marc Poulhiès via Gcc-patches
This provides correct rounding in the IEEE 754 sense for the Value attribute of floating-point types in more cases, by switching from tables of powers of 10 to tables of powers of 5 for precomputed values, thus making it possible to use a single divide for denormals and normalized numbers just abov

[Ada] Bad Valid_Scalars result if signed int component type signed has partial view.

2022-09-06 Thread Marc Poulhiès via Gcc-patches
For an object X of a composite type, the attribute X'Valid_Scalars should return False if and only if there exists at least one invalid scalar subcomponent of X. The validity test for a scalar part may include a range test. In some cases involving a private type that is implemented as a signed inte

[Ada] ICE handling discriminant-dependent index constraint for access component

2022-09-06 Thread Marc Poulhiès via Gcc-patches
The compiler would fail with an internal error in some cases involving a discriminated record type that provides a discriminant-dependent index constraint for the subtype of a component of an access-to-array type when a dereference of that component of some object is mentioned in a pre- or postcond

[Ada] Tune message for illegal aspect Relaxed_Initialization

2022-09-06 Thread Marc Poulhiès via Gcc-patches
Error message about illegal aspect Relaxed_Initialization was lacking a whitespace character. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch13.adb (Analyze_Aspect_Relaxed_Initialization): Fix error template.diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13

[Ada] Improve detection of illegal Iterable aspects

2022-09-06 Thread Marc Poulhiès via Gcc-patches
Handling of aspect Iterable was lacking guards against illegal code, so the compiler either crashed or emitted cryptic errors while expanding loops that rely on this aspect. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_rm/implementation_defined_aspects.rst

[Ada] Add formal verification dependencies to libgnat

2022-09-06 Thread Marc Poulhiès via Gcc-patches
Spec units for verification of the GNAT standard library with GNATprove must be listed as part of the libgnat package, as otherwise libadalang will complain about missing dependencies. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * Makefile.rtl (GNATRTL_NONTASKING_OBJS): In

  1   2   >