[pushed] libgcc, X86: Adjust guard for Mach-O code.

2021-09-22 Thread Iain Sandoe
Hi, Existing code in the sfp-machine header has been using __MACH__ as a guard for Mach-O, where currently symbols aliases are not supported. __MACH__ is not a sufficient guard for this, since the define is also emitted for HURD, at least. Fixed by amending the guard to use __APPLE__ instead. b

Re: [PATCH V3 0/6] Initial support for AVX512FP16

2021-09-22 Thread Iain Sandoe
Hi Joseph, Thomas, > On 21 Sep 2021, at 21:11, Joseph Myers wrote: > > On Fri, 3 Sep 2021, Iain Sandoe wrote: > >> given that: >> >> a) this fixes Darwin x86-64 bootstrap which has been broken for more than 24h >> b) the patch is now Darwin-local. > > Actually, it's not Darwin-local. It uses

[committed] openmp: Add support for allocator and align modifiers on allocate clauses

2021-09-22 Thread Jakub Jelinek via Gcc-patches
Hi! As the allocate-2.c testcase shows, this change isn't 100% backwards compatible, one could have allocate and/or align functions that return an OpenMP allocator handle and previously it would call those functions and now would use those names as keywords for the modifiers. But it allows specif

[committed] openmp: Fix OpenMP expansion of scope with non-fallthrugh body [PR102415]

2021-09-22 Thread Jakub Jelinek via Gcc-patches
Hi! I've used function for omp single expansion also for omp scope. That is mostly ok, but as the testcase shows, there is one important difference. The omp single expansion always has a fallthru body, because it during omp lowering expands the body as if wrapped in an if to simulate that one thr

[Committed] IBM Z: Fix PR102222

2021-09-22 Thread Andreas Krebbel via Gcc-patches
Avoid emitting a strict low part move if the insv target actually affects the whole target reg. Bootstrapped and regression tested on s390x. gcc/ChangeLog: PR target/10 * config/s390/s390.c (s390_expand_insv): Emit a normal move if it is actually a full copy of the so

Re: [PATCH 2/7] Do not query SCEV in range_of_phi unless dominators are available.

2021-09-22 Thread Richard Biener via Gcc-patches
On Tue, Sep 21, 2021 at 7:17 PM Aldy Hernandez via Gcc-patches wrote: > > > > On 9/21/21 7:05 PM, Andrew MacLeod wrote: > > On 9/21/21 12:53 PM, Aldy Hernandez wrote: > >> SCEV won't work without dominators and we can get called without > >> dominators from debug_ranger. > >> > >> Another option w

Re: [COMMITTED] Use EDGE_EXECUTABLE in ranger and return UNDEFINED for those edges.

2021-09-22 Thread Richard Biener via Gcc-patches
On Tue, Sep 21, 2021 at 3:50 PM Andrew MacLeod wrote: > > On 9/21/21 9:32 AM, Richard Biener wrote: > > On Tue, Sep 21, 2021 at 2:57 PM Andrew MacLeod wrote: > >> On 9/21/21 2:14 AM, Richard Biener wrote: > >>> On Tue, Sep 21, 2021 at 8:09 AM Richard Biener > >>> wrote: > On Tue, Sep 21, 20

[PATCH][GCC] aarch64: add armv9-a to -march

2021-09-22 Thread Przemyslaw Wirkus via Gcc-patches
Patch is adding new command line option 'armv9-a' to -march. OK for master? gcc/ChangeLog: 2021-09-22 Przemyslaw Wirkus * config/aarch64/aarch64-arches.def (AARCH64_ARCH): Added armv9-a. * config/aarch64/aarch64.h (AARCH64_FL_V9): New. (AARCH64_FL_FOR_ARCH9):

[PATCH][GCC] aarch64: enable cortex-a510 CPU

2021-09-22 Thread Przemyslaw Wirkus via Gcc-patches
Patch is adding 'cortex-a510' to -mcpu command line option. gcc/ChangeLog: 2021-09-02 Przemyslaw Wirkus * config/aarch64/aarch64-cores.def (AARCH64_CORE): New Cortex-A510 core. * config/aarch64/aarch64-tune.md: Regenerate. * doc/invoke.texi: Update docs. rb14

[PATCH][GCC] aarch64: enable cortex-a710 CPU

2021-09-22 Thread Przemyslaw Wirkus via Gcc-patches
Patch is adding 'cortex-a710' to -mcpu command line option. gcc/ChangeLog: 2021-09-02 Przemyslaw Wirkus * config/aarch64/aarch64-cores.def (AARCH64_CORE): New Cortex-A710 core. * config/aarch64/aarch64-tune.md: Regenerate. * doc/invoke.texi: Update docs. rb14

[PATCH][GCC] aarch64: enable cortex-x2 CPU

2021-09-22 Thread Przemyslaw Wirkus via Gcc-patches
Patch is adding 'cortex-x2' to -mcpu command line option. OK for master? gcc/ChangeLog: 2021-09-02 Przemyslaw Wirkus * config/aarch64/aarch64-cores.def (AARCH64_CORE): New Cortex-X2 core. * config/aarch64/aarch64-tune.md: Regenerate. * doc/invoke.texi: Update

Re: [PATCH] Fix loop split incorrect count and probability

