Re: [PATCH 1/2] CALL_INSN may not be a real function call.

2021-07-09 Thread Hongtao Liu via Gcc-patches
On Thu, Jul 8, 2021 at 7:56 AM Segher Boessenkool wrote: > > On Wed, Jul 07, 2021 at 11:32:59PM +0800, Hongtao Liu wrote: > > On Wed, Jul 7, 2021 at 10:54 PM Segher Boessenkool > > wrote: > > > So, a "FAKE_CALL" is very much a *real* call, on the RTL level, which is > > > where we are here. But

Re: [PATCH 2/2] [PHIOPT/MATCH] Remove the statement to move if not used

2021-07-09 Thread Andrew Pinski via Gcc-patches
On Thu, Jul 8, 2021 at 11:50 PM Richard Biener via Gcc-patches wrote: > > On Fri, Jul 9, 2021 at 7:34 AM apinski--- via Gcc-patches > wrote: > > > > From: Andrew Pinski > > > > Instead of waiting for DCE to remove the unused statement, > > and maybe optimize another conditional, it is better if

Fix PR target/101377

2021-07-09 Thread Eric Botcazou
Hi, this is the build failure on Windows with binutils for which GNU as accepts the --gdwarf-5 switch but GNU ld generates broken binaries with DWARF 5. We already have the HAVE_LD_BROKEN_PE_DWARF5 kludge to disable DWARF 5 in this case but it only tames the DWARF version in the compiler, so th

Re: [r12-2132 Regression] FAIL: g++.dg/warn/Warray-bounds-20.C -std=gnu++98 note (test for warnings, line 55) on Linux/x86_64

2021-07-09 Thread Maxim Kuvyrkov via Gcc-patches
> On 9 Jul 2021, at 02:35, sunil.k.pandey via Gcc-patches > wrote: > > On Linux/x86_64, > > a110855667782dac7b674d3e328b253b3b3c919b is the first bad commit > commit a110855667782dac7b674d3e328b253b3b3c919b > Author: Martin Sebor > Date: Wed Jul 7 14:05:25 2021 -0600 > >Correct handling

Ping: [PATCH] Darwini,X86: Adjust call clobbers to allow for lazy-binding [PR100152].

