[PATCH][testsuite] Fix PR91419

2019-08-13 Thread Richard Biener
The following fixes the observed regressions for targets not naturally aligning 'int'. I've figured we have natural_alignment_32 whose incomplete target list I amended by looking for BIGGEST_ALIGNMENT less than 32 (and for m68k-*-linux* asking the maintainer). Tested on x86_64-unknown-linux-gnu

[PATCH 0/3] mklog improvements

2019-08-13 Thread Martin Liska
Hi. I'm sending format independent changes to mklog that should improve the script. It addresses couple of improvement mentioned here: https://gcc.gnu.org/ml/gcc-patches/2019-08/msg00031.html Martin Martin Liska (3): Use argparse.ArgumentParser for mklog. mklog: parse PR references from new

[PATCH 3/3] mklog: Do not print changed functions in testsuite

2019-08-13 Thread Martin Liska
contrib/ChangeLog: 2019-08-13 Martin Liska * mklog: Do not print changed functions for testsuite files. --- contrib/mklog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/mklog b/contrib/mklog index 85242002357..1a0e82d1ddd 100755 --- a/contrib/mk

[PATCH 2/3] mklog: parse PR references from new test files

2019-08-13 Thread Martin Liska
contrib/ChangeLog: 2019-08-13 Martin Liska * mklog: Parse PR references from newly added test files. --- contrib/mklog | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/contrib/mklog b/contrib/mklog index e7a513fad5c..85242002357 1007

[PATCH 1/3] Use argparse.ArgumentParser for mklog.

2019-08-13 Thread Martin Liska
contrib/ChangeLog: 2019-08-02 Martin Liska * mklog: Use argparse instead of getopt. --- contrib/mklog | 73 ++- 1 file changed, 25 insertions(+), 48 deletions(-) diff --git a/contrib/mklog b/contrib/mklog index 15558cfbfe3..e7a513fad5c

Re: [PATCH] PR other/91396 Fix static link error with -fvtable-verify