2021-09-22 Thread Xionghu Luo via Gcc-patches
On 2021/8/11 17:16, Richard Biener wrote: On Wed, 11 Aug 2021, Xionghu Luo wrote: On 2021/8/10 22:47, Richard Biener wrote: On Mon, 9 Aug 2021, Xionghu Luo wrote: Thanks, On 2021/8/6 19:46, Richard Biener wrote: On Tue, 3 Aug 2021, Xionghu Luo wrote: loop split condition is moved be

[PATCH][GCC] arm: Enable Cortex-R52+ CPU

2021-09-22 Thread Przemyslaw Wirkus via Gcc-patches
Patch is adding Cortex-R52+ as 'cortex-r52plus' command line flag for -mcpu option. See: https://www.arm.com/products/silicon-ip-cpu/cortex-r/cortex-r52-plus OK for master? gcc/ChangeLog: 2021-09-22 Przemyslaw Wirkus * config/arm/arm-cpus.in: Add Cortex-R52+ CPU. * config/ar

[PATCH][GCC] arm: Add Cortex-R52+ multilib

2021-09-22 Thread Przemyslaw Wirkus via Gcc-patches
Patch is adding multilib entries for `cortex-r52plus` CPU. See: https://www.arm.com/products/silicon-ip-cpu/cortex-r/cortex-r52-plus OK for master? gcc/ChangeLog: 2021-09-16 Przemyslaw Wirkus * config/arm/t-rtems: Add "-mthumb -mcpu=cortex-r52plus -mfloat-abi=hard" multilib.

Re: [PATCH][GCC] arm: Enable Cortex-R52+ CPU

2021-09-22 Thread Ramana Radhakrishnan via Gcc-patches
This is OK Ramana On 22/09/2021, 09:45, "Przemyslaw Wirkus" wrote: Patch is adding Cortex-R52+ as 'cortex-r52plus' command line flag for -mcpu option. See: https://www.arm.com/products/silicon-ip-cpu/cortex-r/cortex-r52-plus OK for master? gcc/ChangeLog: 2021-09-22

Re: [Patch] Fortran: Improve -Wmissing-include-dirs warnings [PR55534]

2021-09-22 Thread Thomas Schwinge
Hi Tobias! On 2021-09-21T21:22:44+0200, Tobias Burnus wrote: > While the previous patch fixed -Wno-missing-include-dirs and sorted > out some inconsistencies with libcpp warnings, it had two issues: > > * Some superfluous warnings were printed, e.g. for > gfortran nonexisting/file.f90 >t

Re: [RFC] Don't move cold code out of loop by checking bb count

2021-09-22 Thread Richard Biener via Gcc-patches
On Thu, Sep 9, 2021 at 3:56 AM Xionghu Luo wrote: > > > > On 2021/8/26 19:33, Richard Biener wrote: > > On Tue, Aug 10, 2021 at 4:03 AM Xionghu Luo wrote: > >> > >> Hi, > >> > >> On 2021/8/6 20:15, Richard Biener wrote: > >>> On Mon, Aug 2, 2021 at 7:05 AM Xiong Hu Luo wrote: > > There

Re: [PATCH Take 2] More NEGATE_EXPR folding in match.pd

2021-09-22 Thread Richard Biener via Gcc-patches
On Fri, Sep 10, 2021 at 11:22 AM Roger Sayle wrote: > > > Hi Richard, > Thanks for suggestion, which cleanly solves the problem I was encountering. > This revised patch adds a Boolean simplify argument to tree-ssa-sccvn.c's > vn_nary_build_or_lookup_1 to control whether to simplification should be

Re: [PATCH 2/N] Do not hide asm_out_file in ASM_OUTPUT_ASCII.

2021-09-22 Thread Richard Biener via Gcc-patches
On Thu, Sep 16, 2021 at 12:01 PM Martin Liška wrote: > > Again a preparation patch that was tested on all cross compilers. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? I think you want to retain -FILE *_hide_asm_out_file = (MYFILE); a

Re: [PATCH][GCC] arm: Add Cortex-R52+ multilib

2021-09-22 Thread Richard Earnshaw via Gcc-patches
I think the RTEMS multilibs are based on the products that RTEMS supports, so this is really the RTEMS maintainers' call. Joel? On 22/09/2021 09:46, Przemyslaw Wirkus via Gcc-patches wrote: Patch is adding multilib entries for `cortex-r52plus` CPU. See: https://www.arm.com/products/silicon-ip

Re: [PATCH 3/N] Come up with casm global state.