2021-07-09 Thread Iain Sandoe
(early) ping; if possible I’d like to get this onto master in time to back-port for 11.2. > On 4 Jul 2021, at 21:08, Iain Sandoe wrote: > > Hi, > > (I’m not going to defend the status quo here, it seems a bit prone > to confusing a user [different interposition behaviour between the > inlined a

Re: Ping: [PATCH] Darwini,X86: Adjust call clobbers to allow for lazy-binding [PR100152].

2021-07-09 Thread Uros Bizjak via Gcc-patches
On Fri, Jul 9, 2021 at 10:25 AM Iain Sandoe wrote: > > (early) ping; > if possible I’d like to get this onto master in time to back-port for 11.2. > > > On 4 Jul 2021, at 21:08, Iain Sandoe wrote: > > > > Hi, > > > > (I’m not going to defend the status quo here, it seems a bit prone > > to confus

Re: Ping: [PATCH] Darwini,X86: Adjust call clobbers to allow for lazy-binding [PR100152].

2021-07-09 Thread Iain Sandoe
> On 9 Jul 2021, at 09:57, Uros Bizjak wrote: > > On Fri, Jul 9, 2021 at 10:25 AM Iain Sandoe wrote: >> >> (early) ping; >> if possible I’d like to get this onto master in time to back-port for 11.2. >> >>> On 4 Jul 2021, at 21:08, Iain Sandoe wrote: >>> >>> Hi, >>> >>> (I’m not going to

[PATCH] driver/101383 - handle -gtoggle in driver

2021-07-09 Thread Richard Biener
The driver amends assembler options with for example --gdwarf-5 when debugging is enabled but the check for that does not consider the effect of -gtoggle which is not handled in the common option machinery. The following alters debug_info_level according to -gtoggle mimicing what process_options l

Re: Fix PR target/101377

2021-07-09 Thread Richard Biener via Gcc-patches
On Fri, Jul 9, 2021 at 9:41 AM Eric Botcazou wrote: > > Hi, > > this is the build failure on Windows with binutils for which GNU as accepts > the --gdwarf-5 switch but GNU ld generates broken binaries with DWARF 5. > > We already have the HAVE_LD_BROKEN_PE_DWARF5 kludge to disable DWARF 5 in this

[PATCH] i386: Fix *udivmodsi4_pow2_zext_? patterns

2021-07-09 Thread Uros Bizjak via Gcc-patches
In addition to the obvious cut-n-pasto where *udivmodsi4_pow2_zext_2 never matches, limit the range of the immediate operand to prevent out of range immediate operand of AND instruction. Found by inspection, the patterns rarely match (if at all), since tree optimizers do the transformation before

Re: [PATCH 2/2] [PHIOPT/MATCH] Remove the statement to move if not used

2021-07-09 Thread Richard Biener via Gcc-patches
On Fri, Jul 9, 2021 at 9:16 AM Andrew Pinski wrote: > > On Thu, Jul 8, 2021 at 11:50 PM Richard Biener via Gcc-patches > wrote: > > > > On Fri, Jul 9, 2021 at 7:34 AM apinski--- via Gcc-patches > > wrote: > > > > > > From: Andrew Pinski > > > > > > Instead of waiting for DCE to remove the unuse

[PATCH] aarch64: Use unions for vector tables in vqtbl[234] intrinsics

2021-07-09 Thread Jonathan Wright via Gcc-patches
Hi, As subject, this patch uses a union instead of constructing a new opaque vector structure for each of the vqtbl[234] Neon intrinsics in arm_neon.h. This simplifies the header file and also improves code generation - superfluous move instructions were emitted for every register extraction/set i

Re: [PATCH] testsuite: mips: use noinline attribute instead of -fno-inline

2021-07-09 Thread Richard Sandiford via Gcc-patches
Xi Ruoyao writes: > On Thu, 2021-07-08 at 17:44 -0600, Jeff Law wrote: >> >> >> On 6/25/2021 8:40 AM, Richard Sandiford wrote: >> > Xi Ruoyao via Gcc-patches writes: >> > > On Fri, 2021-06-25 at 01:02 +0800, Xi Ruoyao wrote: >> > > > On Thu, 2021-06-24 at 10:48 -0600, Jeff Law wrote: >> > > > >

[WIP, OpenMP] OpenMP metadirectives support

2021-07-09 Thread Kwok Cheung Yeung
Hello This is a WIP implementation of metadirectives as defined in the OpenMP 5.0 spec. I intend to add support for metadirectives as specified in OpenMP 5.1 later (where the directive can be selected dynamically at runtime), but am concentrating on the static part for now. Parsing has only be

Re: [PATCH 06/10] vect: Pass reduc_info to get_initial_defs_for_reduction

2021-07-09 Thread Richard Biener via Gcc-patches
On Thu, Jul 8, 2021 at 6:48 PM Richard Sandiford wrote: > > Richard Biener writes: > > On Thu, Jul 8, 2021 at 2:46 PM Richard Sandiford via Gcc-patches > > wrote: > >> > >> This patch passes the reduc_info to get_initial_defs_for_reduction, > >> so that the function can get general information f

Re: [PATCH] aarch64: Use unions for vector tables in vqtbl[234] intrinsics

2021-07-09 Thread Richard Sandiford via Gcc-patches
Jonathan Wright writes: > Hi, > > As subject, this patch uses a union instead of constructing a new opaque > vector structure for each of the vqtbl[234] Neon intrinsics in arm_neon.h. > This simplifies the header file and also improves code generation - > superfluous move instructions were emitted

RE: [PATCH] aarch64: Use unions for vector tables in vqtbl[234] intrinsics

2021-07-09 Thread Kyrylo Tkachov via Gcc-patches
> -Original Message- > From: Richard Sandiford > Sent: 09 July 2021 12:40 > To: Jonathan Wright > Cc: gcc-patches@gcc.gnu.org; Kyrylo Tkachov > Subject: Re: [PATCH] aarch64: Use unions for vector tables in vqtbl[234] > intrinsics > > Jonathan Wright writes: > > Hi, > > > > As subject

Re: [PATCH] aarch64: Use unions for vector tables in vqtbl[234] intrinsics

2021-07-09 Thread Richard Sandiford via Gcc-patches
Kyrylo Tkachov writes: >> -Original Message- >> From: Richard Sandiford >> Sent: 09 July 2021 12:40 >> To: Jonathan Wright >> Cc: gcc-patches@gcc.gnu.org; Kyrylo Tkachov >> Subject: Re: [PATCH] aarch64: Use unions for vector tables in vqtbl[234] >> intrinsics >> >> Jonathan Wright wri

Re: [PATCH 10/10] vect: Reuse reduction accumulators between loops

2021-07-09 Thread Richard Biener via Gcc-patches
On Thu, Jul 8, 2021 at 2:50 PM Richard Sandiford via Gcc-patches wrote: > > This patch adds support for reusing a main loop's reduction accumulator > in an epilogue loop. This in turn lets the loops share a single piece > of vector->scalar reduction code. > > The patch has the following restricti

Re: [PATCH] aarch64: Use unions for vector tables in vqtbl[234] intrinsics

2021-07-09 Thread Richard Biener via Gcc-patches
On Fri, Jul 9, 2021 at 1:54 PM Richard Sandiford via Gcc-patches wrote: > > Kyrylo Tkachov writes: > >> -Original Message- > >> From: Richard Sandiford > >> Sent: 09 July 2021 12:40 > >> To: Jonathan Wright > >> Cc: gcc-patches@gcc.gnu.org; Kyrylo Tkachov > >> Subject: Re: [PATCH] aarc

[Ada] Avoid unnecessary call in preanalysis without freezing

2021-07-09 Thread Pierre-Marie de Rodat
Cleanup related to preanalysis in GNATprove mode; behaviour is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_res.adb (Preanalyze_And_Resolve): Only call Set_Must_Not_Freeze when it is necessary to restore the previous value.diff --git a/gcc/

[Ada] Remove an unnecessary local constant

2021-07-09 Thread Pierre-Marie de Rodat
Code cleanup related to preanalysis in GNATprove mode; behaviour is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch6.adb (Analyze_Expression_Function): A local Expr constant was shadowing a global constant with the same name and the same va

[Ada] Refine types of local variables in analysis of expression functions

2021-07-09 Thread Pierre-Marie de Rodat
Code cleanup related to handing of static expression functions in GNATprove; behaviour is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch6.adb (Analyze_Expression_Function): Change types local variables from Entity_Id to Node_Id.diff --git a/gcc/ad

[Ada] Avoid repeated calls in analysis of expression functions

2021-07-09 Thread Pierre-Marie de Rodat
Code cleanup related to handing of static expression functions in GNATprove; behaviour is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch6.adb (Analyze_Expression_Function): Use Orig_N variable instead of repeated calls to Original_Node.diff --git

[Ada] Fix comment related to analysis of expression functions

2021-07-09 Thread Pierre-Marie de Rodat
Cleanup related to handing of static expression functions in GNATprove. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch6.adb (Analyze_Expression_Function): Fix comment.diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb --- a/gcc/ada/sem_ch6.adb +++ b/gcc/ada/sem_c

[Ada] Avoid repeated computing of type of expression functions

2021-07-09 Thread Pierre-Marie de Rodat
Cleanup related to handing of static expression functions in GNATprove. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch6.adb (Analyze_Expression_Function): Add variable to avoid repeated calls to Etype.diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb ---

[Ada] Decouple analysis of static expression functions from GNATprove

2021-07-09 Thread Pierre-Marie de Rodat
Analysis of static expression functions happened inside an IF branch guarded by GNATprove_Mode. Cleanup related to handling of static expression functions in GNATprove mode; behaviour is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch6.adb (Analyze_Express

[Ada] Reorder preanalysis of static expression functions

2021-07-09 Thread Pierre-Marie de Rodat
Group two variants of preanalysis of expression functions. Code cleanup related to handling of static expression functions in GNATprove. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch6.adb (Analyze_Expression_Function): Reorder code.diff --git a/gcc/ada/sem_ch6.adb b

[Ada] Update internal documentation of debugging information

2021-07-09 Thread Pierre-Marie de Rodat
This updates the documentation of the debugging information generated by the compiler present in the spec of the Exp_Dbug unit. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_dbug.ads: Update documentation of various items.diff --git a/gcc/ada/exp_dbug.ads b/gcc/ada/exp

[Ada] Incremental patch for restriction No_Dynamic_Accessibility_Checks

2021-07-09 Thread Pierre-Marie de Rodat
This patch corrects various issues discovered during testing of the No_Dynamic_Accessibility_Checks restriction leading to level miscalculation errors. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_util.ads (Type_Access_Level): Add new optional parameter Assoc_

[Ada] Inconsistency between declaration and body of predicate functions

2021-07-09 Thread Pierre-Marie de Rodat
We need to declare a predicate function along with its type but can only generate the body at freeze point which may be in a separate scope, leading to inconsistencies. So fix this by deferring the generation of the predicate function declaration and fix latent bugs uncovered along the way. While

[Ada] Initialize local variables related to static expression functions

2021-07-09 Thread Pierre-Marie de Rodat
Explicitly initialize local variables related to analysis of expression functions to prevent spurious checks from static analysers. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch6.adb (Analyze_Expression_Function): Initialize Orig_N and Typ variables.diff --g

[Ada] aarch64-rtems6: use wraplf variant for a-nallfl

2021-07-09 Thread Pierre-Marie de Rodat
Since newlib doesn't implement correctly long double, use the wraplf variant for a-nallfl. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * Makefile.rtl (LIBGNAT_TARGET_PAIRS) : Use the wraplf variant of Aux_Long_Long_Float.diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/

[Ada] Add paragraph about representation changes and Scalar_Storage_Order

2021-07-09 Thread Pierre-Marie de Rodat
This in particular documents the new warning given on overlays. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * doc/gnat_rm/implementation_defined_attributes.rst (Scalar_Storage_Order): Add paragraph about representation changes. * gnat_rm.texi: Regen

[Ada] Fix typo in comment related to derived discriminated types

2021-07-09 Thread Pierre-Marie de Rodat
Minor typo; found while fixing handling of tagged types in GNATprove. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_util.ads (Map_Types): Fix typo.diff --git a/gcc/ada/exp_util.ads b/gcc/ada/exp_util.ads --- a/gcc/ada/exp_util.ads +++ b/gcc/ada/exp_util.ads @@ -915,7 +

[Ada] Fix invalid JSON for derived variant record with -gnatRj

2021-07-09 Thread Pierre-Marie de Rodat
This prevents the output of -gnatRj from containing several "variant" fields for an extension with a variant part of a tagged type with a variant part. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * repinfo.ads (JSON output format): Document adjusted key name. * rep

[Ada] Fix layout of contracts

2021-07-09 Thread Pierre-Marie de Rodat
Fix layout of contracts in libgnat/a-strunb.ads and libgnat/a-strunb__shared.ads so that it is the same in both files. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/a-strunb.ads, libgnat/a-strunb__shared.ads: Fix layout in contracts.diff --git a/gcc/ada/lib

[Ada] Add source file name to gnat bug box

2021-07-09 Thread Pierre-Marie de Rodat
...in case Current_Error_Node is Empty, which will cause it to print "No source file position information available". At least now we have the file name being compiled. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * comperr.adb (Compiler_Abort): Print source file name.diff

[Ada] Declare time_t uniformly based on a system parameter

2021-07-09 Thread Pierre-Marie de Rodat
The declaration of time_t is in flux based on it's overflow in Year 2038, so declare it uniformly based on System.Parameter.time_t_bits to ease this transition and also enable VxWorks targets which allow it to be parameterized, to be rebuilt more easily by one source change. Two changes of note: s

[Ada] Crash on inlined separate subprogram

2021-07-09 Thread Pierre-Marie de Rodat
This patch fixes an issue in the compiler whereby a pragma Inline appearing after a subprogram body stub to which it applies and where no specification is present causes a compile time crash. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch6.adb (Check_Pragma_Inline):

[Ada] Add -gnatX support for casing on discriminated values

2021-07-09 Thread Pierre-Marie de Rodat
Improve existing support for the Ada extension feature of casing on composite values to handle casing on values that are discriminated or have discriminated subcomponents. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch5.adb (Expand_General_Case_Statement): Add new fu

[Ada] Crash on expansion of BIP construct in -gnatf mode

2021-07-09 Thread Pierre-Marie de Rodat
This patch fixes an issue in the compiler whereby an assignment to a limited interface access type causes a crash when the right hand side has an unresolvable function call in prefix notation and verbose errors are enabled via (-gnatf). Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/

[Ada] Improve performance of Ada.Containers.Doubly_Linked_Lists.Generic_Sorting.Sort

2021-07-09 Thread Pierre-Marie de Rodat
The previous implementation could exhibit quadratic behavior in some cases (e.g., if the input was already sorted or almost sorted). The new implementation uses an N log N worst case algorithm. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/a-cdlili.adb: Reimplement

[Ada] Add missed OS constant values

2021-07-09 Thread Pierre-Marie de Rodat
Add IPV6_FLOWINFO and IF_NAMESIZE values into generated package System.OS_Constants. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gsocket.h: Include net/if.h to get IF_NAMESIZE constant. * s-oscons-tmplt.c: Define IPV6_FLOWINFO for Linux.diff --git a/gcc/ada/gsock

[Ada] Fix crash on type extensions with discriminants

2021-07-09 Thread Pierre-Marie de Rodat
In Ada 2022 mode, the compiler crashes when generating the Put_Image function for a tagged type if the parent subtype is constrained. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_put_image.adb (Make_Component_Attributes): Use Implementation_Base_Type to get th

[Ada] par-ch6: do not mark subprogram as missing "is" if imported

2021-07-09 Thread Pierre-Marie de Rodat
Before this commit, the following piece of code: procedure Main is function F (X : access Integer) return Boolean with Import; begin null; end; Resulted in the following error messages: main.adb:2:59: error: ";" should be "is" main.adb:5:01: error: "end F;" expected main.adb:5:01: error: miss

[Ada] Fix style in expansion of attribute Put_Image

2021-07-09 Thread Pierre-Marie de Rodat
Style cleanup only. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_put_image.adb (Make_Put_Image_Name): Fix style. (Image_Should_Call_Put_Image): Likewise. (Build_Image_Call): Likewise.diff --git a/gcc/ada/exp_put_image.adb b/gcc/ada/exp_put_image.adb --

Re: [PATCH 10/10] vect: Reuse reduction accumulators between loops

2021-07-09 Thread Richard Sandiford via Gcc-patches
Thanks for the review. Richard Biener writes: >> @@ -588,6 +600,23 @@ public: >>/* Unrolling factor */ >>poly_uint64 vectorization_factor; >> >> + /* If this loop is an epilogue loop whose main loop can be skipped, >> + MAIN_LOOP_EDGE is the edge from the main loop to this loop's >>

Re: disable -Warray-bounds in libgo (PR 101374)

2021-07-09 Thread Maxim Kuvyrkov via Gcc-patches
> On 9 Jul 2021, at 09:16, Richard Biener via Gcc-patches > wrote: > > On Thu, Jul 8, 2021 at 8:02 PM Martin Sebor via Gcc-patches > wrote: >> >> Hi Ian, >> >> Yesterday's enhancement to -Warray-bounds has exposed a couple of >> issues in libgo where the code writes into an invalid constant >

Re: disable -Warray-bounds in libgo (PR 101374)

2021-07-09 Thread Rainer Orth
Hi Martin, >> Yesterday's enhancement to -Warray-bounds has exposed a couple of >> issues in libgo where the code writes into an invalid constant >> address that the warning is designed to flag. >> >> On the assumption that those invalid addresses are deliberate, >> the attached patch suppresses t

Re: [PATCH] c++: requires-expr with dependent extra args [PR101181]

2021-07-09 Thread Patrick Palka via Gcc-patches
On Thu, 8 Jul 2021, Jason Merrill wrote: > On 7/8/21 11:28 AM, Patrick Palka wrote: > > Here we're crashing ultimately because the mechanism for delaying > > substitution into a requires-expression (or constexpr if) doesn't > > expect to see dependent args. But we end up capturing dependent > > a

[PATCH v3 1/2] Add -f[no-]direct-extern-access

2021-07-09 Thread H.J. Lu via Gcc-patches
-fdirect-extern-access is the default. With -fno-direct-extern-access: 1. Always use GOT to access undefined data and function symbols, including in PIE and non-PIE. These will avoid copy relocations in executables. This is compatible with existing executables and shared libraries. 2.

[PATCH v3 0/2] Implement indirect external access

2021-07-09 Thread H.J. Lu via Gcc-patches
Changes in the v2 patch. 1. GNU_PROPERTY_1_NEEDED_INDIRECT_EXTERN_ACCESS support has been added to GNU binutils 2.38. But the -z indirect-extern-access linker option is only available for Linux/x86. However, the --max-cache-size=SIZE linker option was also addded within a day. --max-cache-size=

[PATCH v3 2/2] Add TARGET_ASM_EMIT_GNU_PROPERTY_NOTE

2021-07-09 Thread H.J. Lu via Gcc-patches
Generate the marker for -fno-direct-extern-access to indicate that the object file uses GOT to access all external symbols. Access to protected symbols in the resulting shared library is treated as local, which requires canonical function pointers and cannot be used with copy relocation. GNU_PROP

[PATCH] Change the type of memory classification functions to bool

2021-07-09 Thread Uros Bizjak via Gcc-patches
2021-07-09 Uroš Bizjak gcc/ * recog.c (memory_address_addr_space_p): Change the type to bool. Return true/false instead of 1/0. (offsettable_memref_p): Ditto. (offsettable_nonstrict_memref_p): Ditto. (offsettable_address_addr_space_p): Ditto. Change the type of addressp

Re: rs6000: Generate an lxvp instead of two adjacent lxv instructions

2021-07-09 Thread Segher Boessenkool
On Thu, Jul 08, 2021 at 08:26:45PM -0500, Peter Bergner wrote: > On 7/8/21 6:28 PM, Segher Boessenkool wrote: > >> int index = WORDS_BIG_ENDIAN ? i : nvecs - 1 - i; > >> -rtx dst_i = gen_rtx_REG (reg_mode, reg + index); > >> -emit_insn (gen_rtx_SET (dst_i, XVECEXP (src, 0,

Re: [PATCH v2 1/2] rs6000: Add support for _mm_minpos_epu16

2021-07-09 Thread Bill Schmidt via Gcc-patches
Hi Paul, On 6/8/21 2:11 PM, Paul A. Clarke via Gcc-patches wrote: Add a naive implementation of the subject x86 intrinsic to ease porting. "subject" won't be part of eventual commit, so please specify in commit blurb. 2021-06-08 Paul A. Clarke gcc/ChangeLog: * config/rs6000/smmin

Re: [PATCH v2 2/2] rs6000: Add test for _mm_minpos_epu16

2021-07-09 Thread Bill Schmidt via Gcc-patches
Hi Paul, On 6/8/21 2:11 PM, Paul A. Clarke via Gcc-patches wrote: Copy the test for _mm_minpos_epu16 from gcc/testsuite/gcc.target/i386/sse4_1-phminposuw.c, with a few adjustments: - Adjust the dejagnu directives for powerpc platform. - Make the data not be monotonically increasing, such tha

Re: [patch][version 4]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-07-09 Thread Martin Jambor
Hi, On Thu, Jul 08 2021, Qing Zhao wrote: > (Resend this email since the previous one didn’t quote, I changed one > setting in my mail client, hopefully that can fix this issue). > > Hi, Martin, > > Thank you for the review and comment. > >> On Jul 8, 2021, at 8:29 AM, Martin Jambor wrote: >>> di

Re: [PATCH] libffi/x86: Always check __x86_64__ for x86 hosts

2021-07-09 Thread H.J. Lu via Gcc-patches
On Mon, Jul 5, 2021 at 6:00 PM H.J. Lu wrote: > > Since for gnux32 hosts, -m32 generates i386 codes, always check __x86_64__ > for x86 hosts. > > PR libffi/101336 > * configure.host: Always check __x86_64__ for x86 hosts. > --- > libffi/configure.host | 21 +++-- >

Re: [Ada] Always translate Is_Pure flag into pure in C sense

2021-07-09 Thread Eric Botcazou
> Tested on x86-64/Linux, applied on the mainline, 11 and 10 branches. > > > 2021-05-21 Eric Botcazou > > * gcc-interface/decl.c (gnat_to_gnu_subprog_type): Always translate > the Is_Pure flag into the "pure" attribute of GNU C. This is the missing piece, applied on the same bran

Re: disable -Warray-bounds in libgo (PR 101374)

2021-07-09 Thread Martin Sebor via Gcc-patches
On 7/9/21 12:16 AM, Richard Biener wrote: On Thu, Jul 8, 2021 at 8:02 PM Martin Sebor via Gcc-patches wrote: Hi Ian, Yesterday's enhancement to -Warray-bounds has exposed a couple of issues in libgo where the code writes into an invalid constant address that the warning is designed to flag.

Re: [PATCH] Check type size for doloop iv on BITS_PER_WORD [PR61837]

2021-07-09 Thread Segher Boessenkool
On Fri, Jul 09, 2021 at 08:43:59AM +0200, Richard Biener wrote: > I wonder if there's a way to query the target what modes the doloop > pattern can handle (not being too familiar with the doloop code). You can look what modes are allowed for operand 0 of doloop_end, perhaps? Although that is a de

Re: [r12-2132 Regression] FAIL: g++.dg/warn/Warray-bounds-20.C -std=gnu++98 note (test for warnings, line 55) on Linux/x86_64

2021-07-09 Thread Martin Sebor via Gcc-patches
On 7/9/21 2:16 AM, Maxim Kuvyrkov via Gcc-patches wrote: On 9 Jul 2021, at 02:35, sunil.k.pandey via Gcc-patches wrote: On Linux/x86_64, a110855667782dac7b674d3e328b253b3b3c919b is the first bad commit commit a110855667782dac7b674d3e328b253b3b3c919b Author: Martin Sebor Date: Wed Jul 7 14:

[pushed] Darwin, config: Revise host config fragment.

2021-07-09 Thread Iain Sandoe
Hi, There were two uses for the Darwin host config fragment: The first is to arrange for targets that support mdynamic-no-pic to be built with that enabled (since it makes a significant difference to the compiler performance). We can be more specific in the application of this, since it only app

[pushed] coroutines: Fix a typo in rewriting the function.

2021-07-09 Thread Iain Sandoe
Hi, When amending the function re-write code, I made a typo in the block connections. This has not shown up in any test fails (as far as can be seen) but is a regression in debug info. Fixed thus. tested on x86_64-darwin, linux, pushed to master as obvious, I plan to back-port it where needed u

[pushed] coroutines: Factor code. Match original source location in helpers [NFC].

2021-07-09 Thread Iain Sandoe
Hi, This is primarily a source code refactoring, the only change is to ensure that the outlined functions are marked to begin at the same line as the original. Otherwise, they get the default (which seems to be input_location, which corresponds to the closing brace at the point that this is done)

[PATCH] coroutines: Adjust outlined function names [PR95520].

2021-07-09 Thread Iain Sandoe
Hi, The mechanism used to date for uniquing the coroutine helper functions (actor, destroy) was over-complicating things and leading to the noted PR and also difficulties in setting breakpoints on these functions (so this will help PR99215 as well). The revised mangling matches the form used by c

Re: Ping ^ 2: [PATCH] rs6000: Expand fmod and remainder when built with fast-math [PR97142]

2021-07-09 Thread will schmidt via Gcc-patches
On Wed, 2021-06-30 at 09:44 +0800, Xionghu Luo via Gcc-patches wrote: > Gentle ping ^2, thanks. > > https://gcc.gnu.org/pipermail/gcc-patches/2021-April/568143.html > > > On 2021/5/14 15:13, Xionghu Luo via Gcc-patches wrote: > > Test SPEC2017 Ofast P8LE for this patch : 511.povray_r +1.14%, > >

Re: [patch][version 4]add -ftrivial-auto-var-init and variable attribute "uninitialized" to gcc

2021-07-09 Thread Qing Zhao via Gcc-patches
Hi, > On Jul 9, 2021, at 11:18 AM, Martin Jambor wrote: >> >>> On Jul 8, 2021, at 8:29 AM, Martin Jambor wrote: diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index c05d22f3e8f1..35051d7c6b96 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -384,6 +384,13 @@ static str

[PATCH] c++: 'new T[N]' and SFINAE [PR82110]

2021-07-09 Thread Patrick Palka via Gcc-patches
Here we're failing to treat 'new T[N]' as erroneous in a SFINAE context when T isn't default constructible because expand_aggr_init_1 doesn't communicate to build_aggr_init (its only SFINAE caller) whether the initialization was actually successful. To fix this, this patch makes expand_aggr_init_1

[PATCH] c++: permit deduction guides at class scope [PR79501]

2021-07-09 Thread Patrick Palka via Gcc-patches
This adds support for declaring (class-scope) deduction guides for a member class template. Fortunately it seems only a couple of changes are needed in order for the existing CTAD machinery to handle them like any other deduction guide: we need to make sure to give them a FUNCTION_TYPE instead of

Re: [PATCH 05/55] rs6000: Add helper functions for parsing

2021-07-09 Thread will schmidt via Gcc-patches
On Thu, 2021-06-17 at 10:18 -0500, Bill Schmidt via Gcc-patches wrote: > 2021-06-07 Bill Schmidt > > gcc/ > * config/rs6000/rs6000-gen-builtins.c (consume_whitespace): New > function. > (advance_line): Likewise. > (safe_inc_pos): Likewise. > (match_identifier): Lik

Re: disable -Warray-bounds in libgo (PR 101374)

2021-07-09 Thread Martin Sebor via Gcc-patches
On 7/9/21 7:19 AM, Maxim Kuvyrkov wrote: On 9 Jul 2021, at 09:16, Richard Biener via Gcc-patches wrote: On Thu, Jul 8, 2021 at 8:02 PM Martin Sebor via Gcc-patches wrote: Hi Ian, Yesterday's enhancement to -Warray-bounds has exposed a couple of issues in libgo where the code writes into an

Re: [PATCH] c++: permit deduction guides at class scope [PR79501]

2021-07-09 Thread Jason Merrill via Gcc-patches
On 7/9/21 3:18 PM, Patrick Palka wrote: This adds support for declaring (class-scope) deduction guides for a member class template. Fortunately it seems only a couple of changes are needed in order for the existing CTAD machinery to handle them like any other deduction guide: we need to make sur

Re: [PATCH] c++: 'new T[N]' and SFINAE [PR82110]

2021-07-09 Thread Jason Merrill via Gcc-patches
On 7/9/21 3:01 PM, Patrick Palka wrote: Here we're failing to treat 'new T[N]' as erroneous in a SFINAE context when T isn't default constructible because expand_aggr_init_1 doesn't communicate to build_aggr_init (its only SFINAE caller) whether the initialization was actually successful. To fix

[PATCH] [PHIOPT/MATCH] Remove the statement to move if not used

2021-07-09 Thread apinski--- via Gcc-patches
From: Andrew Pinski Instead of waiting for DCE to remove the unused statement, and maybe optimize another conditional, it is better if we don't move the statement and have the statement removed. OK? Bootstrapped and tested on x86_64-linux-gnu. Changes from v1: * v2: Change the order of insertat

Re: [PATCH] c++: permit deduction guides at class scope [PR79501]

2021-07-09 Thread Patrick Palka via Gcc-patches
On Fri, 9 Jul 2021, Jason Merrill wrote: > On 7/9/21 3:18 PM, Patrick Palka wrote: > > This adds support for declaring (class-scope) deduction guides for a > > member class template. Fortunately it seems only a couple of changes > > are needed in order for the existing CTAD machinery to handle th

[pushed] c++: concepts TS and explicit specialization [PR101098]

2021-07-09 Thread Jason Merrill via Gcc-patches
duplicate_decls was not recognizing the explicit specialization as matching the implicit specialization of g because function_requirements_equivalent_p was seeing the C constraint on the implicit one and not on the explicit. I think that the usefulness of much of the concepts TS support is limited

Re: [PATCH] c++: permit deduction guides at class scope [PR79501]

2021-07-09 Thread Patrick Palka via Gcc-patches
On Fri, 9 Jul 2021, Patrick Palka wrote: > On Fri, 9 Jul 2021, Jason Merrill wrote: > > > On 7/9/21 3:18 PM, Patrick Palka wrote: > > > This adds support for declaring (class-scope) deduction guides for a > > > member class template. Fortunately it seems only a couple of changes > > > are needed

Re: [PATCH] c++: permit deduction guides at class scope [PR79501]

2021-07-09 Thread Marek Polacek via Gcc-patches
On Fri, Jul 09, 2021 at 04:18:34PM -0400, Patrick Palka via Gcc-patches wrote: > > > > --- a/gcc/cp/name-lookup.c > > > > +++ b/gcc/cp/name-lookup.c > > > > @@ -7110,9 +7110,14 @@ lookup_qualified_name (tree scope, tree name, > > > > LOOK_want want, bool complain) > > > > else if (cxx_dialect !

[PATCH]middle-e: GNU GCC version in graphviz dot data [PR83711]

2021-07-09 Thread Tjibbe Legering via Gcc-patches
Created this patch to add GCC version to the graph data for the options: -fdump-rtl-all-graph -fdump-tree-all-graph -fdump-ipq-all-graph -fcallgraph-info -fdump-analyzer-callgraph -fdump-analyzer-exploded-graph -fdump-analyzer-supergraph -fdump-analyzer-state-purge -fdump-analyzer-feasibility usi

Re: [PATCH] c++: permit deduction guides at class scope [PR79501]

2021-07-09 Thread Jason Merrill via Gcc-patches
On 7/9/21 4:18 PM, Patrick Palka wrote: On Fri, 9 Jul 2021, Patrick Palka wrote: On Fri, 9 Jul 2021, Jason Merrill wrote: On 7/9/21 3:18 PM, Patrick Palka wrote: This adds support for declaring (class-scope) deduction guides for a member class template. Fortunately it seems only a couple of

Re: [PATCH] coroutines: Adjust outlined function names [PR95520].

2021-07-09 Thread Jason Merrill via Gcc-patches
On 7/9/21 2:18 PM, Iain Sandoe wrote: Hi, The mechanism used to date for uniquing the coroutine helper functions (actor, destroy) was over-complicating things and leading to the noted PR and also difficulties in setting breakpoints on these functions (so this will help PR99215 as well). The rev

Re: [PATCH] c++: permit deduction guides at class scope [PR79501]

2021-07-09 Thread Patrick Palka via Gcc-patches
On Fri, 9 Jul 2021, Jason Merrill wrote: > On 7/9/21 4:18 PM, Patrick Palka wrote: > > On Fri, 9 Jul 2021, Patrick Palka wrote: > > > > > On Fri, 9 Jul 2021, Jason Merrill wrote: > > > > > > > On 7/9/21 3:18 PM, Patrick Palka wrote: > > > > > This adds support for declaring (class-scope) deducti

[PATCH libatomic/arm] avoid warning on constant addresses (PR 101379)

2021-07-09 Thread Martin Sebor via Gcc-patches
The attached tweak avoids the new -Warray-bounds instances when building libatomic for arm. Christophe confirms it resolves the problem (thank you!) As we have discussed, the main goal of this class of warnings is to detect accesses at addresses derived from null pointers (e.g., to struct members

Re: rs6000: Generate an lxvp instead of two adjacent lxv instructions

2021-07-09 Thread Peter Bergner via Gcc-patches
On 7/8/21 8:26 PM, Peter Bergner wrote: > We do need different code for LE versus BE. So you want something like > > if (WORDS_BIG_ENDIAN) {...} else {...} > > ...instead? I can try that to see if the code is easier to read. [snip] > Let me make the changes you want and I'll repost with what

Re: [PATCH 00/10] vect: Reuse reduction accumulators between loops

2021-07-09 Thread Kewen.Lin via Gcc-patches
Hi Richard, on 2021/7/8 下午8:38, Richard Sandiford via Gcc-patches wrote: > Quoting from the final patch in the series: > > > This patch adds support for reusing a main loop's reduction accumulator > in an epilogue loop. Thi

Re: disable -Warray-bounds in libgo (PR 101374)

2021-07-09 Thread Ian Lance Taylor via Gcc-patches
On Thu, Jul 8, 2021 at 11:16 PM Richard Biener wrote: > > On Thu, Jul 8, 2021 at 8:02 PM Martin Sebor via Gcc-patches > wrote: > > > > Hi Ian, > > > > Yesterday's enhancement to -Warray-bounds has exposed a couple of > > issues in libgo where the code writes into an invalid constant > > address t

Re: rs6000: Generate an lxvp instead of two adjacent lxv instructions

2021-07-09 Thread Peter Bergner via Gcc-patches
On 7/9/21 6:14 PM, Peter Bergner wrote: > ...code section. Does this look better? I'm currently running bootstraps > and regtests on LE and BE. Bootstrap and regtesting on both LE and BE showed no regressions. Peter