2019-08-13 Thread Richard Biener
On Mon, 12 Aug 2019, Caroline Tice wrote: > Hi, > > This patch is to fix a bug where linking with -fvtable-verify and > -static causes the linker to complain about multiple definitions of > things in the vtv_end*.o files (once from the .o file and once from > libvtv.a). (See https://gcc.gnu.or

Re: [PATCH] Improve DSE to handle redundant zero initializations.

2019-08-13 Thread Richard Sandiford
Thanks for doing this. Matthew Beliveau writes: > diff --git gcc/tree-ssa-dse.c gcc/tree-ssa-dse.c > index 5b7c4fc6d1a..dcaeb8edbfe 100644 > --- gcc/tree-ssa-dse.c > +++ gcc/tree-ssa-dse.c > @@ -628,11 +628,8 @@ dse_optimize_redundant_stores (gimple *stmt) >tree fndecl; >if ((is_g

[Ada] Wrong initialization of Offset_To_Top in secondary DT

2019-08-13 Thread Pierre-Marie de Rodat
The compiler does not initialize well the runtime information required to perform at runtime interface conversions on derivations of tagged types that implement interfaces and have variable size components. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-13 Javier Miranda gcc/ada/

[Ada] Fix spurious error on nested instantiation with inlining

2019-08-13 Thread Pierre-Marie de Rodat
This prevents the compiler from issuing a spurious error in a convoluted case where a child generic package declared in an enclosing parent generic package, which contains a second child generic package, contains an inlined subprogram and the second child generic package contains an instantiation o

[Ada] Complete the more extended AST traversal used in GNATprove

2019-08-13 Thread Pierre-Marie de Rodat
Following the work on the Ada 202X feature of iterated aggregates (AI12-061), Loop_Actions should have been listed as a semantic field of nodes of kind N_Iterated_Component_Association. Fix this as well as the new extended AST traversal which should traverse these fields. There is no impact on co

[Ada] Add ability to list compiler switches with gnatcmd

2019-08-13 Thread Pierre-Marie de Rodat
This patch adds a new switch (--help-ada) to gnatcmd for displaying all the availible build flags as well as fixing some minor differences in output between implicit and explicit help for gnatcmd (e.g. "gnat" vs "gnat --help"). $ gnat GNAT Pro 20.0w (19940713) Copyright 1996-2019, Free Software Fo

[Ada] Fix bogus style check failure with pragma Style_Checks (Off)

2019-08-13 Thread Pierre-Marie de Rodat
This fixes a bogus style check failure for long lines in rare cases where the compiler is invoked, with a -gnatyX switch where X is neither 'm' nor 'M', on a unit which contains "with" clauses for other units that contain a pragma Style_Checks (Off). Tested on x86_64-pc-linux-gnu, committed on tru

[Ada] Fix incorrect binding to MapViewOfFile in s-win32.ads

2019-08-13 Thread Pierre-Marie de Rodat
Despite the "dw" prefix on the name, the dwNumberOfBytesToMap argument to MapViewOfFile was changed from DWORD to SIZE_T when 64bit Windows came about. This change adjusts the binding we have for it in System.Win32 accordingly. For consistency with established practice, an s-win32 specific version

[Ada] Disable anonymous allocator warning for library-level objects

2019-08-13 Thread Pierre-Marie de Rodat
This patch modifies the behavior of anonymous allocator warnings so that they no longer get triggered in the case of an object declaration at library-level. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-13 Justin Squirek gcc/ada/ * exp_ch4.adb (Expand_N_Allocator): Add co

[Ada] Do full name qualification of local exception names for LLVM

2019-08-13 Thread Pierre-Marie de Rodat
Exceptions declared within subprograms are associated with objects allocated statically (at the global level), and it's helpful for the LLVM compiler (and likely others, such as CCG) if the exception name is fully qualified, to avoid link name clashes (gcc-based GNAT has always "uniquified" these n

[Ada] Spurious error on nested instantiation

2019-08-13 Thread Pierre-Marie de Rodat
This fixes a spurious error given by the compiler for a call to a subprogram which is the formal subprogram parameter of a generic package, if the generic package is instantiated in the body of an enclosing generic package with two formal types and two formal subprogram parameter homonyms taking th

[Ada] Avoid crash in GNATprove due to inlining inside type

2019-08-13 Thread Pierre-Marie de Rodat
The special inlining for GNATprove should not inline calls inside record types, used for the constraints of components. There is no impact on compilation. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-13 Yannick Moy gcc/ada/ * sem_res.adb (Resolve_Call): Do not inline ca

[Ada] Compiler may blow up on array aggregates whose size is very large

2019-08-13 Thread Pierre-Marie de Rodat
The compiler may crash when compiling array aggregates where the computation of the size produces a very large number that overflows (possibly producing a small result), such as with an aggregate of a type that is an array of arrays, where each array range has close to Integer'Last elements. That c

[Ada] Avoid spurious errors on dimensionality checking in GNATprove

2019-08-13 Thread Pierre-Marie de Rodat
Complete the partial treatment that was started in r273405. Instead of checking for the special case of nodes inside inlined bodies at the call site, check for this condition inside the top-level procedures called for dimensionality checking. There is no impact on compilation. Tested on x86_64-p

[Ada] Fix spurious instantiation error on private record type

2019-08-13 Thread Pierre-Marie de Rodat
This change was initially aimed at fixing a spurious instantiation error due to a disambiguation issue which happens when a generic unit with two formal type parameters is instantiated on a single actual type that is private. The compiler internally sets the Is_Generic_Actual_Type flag on the actu

[Ada] Small cleanup and improvement in inlining machinery

2019-08-13 Thread Pierre-Marie de Rodat
This is a small cleanup in the inlining machinery of the front-end dealing with back-end inlining. It should save a few cycles at -O0 by stopping it from doing useless work. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-13 Eric Botcazou gcc/ada/ *

[Ada] Avoid crash in GNATprove_Mode on allocator inside type

2019-08-13 Thread Pierre-Marie de Rodat
In the special mode for GNATprove, subtypes should be declared for allocators when constraints are used. This was done previously but it does not work inside spec expressions, as the declaration is not inserted and analyzed in the AST in that case, leading to a later crash on an incomplete entity.

[Ada] Implement pragma Max_Entry_Queue_Length

2019-08-13 Thread Pierre-Marie de Rodat
This patch implements AI12-0164-1 for the aspect/pragma Max_Entry_Queue_Length. Previously, the GNAT specific pragma Max_Queue_Length fulfilled this role, but was not named to match the standard and thus was insufficent. -- Source -- -- pass.ads with System; package P

[Ada] Show Bit_Order and Scalar_Storage_Order in -gnatR4 output

2019-08-13 Thread Pierre-Marie de Rodat
This patch modifies the behavior of -gnatR4 so that representation information for bit and scalar storage order gets displayed in all cases and not just when defaults are overriden. -- Source -- -- pkg.ads package Pkg is type Root is tagged record Data0 : Integ

[Ada] Add conformance check on actual subp. in instance of child unit

2019-08-13 Thread Pierre-Marie de Rodat
This patch properly diagnoses a conformance error between a formal subprogram and the corresponding actual, when the instance is that of a child unit that is instantiated as a compilation unit. The error is normally suppressed on an instantiation nested within another generic, given that analysis o

[Ada] Build full derivation for private concurrent type

2019-08-13 Thread Pierre-Marie de Rodat
This extends the processing done for the derivation of private discriminated types to concurrent types, which is now required because this derivation is no longer redone when a subtype of the derived concurrent type is built. This increases the number of entities generated internally in the compil

[PATCH 0/3] Simplify wrapped binops.

2019-08-13 Thread Robin Dapp
Hi, after a long time I remembered to dig out this patch again. It deals with simplifying additions wrapped inside a cast like (larger_type)(var + const1) + const2 to (larger_type)(var + combined_const1_const2). The original pattern is created quite frequently on S/390 (see PR 69526) and manif

[PATCH 1/3] Perform fold when propagating.

2019-08-13 Thread Robin Dapp
This patch performs more aggressive folding in order for the match.pd changes to kick in later. Some test cases rely on VRP doing something which now already happens during CCP so adjust them accordingly. Also, the loop versioning pass was missing one case when deconstructing addresses that would

[PATCH 2/3] Add simplify rules for wrapped binary operations.

2019-08-13 Thread Robin Dapp
We would like to simplify code like (larger_type)(var + const1) + const2 to (larger_type)(var + combined_const1_const2) when we know that no overflow happens. --- gcc/match.pd | 101 +++ 1 file changed, 101 insertions(+) diff --git a/gcc/match.pd

[PATCH 3/3] Add new test cases for wrapped binop simplification.

2019-08-13 Thread Robin Dapp
--- .../gcc.dg/tree-ssa/copy-headers-5.c | 2 +- .../gcc.dg/tree-ssa/copy-headers-7.c | 2 +- .../gcc.dg/wrapped-binop-simplify-run.c | 52 .../gcc.dg/wrapped-binop-simplify-signed-1.c | 60 +++ .../wrapped-binop-simplify-unsigned-1.c

[Ada] Do not remove side-effects in an others_clause with function calls

2019-08-13 Thread Pierre-Marie de Rodat
An aggregate can be handled by the backend if it consists of static constants of an elementary type, or null. If a component is a type conversion we must preanalyze and resolve it to determine whether the ultimate value is in one of these categories. Previously we did a full analysis and resolutio

[Ada] Legality rule on ancestors of type extensions in generic bodies

2019-08-13 Thread Pierre-Marie de Rodat
This patch adds an RM reference for the rule that in a generic body a type extension cannot have ancestors that are generic formal types. The patch also extends the check to interface progenitors that may appear in a derived type declaration or private extension declaration. Tested on x86_64-pc-li

[Ada] Wrong dispatching call in type with aspect Implicit_Dereference

2019-08-13 Thread Pierre-Marie de Rodat
When a record type with an an access to class-wide type discriminant has aspect Implicit_Dereference, and the discriminant is used as the controlling argument of a dispatching call, the compiler may generate wrong code to dispatch the call. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-0

[PATCH, contrib]: Do not escape "=".

2019-08-13 Thread Uros Bizjak
Attached patch fixes the following gawk-5.0.1 warning: gawk: cmd. line:36: warning: regexp escape sequence `\=' is not a known regexp operator 2019-08-13 Uros Bizjak * test_summary: Do not escape "=". Tested by building mail-report.log with gawk-5.0.1 and gawk-4.2.1. OK for mainline? U

Re: [PATCH] PR fortran/91414: Improved PRNG

2019-08-13 Thread Janne Blomqvist
On Mon, Aug 12, 2019 at 11:23 PM Steve Kargl wrote: > > On Sun, Aug 11, 2019 at 12:37:49PM +0300, Janne Blomqvist wrote: > > Update the PRNG from xorshift1024* to xoshiro256** by the same > > author. For details see > > > > http://prng.di.unimi.it/ > > > > and the paper at > > > > https://arxiv.or

Re: [Patch v2] Enable math functions linking with static library for LTO

2019-08-13 Thread Richard Biener
On Tue, Aug 13, 2019 at 4:22 AM luoxhu wrote: > > Hi Richard, > > On 2019/8/12 16:51, Richard Biener wrote: > > On Mon, Aug 12, 2019 at 8:50 AM luoxhu wrote: > >> > >> Hi Richard, > >> Thanks for your comments, updated the v2 patch as below: > >> 1. Define and use builtin_with_linkage_p. > >> 2.

Re: [PATCH] Improve DSE to handle redundant zero initializations.

2019-08-13 Thread Richard Biener
On Tue, Aug 13, 2019 at 10:18 AM Richard Sandiford wrote: > > Thanks for doing this. > > Matthew Beliveau writes: > > diff --git gcc/tree-ssa-dse.c gcc/tree-ssa-dse.c > > index 5b7c4fc6d1a..dcaeb8edbfe 100644 > > --- gcc/tree-ssa-dse.c > > +++ gcc/tree-ssa-dse.c > > @@ -628,11 +628,8 @@ dse_optim

[C++ Patch] Improve grok_array_decl location

2019-08-13 Thread Paolo Carlini
Hi, for this error message about the types involved in array subscripting I think we can exploit the available location argument and point to the open square bracket instead of simply using input_location. Tested x86_64-linux. Thanks, Paolo Carlini. /cp 2019-08-13

Re: [MSP430][PATCH 1/2] Consolidate handling of hard-coded MCU data

2019-08-13 Thread Jozef Lawrynowicz
On Mon, 12 Aug 2019 14:30:06 -0600 Jeff Law wrote: > On 8/8/19 6:14 AM, Jozef Lawrynowicz wrote: > > This patch improves the handling of MCU data by consolidating multiple > > copies of hard-coded MCU data into a single location, and adds a new > > function > > to be used as a single entry point

Re: [PATCH 1/3] Perform fold when propagating.

2019-08-13 Thread Richard Biener
On Tue, Aug 13, 2019 at 10:36 AM Robin Dapp wrote: > > This patch performs more aggressive folding in order for the > match.pd changes to kick in later. > > Some test cases rely on VRP doing something which now already > happens during CCP so adjust them accordingly. > > Also, the loop versioning

Protect some checks of DECL_FUNCTION_CODE

2019-08-13 Thread Richard Sandiford
This patch protects various uses of DECL_FUNCTION_CODE that didn't obviously check for BUILT_IN_NORMAL first (either directly or in callers). They could therefore trigger for functions that either aren't built-ins or are a different kind of built-in. Also, the patch removes a redundant GIMPLE_CALL

Use checking forms of DECL_FUNCTION_CODE (PR 91421)

2019-08-13 Thread Richard Sandiford
We were shoe-horning all built-in enumerations (including frontend and target-specific ones) into a field of type built_in_function. This was accessed as either an lvalue or an rvalue using DECL_FUNCTION_CODE. The obvious danger with this (as was noted by several ??? comments) is that the ranges

Re: [AArch64] Add a "y" constraint for V0-V7

2019-08-13 Thread Richard Sandiford
James Greenhalgh writes: > On Wed, Aug 07, 2019 at 07:19:12PM +0100, Richard Sandiford wrote: >> Some indexed SVE FCMLA operations have a 3-bit register field that >> requires one of Z0-Z7. This patch adds a public "y" constraint for that. >> >> The patch also documents "x", which is again inten

Re: [MSP430][PATCH 2/2] Read MCU data from external file

2019-08-13 Thread Jozef Lawrynowicz
On Mon, 12 Aug 2019 14:34:39 -0600 Jeff Law wrote: > On 8/8/19 6:17 AM, Jozef Lawrynowicz wrote: > > This patch extends the MCU data handling so that MCU data can be provided > > in an external file (devices.csv). This means the compiler doesn't have to > > be > > updated and rebuilt to support

Re: [PATCH 2/3] Add simplify rules for wrapped binary operations.

2019-08-13 Thread Marc Glisse
On Tue, 13 Aug 2019, Robin Dapp wrote: +/* ((T)(A)) + CST -> (T)(A + CST) */ +#if GIMPLE + (simplify + (plus (convert SSA_NAME@0) INTEGER_CST@1) +(if (INTEGRAL_TYPE_P (TREE_TYPE (@0)) + && INTEGRAL_TYPE_P (type) I have become rather wary of INTEGRAL_TYPE_P recently because it i

[committed][AArch64] Make simd_immediate_info INDEX explicit

2019-08-13 Thread Richard Sandiford
This patch tweaks the representation of SVE INDEX instructions in simd_immediate_info so that it's easier to add new types of constant on top. Tested on aarch64-linux-gnu (with and without SVE) and aarch64_be-elf. Applied as r274371. Richard 2019-08-13 Richard Sandiford gcc/ * confi

[committed][AArch64] Use simd_immediate_info for SVE predicate constants

2019-08-13 Thread Richard Sandiford
This patch makes predicate constants use the normal simd_immediate_info machinery, rather than treating PFALSE and PTRUE as special cases. This makes it easier to add other types of predicate constant later. Tested on aarch64-linux-gnu (with and without SVE) and aarch64_be-elf. Applied as r274372.

Re: [patch, fortran] Some corrections for DO loop index warnings

2019-08-13 Thread Thomas Koenig
Hi Steve, Ok. If it regression cleanly on gcc9, go ahead an commit there as well. Committed to both (after doing a regression test on gcc 9 and also waiting for gcc-testresults containing the revision). Thanks for the review!

Re: [PATCH] Add --with-static-standard-libraries to the top level

2019-08-13 Thread Jonathan Wakely
On 08/08/19 14:53 -0600, Jeff Law wrote: On 8/5/19 12:02 PM, Tom Tromey wrote: gdb should normally not be linked with -static-libstdc++. Currently this has not caused problems, but it's incompatible with catching an exception thrown from a shared library -- and a subsequent patch changes gdb to

[committed][AArch64] Improve SVE constant moves

2019-08-13 Thread Richard Sandiford
If there's no SVE instruction to load a given constant directly, this patch instead tries to use an Advanced SIMD constant move and then duplicates the constant to fill an SVE vector. The main use of this is to support constants in which each byte is in { 0, 0xff }. Also, the patch prefers a simp

Optimise constant IFN_WHILE_ULTs

2019-08-13 Thread Richard Sandiford
This patch is a combination of two changes that have to be committed as a single unit, one target-independent and one target-specific: (1) Try to fold IFN_WHILE_ULTs with constant arguments to a VECTOR_CST (which is always possible for fixed-length vectors but is not necessarily so for var

Re: [PATCH 2/3] C++20 constexpr lib part 2/3 - swappish functions.

2019-08-13 Thread Jonathan Wakely
On 01/08/19 13:16 -0400, Ed Smith-Rowland via libstdc++ wrote: Greetings, Here is a patch for C++20 p0879 - Constexpr for swap and swap related functions. This essentially constexprifies the rest of . Built and tested with C++20 (and pre-c++20) on x86_64-linux. Ok? Regards, Ed Smith-Rowla

Re: [patch] handle casesi dispatch insns in create_trace_edges

2019-08-13 Thread Olivier Hainque
Hi Jeff, > On 12 Aug 2019, at 16:48, Jeff Law wrote: > I think part of the reason I settled on rtl.c was because we're not > really just looking at the form, not doing any real "analysis". BUt I > think either location for the implementation is fine. The reference to pc_rtx and to single_set t

Re: [PATCH 1/3] Perform fold when propagating.

2019-08-13 Thread Robin Dapp
> May I suggest to add a parameter to the substitute-and-fold engine > so we can do the folding on all stmts only when enabled and enable > it just for VRP? That also avoids the testsuite noise. Would something along these lines do? diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.

Re: [PATCH 2/3] Add simplify rules for wrapped binary operations.

2019-08-13 Thread Robin Dapp
> I have become rather wary of INTEGRAL_TYPE_P recently because it > includes enum types, which with -fstrict-enum can have a surprising > behavior. If I have > enum E { A, B, C }; > and e has type enum E, with -fstrict-enum, do your tests manage to > prevent (long)e+1 from becoming (long)(e+1) wit

Re: [PATCH] Come up with json::integer_number and use it in GCOV.

2019-08-13 Thread Martin Liška
On 8/2/19 2:40 PM, David Malcolm wrote: > Something that occurred to me reading the updated patch: maybe it would > make things easier to have utility member functions of json::object to > implicitly make the child, e.g.: > > void > json::object::set (const char *key, long v) > { >set (key, ne

[PATCH][1/2][i386] STV changes, DImode chain cost

2019-08-13 Thread Richard Biener
The following splits out the DImode chain cost changes from the patch adding SImode chain handling. There are two main parts: 1) fix REG_P (src) && REG_P (dst) costing which currently favors SSE because we use COSTS_N_INSNS based costs for GPR but move costs for SSE. 2) Use ix86_cost->ss

[PATCH][2/2][i386] STV changes, reg-copy as vector

2019-08-13 Thread Richard Biener
The following splits out the change that makes the live-range split / mode change copy pseudos vector mode pseudos. I've tried reproducing the issue I faced with SImode chains but failed likely because we're never using simple moves in the end while for SImode we can end up with (set (subreg:V4

Re: [PATCH][testsuite] Fix PR91419

2019-08-13 Thread Hans-Peter Nilsson
> From: Richard Biener > Date: Tue, 13 Aug 2019 09:50:34 +0200 > 2019-08-13 Richard Biener > > PR testsuite/91419 > * lib/target-supports.exp (natural_alignment_32): Amend target > list based on BIGGEST_ALIGNMENT. > (natural_alignment_64): Targets not natural_alignment

Re: [PATCH v3] Missed function specialization + partial devirtualization

2019-08-13 Thread Martin Liška
On 7/31/19 7:29 AM, luoxhu wrote: > This patch aims to fix PR69678 caused by PGO indirect call profiling > performance issues. > The bug that profiling data is never working was fixed by Martin's pull > back of topN patches, performance got GEOMEAN ~1% improvement. > Still, currently the default pr

[patch, fortran] Fix PR 90561

2019-08-13 Thread Thomas König
Hello world, this patch fixes a 9/10 regression by placing the variable used to hold a string length at function scope. I chose to implement this version of gfc_evaluate_now as a separate function because I have a sneaking suspicion this may not be the last time we are going to encounter somethi

Re: [PATCH v3] Missed function specialization + partial devirtualization

2019-08-13 Thread Martin Liška
And I would also suggest to come up with parameter that will drive minimum probability, maximum number of promotions and maybe minimal number of edge executions to consider a speculation. Clang provides all these: https://github.com/microsoft/llvm-1/blob/master/lib/Analysis/IndirectCallPromotionAn

[PATCH 3/3] Fix a test-case scan pattern.

2019-08-13 Thread Martin Liska
gcc/testsuite/ChangeLog: 2019-08-13 Martin Liska * c-c++-common/asan/memcmp-1.c: There's a new function in the stack-trace on the top. So shift expected output in stack trace. --- gcc/testsuite/c-c++-common/asan/memcmp-1.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 2/3] Reapply all revisions mentioned in LOCAL_PATCHES.

2019-08-13 Thread Martin Liska
libsanitizer/ChangeLog: 2019-08-13 Martin Liska * asan/asan_globals.cpp (CheckODRViolationViaIndicator): Reapply patch from trunk. (CheckODRViolationViaPoisoning): Likewise. (RegisterGlobal): Likewise. * asan/asan_mapping.h: Likewise. * sanitize

[PATCH 0/3] Libsanitizer: merge from trunk

2019-08-13 Thread Martin Liska
Hi. For this year, I decided to make a first merge now and the next (much smaller) at the end of October. The biggest change is rename of many files from .cc to .cpp. I bootstrapped the patch set on x86_64-linux-gnu and run asan/ubsan/tsan tests on x86_64, ppc64le (power8) and aarch64. Libasan

[PATCH] Improve documentation of target hooks for libc functions

2019-08-13 Thread Jonathan Wakely
* target.def (libc_has_function, libc_has_fast_function): Improve documentation strings. * doc/tm.texi: Regenerate. Bootstrapped x86_64-linux. OK for trunk? commit c3645cae6c78896218c60135349056a5bf943b8a Author: Jonathan Wakely Date: Tue Aug 13 14:01:01 2019 +0100

[PATCH 1/2] PR c++/91436 fix C++ dialect for std::make_unique fix-it hint

2019-08-13 Thread Jonathan Wakely
The std::make_unique function wasn't added until C++14, and neither was the std::complex_literals namespace. gcc/cp: PR c++/91436 * name-lookup.c (get_std_name_hint): Fix min_dialect field for complex_literals and make_unique entries. gcc/testsuite: PR c++/91436

[PATCH 2/2] Add more entries to the C++ get_std_name_hint array

2019-08-13 Thread Jonathan Wakely
This adds some commonly-used C++11/14 names, and some new C++17/20 names. The latter aren't available when using the -std=gnu++14 default, so the fix-it suggesting to use a newer dialect is helpful. * name-lookup.c (get_std_name_hint): Add more entries. Tested x86_64-linux. OK for trunk?

Re: [patch, fortran] Fix PR 90561

2019-08-13 Thread Paul Richard Thomas
Hi Thomas, Yes that's good to apply to 9 and 10 branches. I am certain that there are other places where the new function will be very helpful. Thanks for the patch. Paul On Tue, 13 Aug 2019 at 13:59, Thomas König wrote: > > Hello world, > > this patch fixes a 9/10 regression by placing the va

[PATCH] Update to MAINTAINERS

2019-08-13 Thread Mark Eggleston
I have added myself to the MAINTAINERS file. -- https://www.codethink.co.uk/privacy.html Index: MAINTAINERS === --- MAINTAINERS (revision 274379) +++ MAINTAINERS (working copy) @@ -371,6 +371,7 @@ Jason Eckhardt Bernd Edlinge

Re: [PATCH][2/2][i386] STV changes, reg-copy as vector

2019-08-13 Thread Uros Bizjak
On Tue, Aug 13, 2019 at 2:33 PM Richard Biener wrote: > > > The following splits out the change that makes the live-range split / > mode change copy pseudos vector mode pseudos. I've tried reproducing > the issue I faced with SImode chains but failed likely because we're > never using simple move

Re: [PATCH][2/2][i386] STV changes, reg-copy as vector

2019-08-13 Thread Richard Biener
On Tue, 13 Aug 2019, Uros Bizjak wrote: > On Tue, Aug 13, 2019 at 2:33 PM Richard Biener wrote: > > > > > > The following splits out the change that makes the live-range split / > > mode change copy pseudos vector mode pseudos. I've tried reproducing > > the issue I faced with SImode chains but

Re: C++ PATCH for c++/90473 - wrong code with nullptr in default argument

2019-08-13 Thread Jason Merrill
On 8/8/19 8:56 PM, Marek Polacek wrote: This is a wrong-code bug where we are throwing away the function call in the default argument here: void fn1 (void* p = (f(), nullptr)) { } and thus dropping the possible side-effects of that call to the floor. That happens because check_default_argum

Re: [C++ Patch] Improve start_function and grokmethod locations

2019-08-13 Thread Jason Merrill
On 8/9/19 7:46 AM, Paolo Carlini wrote: + error_at (id_loc, + "typedef may not be a function definition"); We might use the location of the typedef keyword. OK either way. Jason

Re: C++ PATCH for more checking of DECL_MUTABLE_P

2019-08-13 Thread Jason Merrill
On 8/10/19 2:57 PM, Marek Polacek wrote: Some preparatory work before adding constinit. mutable is only appropriate for FIELD_DECLs (when they're not static), but we've never made sure that we're not setting DECL_MUTABLE_P on a different _DECL. I mean to use DECL_LANG_FLAG_0 in a VAR_DECL for D

Re: [PATCH 0/3] Libsanitizer: merge from trunk

2019-08-13 Thread Jeff Law
On 8/13/19 7:07 AM, Martin Liska wrote: > Hi. > > For this year, I decided to make a first merge now and the > next (much smaller) at the end of October. > > The biggest change is rename of many files from .cc to .cpp. > > I bootstrapped the patch set on x86_64-linux-gnu and run > asan/ubsan/tsa

Re: C++ PATCH for c++/91416 - GC during late parsing collects live data

2019-08-13 Thread Jason Merrill
On 8/12/19 4:37 AM, Richard Biener wrote: On Sun, Aug 11, 2019 at 7:12 PM Marek Polacek wrote: This is a crash that points to a GC problem. Consider this test: __attribute__ ((unused)) struct S { S() { } } s; We're parsing a simple-declaration. While parsing the decl specs, we p

Re: [C++ Patch] Improve grok_array_decl location

2019-08-13 Thread Jason Merrill
On 8/13/19 5:22 AM, Paolo Carlini wrote: Hi, for this error message about the types involved in array subscripting I think we can exploit the available location argument and point to the open square bracket instead of simply using input_location. Tested x86_64-linux. Thanks, Paolo Carlini.

Re: [PATCH] Improve documentation of target hooks for libc functions

2019-08-13 Thread Jeff Law
On 8/13/19 7:24 AM, Jonathan Wakely wrote: > * target.def (libc_has_function, libc_has_fast_function): Improve > documentation strings. > * doc/tm.texi: Regenerate. > > Bootstrapped x86_64-linux. > > OK for trunk? > > OK jeff

Re: Protect some checks of DECL_FUNCTION_CODE

2019-08-13 Thread Jeff Law
On 8/13/19 3:34 AM, Richard Sandiford wrote: > This patch protects various uses of DECL_FUNCTION_CODE that didn't > obviously check for BUILT_IN_NORMAL first (either directly or in callers). > They could therefore trigger for functions that either aren't built-ins > or are a different kind of built

Re: [PATCH, contrib]: Do not escape "=".

2019-08-13 Thread Jeff Law
On 8/13/19 2:55 AM, Uros Bizjak wrote: > Attached patch fixes the following gawk-5.0.1 warning: > > gawk: cmd. line:36: warning: regexp escape sequence `\=' is not a > known regexp operator > > 2019-08-13 Uros Bizjak > > * test_summary: Do not escape "=". > > Tested by building mail-repo

Re: [PATCH] Improve DSE to handle redundant zero initializations.

2019-08-13 Thread Matthew Beliveau
Hello, This should have the changes you all asked for! Let me know if I missed anything! Thank you, Matthew Beliveau On Tue, Aug 13, 2019 at 5:15 AM Richard Biener wrote: > > On Tue, Aug 13, 2019 at 10:18 AM Richard Sandiford > wrote: > > > > Thanks for doing this. > > > > Matthew Beliveau wr

Re: [PATCH][RFC][x86] Fix PR91154, add SImode smax, allow SImode add in SSE regs

2019-08-13 Thread Jeff Law
On 8/9/19 7:00 AM, Richard Biener wrote: > On Fri, 9 Aug 2019, Richard Biener wrote: > >> On Fri, 9 Aug 2019, Richard Biener wrote: >> >>> On Fri, 9 Aug 2019, Uros Bizjak wrote: >>> On Mon, Aug 5, 2019 at 3:09 PM Uros Bizjak wrote: >> (define_mode_iterator MAXMIN_IMODE [SI "TARG

Re: [PATCH] Add --with-static-standard-libraries to the top level

2019-08-13 Thread Tom Tromey
Jonathan> What I don't understand is why GDB crashes. It should still be able to Jonathan> catch exceptions from a shared library even if linked to libstdc++.a, Jonathan> unless the static libstdc++.a is somehow incompatible with the shared Jonathan> libstdc++.so the shared lib linked to. Jonathan

Re: [PATCH][RFC][x86] Fix PR91154, add SImode smax, allow SImode add in SSE regs

2019-08-13 Thread Jeff Law
On 8/12/19 6:27 AM, Richard Biener wrote: > On Fri, 9 Aug 2019, Uros Bizjak wrote: > >> On Fri, Aug 9, 2019 at 3:00 PM Richard Biener wrote: >> (define_mode_iterator MAXMIN_IMODE [SI "TARGET_SSE4_1"] [DI "TARGET_AVX512F"]) and then we need to s

[PATCH] Add missing popcount simplifications (PR90693)

2019-08-13 Thread Wilco Dijkstra
Add simplifications for popcount (x) > 1 to (x & (x-1)) != 0 and popcount (x) == 1 into (x-1) gcc/ PR middle-end/90693 * match.pd: Add popcount simplifications. testsuite/ PR middle-end/90693 * gcc.dg/fold-popcount-5.c: Add new test. --- diff --git a/gcc/match.p

Re: [PATCH] Add missing popcount simplifications (PR90693)

2019-08-13 Thread Marc Glisse
On Tue, 13 Aug 2019, Wilco Dijkstra wrote: Add simplifications for popcount (x) > 1 to (x & (x-1)) != 0 and popcount (x) == 1 into (x-1) Is that true even on targets that have a popcount instruction? (-mpopcnt for x64) diff --git a/gcc/match.pd b/gcc/match.pd index 0317bc704f771f626ab7218

Re: [PATCH] Add missing popcount simplifications (PR90693)

2019-08-13 Thread Andrew Pinski
On Tue, Aug 13, 2019 at 8:50 AM Wilco Dijkstra wrote: > > Add simplifications for popcount (x) > 1 to (x & (x-1)) != 0 and > popcount (x) == 1 into (x-1) single-use cases and support an optional convert. A microbenchmark > shows a speedup of 2-2.5x on both x64 and AArch64. > > Bootstrap OK, OK f

Re: [PR other/79543] Fix GNU ld --version scanning to conform to the GNU Coding Standards

2019-08-13 Thread Joseph Myers
On Thu, 4 Jul 2019, Chung-Lin Tang wrote: > Bringing back this issue, as this is still bothering our OpenACC toolchains. > > If the main variance in format was the 2007 ' ' to '.' change for non-release > binutils builds, then is the attached patch okay? > > What the patch does is to first look

Re: [PATCH] Add generic support for "noinit" attribute

2019-08-13 Thread Christophe Lyon
Ping? On Tue, 30 Jul 2019 at 15:35, Christophe Lyon wrote: > > Hi, > > Thanks for the useful feedback. > > > On Tue, 16 Jul 2019 at 11:54, Richard Sandiford > wrote: > > > > Thanks for doing this in a generic way. > > > > Christophe Lyon writes: > > > @@ -2224,6 +2234,50 @@ handle_weak_attribut

Re: [PR other/79543] Fix GNU ld --version scanning to conform to the GNU Coding Standards

2019-08-13 Thread Rainer Orth
Hi Joseph, > However, I strongly encourage a followup to refactor this code > (*_CHECK_LINKER_FEATURES and *_ENABLE_SYMVERS that use it, not just the > fragment that determines the linker version number), which is evidently > duplicated far too much in different target library directories, into

[PATCH, i386]: Add missing *mmx_pextrb and *mmx_pextr{b,w}_zext patterns

2019-08-13 Thread Uros Bizjak
We can implement these for TARGET_MMX_WITH_SSE (and TARGET_SSE4_1 in case of.pextrb). 2019-08-13 Uroš Bizjak * config/i386/i386.md (ix86_expand_vector_extract) : Use vec_extr path for TARGET_MMX_WITH_SSE && TARGET_SSE4_1. : Ditto. * config/i386/mmx.md (*mmx_pextrw_zext): Rename

Re: Optimise constant IFN_WHILE_ULTs

2019-08-13 Thread Jeff Law
On 8/13/19 4:54 AM, Richard Sandiford wrote: > This patch is a combination of two changes that have to be committed as > a single unit, one target-independent and one target-specific: > > (1) Try to fold IFN_WHILE_ULTs with constant arguments to a VECTOR_CST > (which is always possible for fix

Re: [PATCH] PR fortran/87993 -- An array can have a kind type inquiry suffix

2019-08-13 Thread Steve Kargl
On Tue, Aug 13, 2019 at 09:53:34AM +0300, Janne Blomqvist wrote: > On Tue, Aug 13, 2019 at 3:35 AM Steve Kargl > wrote: > > > > The attached patch ahs been regression tested on x86_64-*-freebsd. > > It probably borders on obvious, but I'll ask away. OK to commit? > > > > 2019-08-12 Steven G. Kar

Re: Use checking forms of DECL_FUNCTION_CODE (PR 91421)

2019-08-13 Thread Jeff Law
On 8/13/19 3:36 AM, Richard Sandiford wrote: > We were shoe-horning all built-in enumerations (including frontend > and target-specific ones) into a field of type built_in_function. This > was accessed as either an lvalue or an rvalue using DECL_FUNCTION_CODE. > > The obvious danger with this (as

[patch, fortran, committed] Fix PR 90563, error while warning about do subscripts

2019-08-13 Thread Thomas Koenig
Hi, I just committed as simple and obvious the patch below. This fixes a 8/9/10 regression where a false positive with -Wdo-subscript (which we know about) was compounded by an also invalid error. Fixed by suppressing errors at the right time. I will also commit the patch to the other affected

Re: [PATCH] PR fortran/89647 -- Allow host associated procedure to be a binding target

2019-08-13 Thread Steve Kargl
On Tue, Aug 13, 2019 at 09:52:01AM +0300, Janne Blomqvist wrote: > On Tue, Aug 13, 2019 at 1:32 AM Steve Kargl > wrote: > > > > The attached patch fixes PR fortran/89647, and has been > > regression tested on x86_64-*-freebsd. > > > > If a procedure is made accessible by host association, the > >

[Darwin, committed] There is no need to distinguish PIC/non-PIC symbol stubs.

2019-08-13 Thread Iain Sandoe
As per $SUBJECT, We can use a single flag for both pic and non-pic. Rename this now, before a confusing name gets into the wild. Other than the name, this is NFC. tested on i686/powerpc/x86-64 darwin, x86_64-linux-gnu, powerpc64-linux-gnu applied to mainline. thanks Iain gcc/ 2019-08-13 Iain

Re: [PATCH][RFC][x86] Fix PR91154, add SImode smax, allow SImode add in SSE regs

2019-08-13 Thread H.J. Lu
On Tue, Aug 13, 2019 at 8:20 AM Jeff Law wrote: > > On 8/12/19 6:27 AM, Richard Biener wrote: > > On Fri, 9 Aug 2019, Uros Bizjak wrote: > > > >> On Fri, Aug 9, 2019 at 3:00 PM Richard Biener wrote: > >> > (define_mode_iterator MAXMIN_IMODE [SI "TARGET_SSE4_1"] [DI > "T

Re: [PATCH 1/2] PR c++/91436 fix C++ dialect for std::make_unique fix-it hint

2019-08-13 Thread Jason Merrill
On 8/13/19 9:32 AM, Jonathan Wakely wrote: * g++.dg/lookup/missing-std-include-6.C: Don't check make_unique in test that runs for C++11. I'm not comfortable removing this test coverage entirely. Doesn't it give a useful diagnostic in C++11 mode as well? Jason

  1   2   >