2021-09-22 Thread Richard Biener via Gcc-patches
On Thu, Sep 16, 2021 at 3:12 PM Martin Liška wrote: > > This patch comes up with asm_out_state and a new global variable casm. > > Tested on all cross compilers. > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? * output.h (struct asm_out_

[Committed] IBM Z: TPF: Add cc clobber to profiling expanders

2021-09-22 Thread Andreas Krebbel via Gcc-patches
The code sequence emitted uses CC internally. gcc/ChangeLog: * config/s390/tpf.md (prologue_tpf, epilogue_tpf): Add cc clobber. --- gcc/config/s390/tpf.md | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gcc/config/s390/tpf.md b/gcc/config/s390/tpf.md index 297e9

Re: [PATCH 59/62] AVX512FP16: Support load/store/abs intrinsics.

2021-09-22 Thread Hongtao Liu via Gcc-patches
I'm going to check in 4 patches. [PATCH 59/62] AVX512FP16: Support load/store/abs intrinsics. [PATCH 60/62] AVX512FP16: Add reduce operators(add/mul/min/max). [PATCH 61/62] AVX512FP16: Add complex conjugation intrinsic instructions. [PATCH 62/62] AVX512FP16: Add permutation and mask blend intrinsi

Re: [committed] Make test names unique for a couple of goacc tests

2021-09-22 Thread Thomas Schwinge
Hi! On 2021-09-19T11:35:00-0600, Jeff Law via Gcc-patches wrote: > A couple of goacc tests do not have unique names. Thanks for fixing this up, and sorry, largely my "fault", I suppose. ;-| > This causes problems > for the test comparison script when one of the test passes and the other > fai

[COMMITTED] path solver: Use range_on_path_entry instead of looking at equivalences.

2021-09-22 Thread Aldy Hernandez via Gcc-patches
[Thanks for spotting this Andrew.] Cycling through equivalences to improve a range is nowhere near as efficient as asking the ranger what the range on entry is. Testing on a hybrid VRP threader, shows that this improves our VRP threading benefit from 14.5% to 18.5% and our overall jump threads fr

[COMMITTED] Check for BB before calling register_outgoing_edges.

2021-09-22 Thread Aldy Hernandez via Gcc-patches
We may be asked to fold an artificial statement not in the CFG. Since there are no outgoing edges from those, avoid calling register_outgoing_edges. Tested on x86-64 Linux. gcc/ChangeLog: * gimple-range-fold.cc (fold_using_range::range_of_range_op): Move check for non-empty BB h

Re: [PATCH] Obsolete hppa[12]*-*-hpux10* and hppa[12]*-*-hpux11*

2021-09-22 Thread John David Anglin
On 2021-09-20 3:00 a.m., Richard Biener wrote: > As discussed, I'm going to push this (and a changes.html entry) when > it was included in a bootstrap/regtest cycle. GCC 12 still builds on hppa2.0w-hp-hpux11.11 with --enable-obsolete: https://gcc.gnu.org/pipermail/gcc-testresults/2021-September/722

Re: [PATCH] Obsolete hppa[12]*-*-hpux10* and hppa[12]*-*-hpux11*

2021-09-22 Thread Richard Biener via Gcc-patches
On Wed, 22 Sep 2021, John David Anglin wrote: > On 2021-09-20 3:00 a.m., Richard Biener wrote: > > As discussed, I'm going to push this (and a changes.html entry) when > > it was included in a bootstrap/regtest cycle. > GCC 12 still builds on hppa2.0w-hp-hpux11.11 with --enable-obsolete: > https:/

Re: [COMMITTED] Use EDGE_EXECUTABLE in ranger and return UNDEFINED for those edges.

2021-09-22 Thread Andrew MacLeod via Gcc-patches
On 9/22/21 4:25 AM, Richard Biener wrote: On Tue, Sep 21, 2021 at 3:50 PM Andrew MacLeod wrote: On 9/21/21 9:32 AM, Richard Biener wrote: On Tue, Sep 21, 2021 at 2:57 PM Andrew MacLeod wrote: On 9/21/21 2:14 AM, Richard Biener wrote: On Tue, Sep 21, 2021 at 8:09 AM Richard Biener wrote: O

*PING* [PATCH] doc: improve -fsanitize=undefined description

2021-09-22 Thread Diane Meirowitz via Gcc-patches
Please review my patch. It is tiny. Thank you. Diane On 9/15/21, 5:02 PM, "Diane Meirowitz" wrote: doc: improve -fsanitize=undefined description gcc/ChangeLog: * doc/invoke.texi: add link to UndefinedBehaviorSanitizer documentation, mention UB

Re: [PATCH] Enable auto-vectorization at O2 with very-cheap cost model.

2021-09-22 Thread Martin Sebor via Gcc-patches
On 9/21/21 7:38 PM, Hongtao Liu wrote: On Mon, Sep 20, 2021 at 4:13 AM Martin Sebor wrote: ... diff --git a/gcc/testsuite/c-c++-common/Wstringop-overflow-2.c b/gcc/testsuite/c-c++-common/Wstringop-overflow-2.c index 1d79930cd58..9351f7e7a1a 100644 --- a/gcc/testsuite/c-c++-common/Wstringop-ov

Re: [PATCH] rs6000: Add psabi diagnostic for C++ zero-width bit field ABI change (PR102024)

2021-09-22 Thread will schmidt via Gcc-patches
On Tue, 2021-09-21 at 17:35 -0500, Bill Schmidt wrote: > Hi! > > Previously zero-width bit fields were removed from structs, so that otherwise > homogeneous aggregates were treated as such and passed in FPRs and VSRs. > This was incorrect behavior per the ELFv2 ABI. Now that these fields are no >

Re: [PATCH] c++: concept-ids and value-dependence [PR102412]

2021-09-22 Thread Patrick Palka via Gcc-patches
On Tue, 21 Sep 2021, Jason Merrill wrote: > On 9/21/21 09:30, Patrick Palka wrote: > > case TEMPLATE_ID_EXPR: > > - return concept_definition_p (TREE_OPERAND (expression, 0)); > > + return concept_definition_p (TREE_OPERAND (expression, 0)) > > + && any_dependent_template_argu

Re: [PATCH] rs6000: Add psabi diagnostic for C++ zero-width bit field ABI change (PR102024)

2021-09-22 Thread Bill Schmidt via Gcc-patches
On 9/22/21 9:35 AM, will schmidt wrote: On Tue, 2021-09-21 at 17:35 -0500, Bill Schmidt wrote: Hi! Previously zero-width bit fields were removed from structs, so that otherwise homogeneous aggregates were treated as such and passed in FPRs and VSRs. This was incorrect behavior per the ELFv2

[PATCH, Fortran] diagnostic for argument w/type parameters for assumed-type dummy

2021-09-22 Thread Sandra Loosemore
This patch is adds the missing diagnostic noted in PR fortran/101319. OK to commit? -Sandra commit 9d5b9062d728d1b1bf5acfb914e06d776bdcdb60 Author: Sandra Loosemore Date: Wed Sep 22 07:49:17 2021 -0700 Fortran: diagnostic for argument w/type parameters for assumed-type dummy 202

Re: [PATCH] rs6000: Add psabi diagnostic for C++ zero-width bit field ABI change (PR102024)

2021-09-22 Thread Jakub Jelinek via Gcc-patches
On Wed, Sep 22, 2021 at 09:43:23AM -0500, Bill Schmidt wrote: > > How previously? is this one that will need all the backports? > > No, the change happened recently on trunk. It is actually more complex. Both C and C++ FEs thought they were removing zero bit fields, but neither did that, then th

Re: [PATCH] Enable auto-vectorization at O2 with very-cheap cost model.

2021-09-22 Thread Martin Sebor via Gcc-patches
On 9/22/21 8:21 AM, Martin Sebor wrote: On 9/21/21 7:38 PM, Hongtao Liu wrote: On Mon, Sep 20, 2021 at 4:13 AM Martin Sebor wrote: ... diff --git a/gcc/testsuite/c-c++-common/Wstringop-overflow-2.c b/gcc/testsuite/c-c++-common/Wstringop-overflow-2.c index 1d79930cd58..9351f7e7a1a 100644 ---

[Ada] Mark gnatfind and gnatxref obsolete

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
Before removing them completely. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gnatfind.adb, gnatxref.adb: Mark these tools as obsolete before removing them completely.diff --git a/gcc/ada/gnatfind.adb b/gcc/ada/gnatfind.adb --- a/gcc/ada/gnatfind.adb +++ b/gcc/ada

[Ada] Change message format on missing return

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
To make it compatible with -gnatwE so that this warning is easier to spot when needed. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch6.adb (Check_Returns): Change message on missing return.diff --git a/gcc/ada/sem_ch6.adb b/gcc/ada/sem_ch6.adb --- a/gcc/ada/sem_ch6.a

[Ada] Make Ada.Task_Initialization compatible with No_Elaboration_Code_All

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
So that this unit can be used and called even before elaboration has started, to ensure very early registration via e.g. C code. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnarl/a-tasini.ads, libgnarl/a-tasini.adb: Make compatible with No_Elaboration_Code_All

[Ada] Fix imprecise wording for error on scalar storage order

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
The current error message does not distinguish the component clause case from the packed case, which can be confusing in the latter case. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * freeze.adb (Check_Component_Storage_Order): Give a specific error message for non

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

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
Improve existing support for the Ada extension feature of casing on composite values to handle casing on array values; in particular, casing on an array value whose subtype is unconstrained (or dynamically constrained) so that choices in the case statement may have differing lengths. This commit do

[Ada] Generate temporary for if-expression with -fpreserve-control-flow

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
When an if-expression is a condition in an outer decision, the compiler may entirely encode the interplay between the two decisions, i.e. the if-expression and the outer one, in the control-flow graph, effectively creating branches that are shared between the two decisions. This makes it very hard

[Ada] Replace use of 'Image with use of Error_Msg_Uint

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
'Image is too recent for bootstraping and shouldn't be used when emitting error messages in any case. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_case.adb (Composite_Case_Ops): Replace 'Image with Error_Msg_Uint.diff --git a/gcc/ada/sem_case.adb b/gcc/ada/sem

[Ada] VxWorks inconsistent use of return type (vx_freq_t)

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
Several inconsistencies were found. They will be submitted as separate proposed fixes. The approach is to make them "types" rather than "subtypes" in order to catch inconsistencies in their usage, and to declare them in a central package. System.VxWorks.Ext was chosen, the only difficulty with this

[Ada] VxWorks inconsistent use of return type (Int_Unlock)

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
Int_Unlock/intUnlock is incorrectly declared as a function. In the VxWorks headers intUnlock is type void. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnarl/s-osinte__vxworks.ads: Make procedure vice function. * libgnarl/s-vxwext.ads: Likewise. * libgn

[Ada] Fix obsolete comments/name referring to girder discriminants

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
This name was changed in 2002 to stored discriminants, but some comments and variable names were not converted. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * einfo.ads: Fix comments. * exp_aggr.adb: Fix variable name. * exp_util.adb: Fix comments. *

[Ada] Remove System.Img_Enum_New unit

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
It was still needed only because of bootstrap path considerations that are obsolete after the recent overhaul of the bootstrap process. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-imenne.ads, libgnat/s-imenne.adb: Delete. * gcc-interface/Make-lang.in (G

[Ada] Improve performance for case-insensitive regular expressions

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
An existing optimization substantially improves performance in the case of checking for pattern matches where all possible matches are known to start with the same character. Generalize this optimization to also apply in the case of a case-insensitive comparison (so that there are two possible init

[Ada] Allow more cases of import with Relaxed_RM_Semantics

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
Such as importing a package as was accepted by JGNAT, for use in analyzers such as SPARK or CodePeer. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_prag.adb (Process_Import_Or_Interface): Relax error when Relaxed_RM_Semantics.diff --git a/gcc/ada/sem_prag.adb b

[Ada] Fix access to predicated parent in Itype

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
Getter function Predicated_Parent expects to be called on subtypes only, which was not enforced always, possibly leading to assertion failures on compiler built with assertions. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch13.adb (Build_Predicate_Functions): Access

[Ada] More precise analysis of function renamings in GNATprove

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
When a function renaming has a contract, it is important for GNATprove that it is not treated as a simple wrapper, otherwise the link between the renamed function and its renaming is lost for proof. Instead, it should be treated as an expression function. There is no impact on compilation. Tested

[Ada] Removal of technical debt

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
This is an iterative patch as part of a greater project to reduce the amount of technical debt present in the frontend of the compiler. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * ali.adb, ali.ads (Scan_ALI): Remove use of deprecated parameter Ignore_ED, and all

[Ada] Fix infinite loop in compilation of illegal code

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
When rewriting a derived type declaration into a subtype declaration, the aspect specifications were shared in a way that made the aspect point to a node outside of the tree as parent node. This could lead to an infinite loop on illegal code using a non-static value for attribute Object_Size of the

[Ada] Add Package_Body helper routine to be used in GNATprove

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
We already had Subprogram_[Body|Spec|Specification] family of routines; now we also have a symmetrical Package_[Body|Spec|Specification] family. The added Package_Body routine is essentially moved from GNATprove, but for simplicity it doesn't support package body entities. Tested on x86_64-pc-lin

[Ada] VxWorks inconsistent use of return type (BOOL)

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
Type BOOL is made a new int to be consistent with the typedef used in the C header files. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnarl/s-vxwext.ads (BOOL): New int type. (Interrupt_Context): Change return type to BOOL. * libgnarl/s-vxwext__kernel.

[Ada] Add adequate guard before calling First_Rep_Item

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
New contracts on Ada.Strings.Bounded revealed an unprotected call to First_Rep_Item on a possibly empty node. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch13.adb (Build_Predicate_Functions): Add guard.diff --git a/gcc/ada/sem_ch13.adb b/gcc/ada/sem_ch13.adb --- a/gc

[Ada] Contracts written for the Ada.Strings.Bounded library

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
Written SPARK contracts describing the behaviours of all functions of the Ada.Strings.Bounded library. All contracts are replicated in Ada.Strings.Superbounded, the package that provides the explicit implementation of bounded strings. The contracts (with the exception of Trim, which uses search fun

[Ada] More flexibility in preprocessor

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
When using -gnatd.M (or in codepeer mode), we want to be more flexible in the preprocessor syntax, to accomodate better legacy toolchains. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * prep.adb (Preprocess): Allow for more flexibility when Relaxed_RM_Semantics is s

[Ada] VxWorks inconsistent use of return type (STATUS)

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
Type STATUS is made a new int with constants OK and ERROR declared. In code where ERROR clashes with an already defined integer value, the clashing variable is renamed to IERR. In other clashes where STATUS is a variable that variable is renamed. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] Update status of some attributes

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
These attributes are no longer GNAT specific. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * snames.ads-tmpl: Update status of some attributes.diff --git a/gcc/ada/snames.ads-tmpl b/gcc/ada/snames.ads-tmpl --- a/gcc/ada/snames.ads-tmpl +++ b/gcc/ada/snames.ads-tmpl @@ -963,

[Ada] Clarify parts of Ada.Strings.Unbounded in SPARK or not

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
Except for the Free procedure which should not be called in SPARK code (as it could be called on pointers to the stack), the rest of the public API of Ada.Strings.Unbounded is valid in SPARK. Mark the private part not in SPARK as it uses controlled types. Tested on x86_64-pc-linux-gnu, committed o

[Ada] Fix conformance errors and erroneous code

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
This patch fixes many cases where a formal parameter is declared as Node_Id on the spec, and Entity_Id on the body (and similar), which is illegal according to the conformance rules. It also removes some erroneous pragmas Suppress, and initializes the uninitialized variables that were being read.

[Ada] Spurious error on deferred constant with predicate

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
Do not insert a predicate check after a deferred constant declaration, as the constant is not elaborated at this point, but only at the point of its completion. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch3.adb (Analyze_Object_Declaration): Do not insert a

[Ada] Reuse routines for detecting attributes Old and Result

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
Code cleanup related to handling of attribute 'Old in Contract_Cases; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch4.adb (Expand_N_Op_Eq): Reuse Is_Attribute_Result. * exp_prag.adb (Expand_Attributes): Reuse Is_Attribute_Old.diff --g

[Ada] Simplify contract of Ada.Strings.Fixed.Trim for proof

2021-09-22 Thread Pierre-Marie de Rodat via Gcc-patches
Use of two nested existential quantications makes proof brittle. Use instead explicit values for the bounds given by Index_Non_Blank, like done in Ada.Strings.Bounded. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/a-strfix.ads (Trim): Simplify contracts. *

RE: [PATCH 1/5]AArch64 sve: combine inverted masks into NOTs

2021-09-22 Thread Tamar Christina via Gcc-patches
Hi, Sending a new version of the patch because I noticed the pattern was overriding the nor pattern. A second pattern is needed to capture the nor case as combine will match the longest sequence first. So without this pattern we end up de-optimizing nor and instead emit two nots. I did not fin

Re: [PATCH, Fortran] diagnostic for argument w/type parameters for assumed-type dummy

2021-09-22 Thread Tobias Burnus
On 22.09.21 16:58, Sandra Loosemore wrote: This patch is adds the missing diagnostic noted in PR fortran/101319. OK to commit? LGTM. Thanks! For reference, the F2018 wording is: "If the actual argument is of a derived type that has type parameters, type-bound procedures, or final subroutines,

[PATCH] top-level configure: setup target_configdirs based on repository

2021-09-22 Thread Andrew Burgess
The top-level configure script is shared between the gcc repository and the binutils-gdb repository. The target_configdirs variable in the configure.ac script, defines sub-directories that contain components that should be built for the target using the target tools. Some components, e.g. zlib, a

[PATCH 1/2] arm: add arm bti pass

2021-09-22 Thread Andrea Corallo via Gcc-patches
Hi all, this patch is part of a series that enables Armv8.1-M in GCC and adds Branch Target Identification Mechanism [1]. This patch moves and generalize the Aarch64 "bti" pass so it can be used also by the Arm backend. The pass iterates through the instructions and adds the necessary BTI instru

[PATCH] c++: improve dumping of templated decls

2021-09-22 Thread Patrick Palka via Gcc-patches
This makes the dumping routines output more information for templated decls, to help streamline debugging. Tested on x86_64-pc-linux-gnu, does this look OK for trunk? gcc/cp/ChangeLog: * ptree.c (cxx_print_decl): Dump the DECL_TEMPLATE_RESULT of a TEMPLATE_DECL. Dump the DECL_TE

[PATCH 2/2] arm: implement -mbranch-protection command line option

2021-09-22 Thread Andrea Corallo via Gcc-patches
Hi all, second patch of a series that enables Armv8.1-M in GCC adding Branch Target Identification Mechanism [1]. This patch implements the -mbranch-protection option. Possible values are "none", "bti" and "standard". When the provided value is "bti" o "standard" the bti pass is run. By defaut

Re: [PATCH] rs6000: Add psabi diagnostic for C++ zero-width bit field ABI change (PR102024)

2021-09-22 Thread Jakub Jelinek via Gcc-patches
On Wed, Sep 22, 2021 at 05:02:15PM +0200, Jakub Jelinek via Gcc-patches wrote: > > > > @@ -6298,7 +6298,8 @@ rs6000_aggregate_candidate (const_tree type, > > > > machine_mode *modep, > > > > return -1; > > > > count = rs6000_aggregate_candidate (TREE_TYPE (type), modep, > > > > -

Re: PING**2 – Re: [Patch] Fortran: Handle allocated() with coindexed scalars [PR93834] (was: [PATCH] PR fortran/93834 - [9/10/11/12 Regression] ICE in trans_caf_is_present, at fortran/trans-intrinsic.

2021-09-22 Thread Tobias Burnus
(1) PING**2 (2) However, as it causes for others test-suite fails,* the https://gcc.gnu.org/pipermail/gcc-patches/2021-September/579965.html [Patch] Fortran: Improve -Wmissing-include-dirs warnings [PR55534] is probably more important. [* I don't see it locally as it probably uses

[PATCH] assert that deleting by pointer to base in unique_ptr does not cause UB

2021-09-22 Thread Antony Polukhin via Gcc-patches
std::unique_ptr allows construction from std::unique_ptr of derived type as per [unique.ptr.single.asgn] and [unique.ptr.single.ctor]. If std::default_delete is used with std::unique_ptr, then after such construction a delete is called on a pointer to base. According to [expr.delete] calling a dele

Re: [PATCH] assert that deleting by pointer to base in unique_ptr does not cause UB

2021-09-22 Thread Ville Voutilainen via Gcc-patches
On Wed, 22 Sept 2021 at 20:09, Antony Polukhin via Libstdc++ wrote: > > std::unique_ptr allows construction from std::unique_ptr of derived > type as per [unique.ptr.single.asgn] and [unique.ptr.single.ctor]. If > std::default_delete is used with std::unique_ptr, then after such > construction a d

Re: [PATCH] assert that deleting by pointer to base in unique_ptr does not cause UB

2021-09-22 Thread Jonathan Wakely via Gcc-patches
On Wed, 22 Sept 2021 at 18:09, Antony Polukhin wrote: > > std::unique_ptr allows construction from std::unique_ptr of derived > type as per [unique.ptr.single.asgn] and [unique.ptr.single.ctor]. If > std::default_delete is used with std::unique_ptr, then after such > construction a delete is called

Re: [PATCH] Simplify paradoxical subreg extensions of TRUNCATE

2021-09-22 Thread Jeff Law via Gcc-patches
On 9/21/2021 6:01 AM, Richard Sandiford via Gcc-patches wrote: [Using this is a convenient place to reply to the thread as a whole] Richard Biener via Gcc-patches writes: On Mon, Sep 6, 2021 at 12:15 PM Segher Boessenkool wrote: On Sun, Sep 05, 2021 at 11:28:30PM +0100, Roger Sayle wrote:

Re: [PATCH] assert that deleting by pointer to base in unique_ptr does not cause UB

2021-09-22 Thread Antony Polukhin via Gcc-patches
ср, 22 сент. 2021 г. в 20:23, Ville Voutilainen : > > On Wed, 22 Sept 2021 at 20:09, Antony Polukhin via Libstdc++ > wrote: > > > > std::unique_ptr allows construction from std::unique_ptr of derived > > type as per [unique.ptr.single.asgn] and [unique.ptr.single.ctor]. If > > std::default_delete

Re: [PATCH] Simplify paradoxical subreg extensions of TRUNCATE

2021-09-22 Thread Jeff Law via Gcc-patches
On 9/21/2021 6:54 AM, Roger Sayle wrote: That define_insn is making my eyes bleed! I think that's the most convincing argument I've ever read on gcc-patches, and I can see now what Segher is so opposed to. Then you haven't seen enough patterns or your eyes haven't toughened up through the ye

Re: [PATCH] assert that deleting by pointer to base in unique_ptr does not cause UB

2021-09-22 Thread Ville Voutilainen via Gcc-patches
On Wed, 22 Sept 2021 at 20:49, Antony Polukhin wrote: > > ср, 22 сент. 2021 г. в 20:23, Ville Voutilainen : > > > > On Wed, 22 Sept 2021 at 20:09, Antony Polukhin via Libstdc++ > > wrote: > > > > > > std::unique_ptr allows construction from std::unique_ptr of derived > > > type as per [unique.ptr

Re: [PATCH] assert that deleting by pointer to base in unique_ptr does not cause UB

2021-09-22 Thread Antony Polukhin via Gcc-patches
ср, 22 сент. 2021 г. в 20:44, Jonathan Wakely : > > On Wed, 22 Sept 2021 at 18:09, Antony Polukhin wrote: > > > > std::unique_ptr allows construction from std::unique_ptr of derived > > type as per [unique.ptr.single.asgn] and [unique.ptr.single.ctor]. If > > std::default_delete is used with std::u

Re: [Patch] Fortran: Improve -Wmissing-include-dirs warnings [PR55534]

2021-09-22 Thread Harald Anlauf via Gcc-patches
Hi Tobias, Am 21.09.21 um 21:22 schrieb Tobias Burnus: While the previous patch fixed -Wno-missing-include-dirs and sorted out some inconsistencies with libcpp warnings, it had two issues: * Some superfluous warnings were printed, e.g. for     gfortran nonexisting/file.f90   there was a warni

[PATCH] Overhaul jump thread state in forward threader.

2021-09-22 Thread Aldy Hernandez via Gcc-patches
I've been pulling state from across the forward jump threader into the jt_state class, but it it still didn't feel right. The ultimate goal was to keep track of candidate threading paths so that the simplifier could simplify statements with the path as context. This patch completes the transition

Re: [PATCH] Objective-C: fix class_ro layout for non-LP64

2021-09-22 Thread Iain Sandoe
Hi Matt, thanks for the patch. > On 21 Sep 2021, at 23:29, Matt Jacobson via Gcc-patches > wrote: > > Fix class_ro layout for non-LP64. > On LP64, the requisite padding is added at a lower level. However, the behaviour is changed - the existing implementation is explicit about the field

Re: [PATCH V3 0/6] Initial support for AVX512FP16

2021-09-22 Thread Joseph Myers
On Wed, 22 Sep 2021, Iain Sandoe wrote: > However, note that the use of __MACH__ to guard the Mach-O code has been > there for a long time (it is present in all open branches). So it's possible > that has > been silently doing the wrong thing for some time, That's "wrong thing" as in having pre

Re: [PATCH] c++: error message for dependent template members [PR70417]

2021-09-22 Thread Jason Merrill via Gcc-patches
On 9/17/21 18:22, Anthony Sharp wrote: And also re-attaching the patch! On Fri, 17 Sept 2021 at 23:17, Anthony Sharp wrote: Re-adding gcc-patches@gcc.gnu.org. -- Forwarded message - From: Anthony Sharp Date: Fri, 17 Sept 2021 at 23:11 Subject: Re: [PATCH] c++: error message

Re: [PATCH] c++: improve dumping of templated decls

2021-09-22 Thread Jason Merrill via Gcc-patches
On 9/22/21 11:56, Patrick Palka wrote: This makes the dumping routines output more information for templated decls, to help streamline debugging. Tested on x86_64-pc-linux-gnu, does this look OK for trunk? OK. gcc/cp/ChangeLog: * ptree.c (cxx_print_decl): Dump the DECL_TEMPLATE_RESU

Re: [PATCH] c++: fix wrong fixit hints for misspelled typedef [PR77565]

2021-09-22 Thread Jason Merrill via Gcc-patches
On 9/21/21 20:53, Michel Morin wrote: On Tue, Sep 21, 2021 at 5:24 AM Jason Merrill wrote: On 9/17/21 13:31, Michel Morin wrote: On Fri, Sep 17, 2021 at 3:23 AM Jason Merrill wrote: On 9/16/21 11:50, Michel Morin wrote: On Thu, Sep 16, 2021 at 5:44 AM Jason Merrill wrote: On 9/14/21 04

Re: [PATCH] warn for more impossible null pointer tests [PR102103]

2021-09-22 Thread Jason Merrill via Gcc-patches
On 9/21/21 20:34, Martin Sebor wrote: On 9/21/21 3:40 PM, Jason Merrill wrote: On 9/17/21 12:02, Martin Sebor wrote: On 9/8/21 2:06 PM, Jason Merrill wrote: On 9/2/21 7:53 PM, Martin Sebor wrote: @@ -4622,28 +4622,94 @@ warn_for_null_address (location_t location, tree op, tsubst_flags_t compl

Re: [PATCH] rs6000: Add psabi diagnostic for C++ zero-width bit field ABI change (PR102024)

2021-09-22 Thread Bill Schmidt via Gcc-patches
Hi Jakub, On 9/22/21 11:33 AM, Jakub Jelinek wrote: On Wed, Sep 22, 2021 at 05:02:15PM +0200, Jakub Jelinek via Gcc-patches wrote: @@ -6298,7 +6298,8 @@ rs6000_aggregate_candidate (const_tree type, machine_mode *modep, return -1; count = rs6000_aggregate_candidate (TREE_TYPE

Re: [PATCH v3] Fix ICE when mixing VLAs and statement expressions [PR91038]

2021-09-22 Thread Jason Merrill via Gcc-patches
On 9/5/21 15:14, Uecker, Martin wrote: Here is the third version of the patch. This also fixes the index zero case. Thus, this should be a complete fix for 91038 and should fix all cases also supported by clang. Still not working is returning a struct of variable size from a statement expressi

Fortran: Improve file-reading error diagnostic [PR55534] (was: Re: [Patch] Fortran: Improve -Wmissing-include-dirs warnings [PR55534])

2021-09-22 Thread Tobias Burnus
Hi Harald, On 22.09.21 20:29, Harald Anlauf via Gcc-patches wrote: What I find a bit confusing - from the viewpoint of a user - is the case of using the preprocessor (-cpp), as one gets e.g. : Warning: ./no/such/dir: No such file or directory [-Wmissing-include-dirs] while without -cpp: f951:

Re: [PATCH] configure: Update --help output for --with-multilib-list

2021-09-22 Thread Jim Wilson
On Fri, Sep 17, 2021 at 4:39 AM Jonathan Wakely via Gcc-patches < gcc-patches@gcc.gnu.org> wrote: > The list of architectures that support the option is incomplete. > > gcc/ChangeLog: > > * configure.ac: Fix --with-multilib-list description. > * configure: Regenerate. > > OK for tr

Re: [PATCH] Overhaul jump thread state in forward threader.

2021-09-22 Thread Jeff Law via Gcc-patches
On 9/22/2021 12:41 PM, Aldy Hernandez wrote: I've been pulling state from across the forward jump threader into the jt_state class, but it it still didn't feel right. The ultimate goal was to keep track of candidate threading paths so that the simplifier could simplify statements with the pat

Re: [PATCH] rs6000: Modify the way for extra penalized cost

2021-09-22 Thread Segher Boessenkool
Hi! On Tue, Sep 21, 2021 at 11:24:08AM +0800, Kewen.Lin wrote: > on 2021/9/18 上午6:01, Segher Boessenkool wrote: > > On Thu, Sep 16, 2021 at 09:14:15AM +0800, Kewen.Lin wrote: > >> The way with nunits * stmt_cost can get one much exaggerated > >> penalized cost, such as: for V16QI on P8, it's 16 *

Re: [PATCH] c++: fix wrong fixit hints for misspelled typedef [PR77565]

2021-09-22 Thread Michel Morin via Gcc-patches
On Thu, Sep 23, 2021 at 5:09 AM Jason Merrill wrote: > > On 9/21/21 20:53, Michel Morin wrote: > > On Tue, Sep 21, 2021 at 5:24 AM Jason Merrill wrote: > >> > >> On 9/17/21 13:31, Michel Morin wrote: > >>> On Fri, Sep 17, 2021 at 3:23 AM Jason Merrill wrote: > > On 9/16/21 11:50, Miche

Re: [PATCH] rs6000: Add psabi diagnostic for C++ zero-width bit field ABI change (PR102024)

2021-09-22 Thread Segher Boessenkool
Hi! On Tue, Sep 21, 2021 at 05:35:56PM -0500, Bill Schmidt wrote: > Previously zero-width bit fields were removed from structs, so that > otherwise > homogeneous aggregates were treated as such and passed in FPRs and VSRs. > This was incorrect behavior per the ELFv2 ABI. Now that these fields ar

[PATCH] Fix null-pointer dereference in delete_dead_or_redundant_call [PR102451]

2021-09-22 Thread Feng Xue OS via Gcc-patches
Bootstrapped/regtested on x86_64-linux and aarch64-linux. Thanks, Feng --- 2021-09-23 Feng Xue gcc/ChangeLog: PR tree-optimization/102451 * tree-ssa-dse.c (delete_dead_or_redundant_call): Record bb of stmt before removal. --- gcc/tree-ssa-dse.c | 5 +++-- 1 file chang

[PATCH] Fix value uninitialization in vn_reference_insert_pieces [PR102400]

2021-09-22 Thread Feng Xue OS via Gcc-patches
Bootstrapped/regtested on x86_64-linux. Thanks, Feng --- 2021-09-23 Feng Xue gcc/ChangeLog PR tree-optimization/102400 * tree-ssa-sccvn.c (vn_reference_insert_pieces): Initialize result_vdef to zero value. --- gcc/tree-ssa-sccvn.c | 1 + 1 file changed, 1 insertion(+)

  1   2   >