[PATCH] Fortran : Missing gcc-internal-format PR42693

2020-06-17 Thread Mark Eggleston
Please find attached patch for PR42693. OK to commit and backport? Fortran  : Missing gcc-internal-format PR42693 Messages in gfc_arith_error contain gcc internal format specifiers which should be enclosed in G_() in order to be correctly translated. 2020-06-17  Mark Eggleston gcc/fortran/

Re: [PATCH] avoid false positives due to compute_objsize (PR 95353)

2020-06-17 Thread Richard Biener via Gcc-patches
On Tue, Jun 16, 2020 at 9:35 PM Martin Sebor wrote: > > On 6/16/20 3:33 AM, Richard Biener wrote: > > On Mon, Jun 15, 2020 at 7:11 PM Martin Sebor via Gcc-patches > > wrote: > >> > >> On 6/14/20 12:37 PM, Jeff Law wrote: > >>> On Sat, 2020-06-13 at 17:49 -0600, Martin Sebor wrote: > On 6/13/

Re: [PATCH] Optimize V*QImode shift by constant using same operation on V*HImode [PR95524]

2020-06-17 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 17, 2020 at 09:43:53AM +0800, Hongtao Liu via Gcc-patches wrote: > gcc/ChangeLog: > PR target/95524 > * config/i386/i386-expand.c > (ix86_expand_vec_shift_qihi_constant): New function. > * config/i386/i386-protos.h > (ix86_expand_vec_shift_qihi_co

Re: [PATCH] avoid false positives due to compute_objsize (PR 95353)

2020-06-17 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 17, 2020 at 09:13:25AM +0200, Richard Biener via Gcc-patches wrote: > > Not doing the transformation I suggest at all, or not doing it in > > cases when the member does match the source? > > We are currently not treating different fields at the same offset as > "equal" before inlining

[Ada] Fix small fallout of change for 'Pos and 'Val attributes

2020-06-17 Thread Pierre-Marie de Rodat
The function Build_Conversion in Exp_Fixd does a bit of folding but fails to preserve the Conversion_OK flag in doing so, unlike other flags. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-17 Eric Botcazou gcc/ada/ * exp_fixd.adb (Build_Conversion): Also preserve the

[Ada] Optimize length checks generated for slice assignments

2020-06-17 Thread Pierre-Marie de Rodat
The purpose of this change is to enhance Optimize_Length_Comparison so that it optimizes the two length computations generated for the length check required for an assignment of array slices. It also ensures that the computations generated as part of the optimization are done without overflow chec

[Ada] Work around problematic interaction with public symbol generation

2020-06-17 Thread Pierre-Marie de Rodat
The previous change made to fold 'First and 'Last for constrained array types can go awry in the presence of layers of package instantiations because the referenced entities need to have a stable name if they are public and providing such a guarantee is not trivial in some cases. Therefore this ch

[Ada] Implement static expression functions for Ada 202x (AI12-0075)

2020-06-17 Thread Pierre-Marie de Rodat
AI12-0075 adds a new aspect Static that can be applied to expression functions to specify that the functions are static. When a static expression function is called with actual parameters that are static expressions, the function call is itself treated as a static expression and can be used in cont

[Ada] Fix comment of Get_Iterable_Type_Primitive

2020-06-17 Thread Pierre-Marie de Rodat
The comment for Get_Iterable_Type_Primitive didn't mention that it can be used for primitives Last and Previous. This happens when this routine is called from Build_Formal_Container_Iteration when analyzing a reverse iteration. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-17 Piotr T

[Ada] Remove unnecessary special-casing of GNATprove expansion

2020-06-17 Thread Pierre-Marie de Rodat
In GNATprove mode expansion is disabled; in terms of code, we have an invariant that GNATprove_Mode implies Expander_Active to be False. This renders conditions like "GNATprove_Mode or not Expander_Active" redundant, as they are equivalent to just "not Expander_Active". This patch removes this red

[Ada] Fix casing from GNATProve to GNATprove

2020-06-17 Thread Pierre-Marie de Rodat
The preferred casing is "GNATprove", i.e. "GNAT" in upper-case and "prove" in lower-case. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-17 Piotr Trojanek gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst, lib-writ.ads, par-prag.adb, sem_ch12.adb, sem_ch8.a

[Ada] Fix small oversight in change to Optimize_Length_Comparison

2020-06-17 Thread Pierre-Marie de Rodat
The previous change has introduced a type consistency issue when the length comparison boils down to a comparison of the upper bounds. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-17 Eric Botcazou gcc/ada/ * exp_ch4.adb (Optimize_Length_Comparison): Make sure the base

[Ada] Deal with second specific superflat case in Optimize_Length_Comparison

2020-06-17 Thread Pierre-Marie de Rodat
In the general case, the procedure Optimize_Length_Comparison goes to great lengths to make sure that it does not deal with superflat arrays because, in this case, the canonical formula of the length is not valid. The only such case that it accepts is a comparison against literal zero. This change

[Ada] Fix expansion of "for X of Y loop" in GNATprove

2020-06-17 Thread Pierre-Marie de Rodat
Expansion of "for X of Y loop" where Y is an array was differed in GNAT (where it was correct) and GNATprove (where it was wrong). Typically expansion is controlled by the Expander_Active variable. In GNATprove mode this variable is always False, so we need to explicitly enable expansion where req

[Ada] Ada2020: AI12-0110 Tampering checks are performed first

2020-06-17 Thread Pierre-Marie de Rodat
This patch implements AI12-0110-1, which requires tampering checks in the containers library to be performed first, before any other checks. In some cases, this patch causes cases where a check for no-op happens to be moved later, after checks. This is correcting bugs (the checks should happen eve

[Ada] Add assertions to Preserve_Comes_From_Source and reuse it

2020-06-17 Thread Pierre-Marie de Rodat
Routine Preserve_Comes_From_Source directly manipulated node tables without checking whether their arguments are valid and whether the node table is locked. Now it applies those checks. Also, this routine is now reused where possible. Semantics is unaffected. Tested on x86_64-pc-linux-gnu, committ

[Ada] Couple of small tweaks related to integer conversions

2020-06-17 Thread Pierre-Marie de Rodat
The first tweak is to change Get_Integer_Type, which is the routine used by Expand_N_Attribute_Reference to pick a small integer type for various attributes applied on enumeration types, to use the "standard" standard integer types instead of the standard integer types with a specific size. That's

[Ada] Support aspect Relaxed_Initialization on private types and constants

2020-06-17 Thread Pierre-Marie de Rodat
Aspect Relaxed_Initialization can now be attached to private types and deferred constants, but only to their private views. This is similar to the spirit of SPARK RM 6.9(9) for ghost aspect, which says: "[This rule is to ensure that the ghostliness of a visible entity can be determined without

[Ada] Ada_2020 AI12-0220 Pre/Postconditions on Access_To_Subprogram types

2020-06-17 Thread Pierre-Marie de Rodat
This patch completes the implementation of AI12-0220, which adds contracts to Access_To_Subprogram types. Attributes 'Old and 'Result are properly supported, and the needed subprogram wrapper is built before the contract aspects on the access type are analyzed, to simplify semantic checks. Tested

[Ada] Remove new problematic condition for LLVM

2020-06-17 Thread Pierre-Marie de Rodat
The new condition added for scalar types in the previous change for the sake of consistency with array types is apparently problematic for LLVM so this change removes it. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-17 Eric Botcazou gcc/ada/ * exp_attr.adb (Expand_N_Attr

[Ada] ACATS 4.1H - BA12018 - Missed errors for private with

2020-06-17 Thread Pierre-Marie de Rodat
GNAT was ignoring the 'private' keyword for parent packages implicitly withed from a subprogram unit, via a child unit. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-17 Arnaud Charlet gcc/ada/ * sem_ch10.adb (Expand_With_Clause): Add missing handling of N_Generic_

[Ada] Add early return to Apply_Universal_Integer_Attribute_Checks

2020-06-17 Thread Pierre-Marie de Rodat
The procedure Apply_Universal_Integer_Attribute_Checks is called from the expander when an attribute nominally returning Universal_Integer is seen so that, if resolution has determined another type for the result, then Universal_Integer is nevertheless forced on the attribute and a conversion is ad

[Ada] Small cleanup throughout CStand body

2020-06-17 Thread Pierre-Marie de Rodat
This mainly fixes a couple of inconsistencies in the way entities of the Standard package are built: first, some of them are built with a bare call to New_Standard_Entity and the name is only set afterwards, whereas others are built with a call to New_Standard_Entity with the name passed as argumen

[Ada] Do not give "bad indentation" error inside a declare_expression

2020-06-17 Thread Pierre-Marie de Rodat
In -gnatg mode, gnat complains "bad indentation" if a statement or declaration does not start in a column divisible by 3. This patch fixes a bug in which it complained similarly about a declare_expression, which is not a statement or declaration. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] Do not generate useless length check for array initialization

2020-06-17 Thread Pierre-Marie de Rodat
This prevents the compiler from generating a length check that can never fail for the initialization of an array whose nominal subtype is unconstrained and which is subject to an address clause. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-17 Eric Botcazou gcc/ada/ * che

[Ada] Additional legality rule for indexing operation for derived type

2020-06-17 Thread Pierre-Marie de Rodat
AI12-0160 clarifies the rules for nonoverridable aspects for indexing: when a derived type inherits a single indexing aspect (constant or variable) from a parent type, it cannot specify the other (non-inherited) indexing aspect. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-17 Ed Sch

[Ada] Nested subprograms in protected subprograms improperly handled in GNAT-LLVM

2020-06-17 Thread Pierre-Marie de Rodat
For GNAT-LLVM, subprograms nested within protected subprograms become part of the new unprotected body created by Build_Unprotected_Subprogram_Body, but the entity of the unprotected subprogram was not getting marked as Has_Nested_Subprogram, and the declarations now nested within the new body didn

[Ada] Ada2020: AI12-0279 more dispatching points with aspect Yield

2020-06-17 Thread Pierre-Marie de Rodat
This patch implements AI12-0279-1, which adds a Yield aspect applicable to a noninstance subprogram (including a generic formal subprogram), a generic subprogram, or an entry, to ensure that the associated subprogram encounters at least one task dispatching point during each invocation. Tested on

[Ada] Fix incorrect operand sharing after expansion

2020-06-17 Thread Pierre-Marie de Rodat
The Expand_N_Op_Expon procedure of the expander starts by relocating its operands, but later reuses the original right operand in the code generated in the modular case and, in particular, passes it to Duplicate_Subexpr, which is fooled into thinking that operands are not syntactical and thus does

[Ada] Crash in tagged type constructor with task components

2020-06-17 Thread Pierre-Marie de Rodat
This patch fixes regressions introduced in CodePeer on dispatching calls, fixes a latent problem in the decoration of the Extra_Formals attribute, and enforces checks on extra formals. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-17 Javier Miranda gcc/ada/ * exp_ch6.adb

[PATCH] gcc-changelog: Support 'Backported from master'.

2020-06-17 Thread Martin Liška
Hey. Jakub asked me to add 'Backported from master' heading to backports that were created from git cherry-pick -x. So it will newly generate: git gcc-verify e1d68582022cfa2b1dc76646724b397ba2739439 -p Checking e1d68582022cfa2b1dc76646724b397ba2739439: OK -- gcc/ChangeLog -- 2020-06-12

Re: [stage1][PATCH] Lower VEC_COND_EXPR into internal functions.

2020-06-17 Thread Richard Biener via Gcc-patches
On Mon, Jun 15, 2020 at 2:20 PM Martin Liška wrote: > > On 6/15/20 1:59 PM, Richard Biener wrote: > > On Mon, Jun 15, 2020 at 1:19 PM Martin Liška wrote: > >> > >> On 6/15/20 9:14 AM, Richard Biener wrote: > >>> On Fri, Jun 12, 2020 at 3:24 PM Martin Liška wrote: > > On 6/12/20 11:43 A

[PATCH] gcov*: collapse lisence header to 2 lines in --version. gcc/ChangeLog:

2020-06-17 Thread Martin Liška
Installed as obvious. Martin * gcov-dump.c (print_version): Collapse lisence header to 2 lines in --version. * gcov-tool.c (print_version): Likewise. * gcov.c (print_version): Likewise. --- gcc/gcov-dump.c | 5 ++--- gcc/gcov-tool.c | 5 ++--- gcc/gcov.c | 5

Re: [PATCH] gcc-changelog: Support 'Backported from master'.

2020-06-17 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 17, 2020 at 10:46:19AM +0200, Martin Liška wrote: > One minor limitation is that the timestamp (commit date) > of the original commit is lost so that's why we print: Why? You have the (cherry picked from commit 8cff672cb9a132d3d3158c2edfc9a64b55292b80) line, so you can git log -1 --fo

Re: [patch] fix PR lto/95604, -flto and -fcf-protection

2020-06-17 Thread Richard Biener via Gcc-patches
On Mon, Jun 15, 2020 at 5:30 PM Matthias Klose wrote: > > PR lto/95604 was seen when checking for binaries without having CET support > in a > distro archive, for binaries built with LTO optimization. The hardening flag > -fcf-protection=full is passed in CFLAGS, and maybe should be passed in >

[PATCH][RFC] vector creation from two parts of two vectors produces TBL rather than ins (PR93720)

2020-06-17 Thread Dmitrij Pochepko
The following patch enables vector permutations optimization by trying to use ins instruction instead of slow and generic tbl. example: #define vector __attribute__((vector_size(4*sizeof(float vector float f0(vector float a, vector float b) { return __builtin_shuffle (a, a, (vector int){3,

[committed] amdgcn: Switch to HSACO v3 binary format

2020-06-17 Thread Andrew Stubbs
This upgrades the compiler to emit HSA Code Object v3 binaries. This means changing the assembler directives, and linker command line options. The gcn-run and libgomp loaders need corresponding alterations. The relocations no longer need to be fixed up manually, and the kernel symbol names ha

Re: [PATCH] gcc-changelog: Support 'Backported from master'.

2020-06-17 Thread Martin Liška
On 6/17/20 10:58 AM, Jakub Jelinek wrote: On Wed, Jun 17, 2020 at 10:46:19AM +0200, Martin Liška wrote: One minor limitation is that the timestamp (commit date) of the original commit is lost so that's why we print: Why? You have the (cherry picked from commit 8cff672cb9a132d3d3158c2edfc9a64b

Re: [PATCH] gcc-changelog: Support 'Backported from master'.

2020-06-17 Thread Jakub Jelinek via Gcc-patches
On Wed, Jun 17, 2020 at 11:30:26AM +0200, Martin Liška wrote: > On 6/17/20 10:58 AM, Jakub Jelinek wrote: > > On Wed, Jun 17, 2020 at 10:46:19AM +0200, Martin Liška wrote: > > > One minor limitation is that the timestamp (commit date) > > > of the original commit is lost so that's why we print: > >

[PATCH v3] S/390: Improve storing asan frame_pc

2020-06-17 Thread Ilya Leoshkevich via Gcc-patches
Hello, This is a resend of v2 (rebased on the latest master). Previous discussions: v1: https://gcc.gnu.org/pipermail/gcc-patches/2019-July/525016.html v2: https://gcc.gnu.org/pipermail/gcc-patches/2019-July/525069.html Is there anything I need to change (e.g. in the naming area) to get this ch

Re: drop -aux{dir,base}, revamp -dump{dir,base}

2020-06-17 Thread Tobias Burnus
On 6/11/20 12:24 AM, Alexandre Oliva wrote: Let's see how far I can get by just looking at the code ;-) If I were to get something like a -v compile and link session, from someone all set for offloading compilation, with the command line passed to lto-wrapper and the full commands it runs, I mi

Re: [patch] fix PR lto/95604, -flto and -fcf-protection

2020-06-17 Thread H.J. Lu via Gcc-patches
On Wed, Jun 17, 2020 at 1:59 AM Richard Biener wrote: > > On Mon, Jun 15, 2020 at 5:30 PM Matthias Klose wrote: > > > > PR lto/95604 was seen when checking for binaries without having CET support > > in a > > distro archive, for binaries built with LTO optimization. The hardening > > flag > >

[PATCH] testsuite: clean up .gcov files in test-suite.

2020-06-17 Thread Martin Liška
Installed to master. There's still bunch of files that correspond to a system header files: ./gcc/testsuite/g++4/new.gcov ./gcc/testsuite/g++4/initializer_list.gcov ./gcc/testsuite/g++4/allocator.h.gcov ./gcc/testsuite/g++4/stl_iterator_base_funcs.h.gcov ... Martin gcc/testsuite/ChangeLog:

Re: [patch] fix PR lto/95604, -flto and -fcf-protection

2020-06-17 Thread Richard Biener
On Wed, 17 Jun 2020, H.J. Lu wrote: > On Wed, Jun 17, 2020 at 1:59 AM Richard Biener > wrote: > > > > On Mon, Jun 15, 2020 at 5:30 PM Matthias Klose wrote: > > > > > > PR lto/95604 was seen when checking for binaries without having CET > > > support in a > > > distro archive, for binaries built

Re: [patch] fix PR lto/95604, -flto and -fcf-protection

2020-06-17 Thread H.J. Lu via Gcc-patches
On Wed, Jun 17, 2020 at 5:00 AM Richard Biener wrote: > > On Wed, 17 Jun 2020, H.J. Lu wrote: > > > On Wed, Jun 17, 2020 at 1:59 AM Richard Biener > > wrote: > > > > > > On Mon, Jun 15, 2020 at 5:30 PM Matthias Klose wrote: > > > > > > > > PR lto/95604 was seen when checking for binaries without

Re: [patch] fix PR lto/95604, -flto and -fcf-protection

2020-06-17 Thread Richard Biener
On Wed, 17 Jun 2020, H.J. Lu wrote: > On Wed, Jun 17, 2020 at 5:00 AM Richard Biener wrote: > > > > On Wed, 17 Jun 2020, H.J. Lu wrote: > > > > > On Wed, Jun 17, 2020 at 1:59 AM Richard Biener > > > wrote: > > > > > > > > On Mon, Jun 15, 2020 at 5:30 PM Matthias Klose wrote: > > > > > > > > > >

Re: [patch] fix PR lto/95604, -flto and -fcf-protection

2020-06-17 Thread H.J. Lu via Gcc-patches
On Wed, Jun 17, 2020 at 5:33 AM Richard Biener wrote: > > On Wed, 17 Jun 2020, H.J. Lu wrote: > > > On Wed, Jun 17, 2020 at 5:00 AM Richard Biener wrote: > > > > > > On Wed, 17 Jun 2020, H.J. Lu wrote: > > > > > > > On Wed, Jun 17, 2020 at 1:59 AM Richard Biener > > > > wrote: > > > > > > > > >

Re: [PATCH v2] c++: ICE with IMPLICIT_CONV_EXPR in array subscript [PR95508]

2020-06-17 Thread Jason Merrill via Gcc-patches
On 6/16/20 5:10 PM, Marek Polacek wrote: On Thu, Jun 11, 2020 at 02:31:44PM -0400, Jason Merrill wrote: On 6/10/20 5:11 PM, Marek Polacek wrote: Since r10-7096 convert_like, when called in a template, creates an IMPLICIT_CONV_EXPR when we're converting to/from array type. In this test, we have

Re: [PATCH][RFC] Do not stream all zeros for gcda files.

2020-06-17 Thread Nathan Sidwell
On 6/17/20 2:44 AM, Martin Liška wrote: Hello. As mentioned in the PR, gcda files tend to occupy a large disk space when each running process streams to its own directory. The test-case in the PR has very low coverage and so that the data file contain a lot of zero records. The patch is attempt

[PATCH] tree-optimization/95717 - fix SSA update for vectorizer epilogue

2020-06-17 Thread Richard Biener
This fixes yet another issue with the custom SSA updating in the vectorizer when we copy from the non-if-converted loop. We must not mess with current defs before we updated the BB copies. Bootstrapped / tested on x86_64-unknown-linux-gnu, applied. 2020-06-17 Richard Biener PR tree-o

Re: [patch] fix PR lto/95604, -flto and -fcf-protection

2020-06-17 Thread Richard Biener
On Wed, 17 Jun 2020, H.J. Lu wrote: > On Wed, Jun 17, 2020 at 5:33 AM Richard Biener wrote: > > > > On Wed, 17 Jun 2020, H.J. Lu wrote: > > > > > On Wed, Jun 17, 2020 at 5:00 AM Richard Biener wrote: > > > > > > > > On Wed, 17 Jun 2020, H.J. Lu wrote: > > > > > > > > > On Wed, Jun 17, 2020 at 1:

Re: [stage1][PATCH] Lower VEC_COND_EXPR into internal functions.

2020-06-17 Thread Richard Biener via Gcc-patches
On Wed, Jun 17, 2020 at 10:50 AM Richard Biener wrote: > > On Mon, Jun 15, 2020 at 2:20 PM Martin Liška wrote: > > > > On 6/15/20 1:59 PM, Richard Biener wrote: > > > On Mon, Jun 15, 2020 at 1:19 PM Martin Liška wrote: > > >> > > >> On 6/15/20 9:14 AM, Richard Biener wrote: > > >>> On Fri, Jun 1

[committed] Fix use of inaccessible member in pr85503.C [PR95716]

2020-06-17 Thread Patrick Palka via Gcc-patches
The recent PR41437 fix exposed a latent use of an inaccessible member in the below testcase. Committed as obvious after verifying that the testcase no longer fails to compile due to the reported access error. gcc/testsuite/ChangeLog: PR testsuite/95716 * g++.dg/ext/pr85503.C: Giv

[PATCH] Use SLP_TREE_VECTYPE consistently

2020-06-17 Thread Richard Biener
This assigns SLP_TREE_VECTYPE to all SLP nodes and uses it when analyzing def operands. It does not deal with mismatches between SLP_TREE_VECTYPE and STMT_VINFO_VECTYPE yet - those cases are still rejected until I get to clean up the interaction with data reference groups. Bootstrapped on x86_64-

[PATCH] remove SLP_TREE_TWO_OPERATORS, add SLP permutation node

2020-06-17 Thread Richard Biener
This removes the SLP_TREE_TWO_OPERATORS hack in favor of having explicit SLP nodes for both computations and the blend operation. For this introduce a generic merge + select + permute SLP node (with implementation limits). Building upon earlier patches it adds vect_stmt_dominates_stmt_p and the ab

[Committed] IBM Z: Prevent mach optimization on doloop patterns

2020-06-17 Thread Andreas Krebbel via Gcc-patches
IBM z15. Committed to mainline. 2020-06-17 Andreas Krebbel gcc/ * config/s390/s390.c (s390_fix_long_loop_prediction): Exit early for PARALLELs. gcc/testsuite/ * gcc.target/s390/20200617.c: New test. --- gcc/config/s390/s390.c | 9 +++-- gcc

Re: [PATCH] RS6000 Add testlsbb (Test LSB by Byte) operations

2020-06-17 Thread will schmidt via Gcc-patches
On Tue, 2020-05-26 at 11:12 -0500, will schmidt wrote: > Hi, > > Add support for new instructions to test LSB by Byte. > > Tested on powerpc64le-unknown-linux-gnu with no > regressions. (power7BE, power8LE, power8BE, power9LE). > > [gcc] > > 2020-05-26 Will Schmidt > > * config/r

[PATCH][GCC-10 Backport] arm: Fix MVE scalar shift intrinsics code-gen.

2020-06-17 Thread Srinath Parvathaneni
Hello, This patch modifies the MVE scalar shift RTL patterns. The current patterns have wrong constraints and predicates due to which the values returned from MVE scalar shift instructions are overwritten in the code-gen. example: $ cat x.c int32_t foo(int64_t acc, int shift) { return sqrshrl_

Re: [PATCH] avoid false positives due to compute_objsize (PR 95353)

2020-06-17 Thread Martin Sebor via Gcc-patches
On 6/17/20 1:13 AM, Richard Biener wrote: On Tue, Jun 16, 2020 at 9:35 PM Martin Sebor wrote: On 6/16/20 3:33 AM, Richard Biener wrote: On Mon, Jun 15, 2020 at 7:11 PM Martin Sebor via Gcc-patches wrote: On 6/14/20 12:37 PM, Jeff Law wrote: On Sat, 2020-06-13 at 17:49 -0600, Martin Sebor

Re: [PATCH] c++: Fix bogus "does not declare anything" warning (PR 66159)

2020-06-17 Thread Jason Merrill via Gcc-patches
On 6/15/20 3:40 PM, Jonathan Wakely wrote: Ping ... G++ gives a bogus warning for 'struct A; using B = struct ::A;' complaining that the elaborated-type-specifier doesn't declare anything. That's true, but it's not trying to declare struct ::A, just refer to it unambiguously. Do not emit the w

Re: [PATCH] avoid false positives due to compute_objsize (PR 95353)

2020-06-17 Thread Richard Biener via Gcc-patches
On Wed, Jun 17, 2020 at 6:31 PM Martin Sebor wrote: > > On 6/17/20 1:13 AM, Richard Biener wrote: > > On Tue, Jun 16, 2020 at 9:35 PM Martin Sebor wrote: > >> > >> On 6/16/20 3:33 AM, Richard Biener wrote: > >>> On Mon, Jun 15, 2020 at 7:11 PM Martin Sebor via Gcc-patches > >>> wrote: > > >

Re: [PATCH] c++: Fix bogus "does not declare anything" warning (PR 66159)

2020-06-17 Thread Jonathan Wakely via Gcc-patches
On 17/06/20 12:32 -0400, Jason Merrill wrote: On 6/15/20 3:40 PM, Jonathan Wakely wrote: Ping ... G++ gives a bogus warning for 'struct A; using B = struct ::A;' complaining that the elaborated-type-specifier doesn't declare anything. That's true, but it's not trying to declare struct ::A, ju

Re: [PATCH] c++: Fix bogus "does not declare anything" warning (PR 66159)

2020-06-17 Thread Jason Merrill via Gcc-patches
On 6/17/20 12:49 PM, Jonathan Wakely wrote: On 17/06/20 12:32 -0400, Jason Merrill wrote: On 6/15/20 3:40 PM, Jonathan Wakely wrote: Ping ... G++ gives a bogus warning for 'struct A; using B = struct ::A;' complaining that the elaborated-type-specifier doesn't declare anything. That's true,

Re: [PATCH] vectorizer: add _bb_vec_info::const_iterator

2020-06-17 Thread Martin Liška
On 6/16/20 4:14 PM, Richard Sandiford wrote: Martin Liška writes: On 6/16/20 10:50 AM, Richard Sandiford wrote: Martin Liška writes: Also, one minor formatting nit, sorry: the other functions instead indent the “{” block by the same amount as the function prototype, which seems more consiste

Re: [PATCH][RFC] Do not stream all zeros for gcda files.

2020-06-17 Thread Martin Liška
On 6/17/20 2:57 PM, Nathan Sidwell wrote: On 6/17/20 2:44 AM, Martin Liška wrote: Hello. As mentioned in the PR, gcda files tend to occupy a large disk space when each running process streams to its own directory. The test-case in the PR has very low coverage and so that the data file contain a

[PATCH][GCC-10 Backport] arm: Fix the MVE ACLE vaddq_m polymorphic variants.

2020-06-17 Thread Srinath Parvathaneni
Hello, This patch fixes the MVE ACLE vaddq_m polymorphic variants by modifying the corresponding intrinsic parameters and vaddq_m polymorphic variant's _Generic case entries in "arm_mve.h" header file. Regression tested on arm-none-eabi and found no regressions. Ok for gcc-10 branch? Thanks,

Re: [PATCH] c-family: check qualifiers of arguments to __atomic built-ins (PR 95378)

2020-06-17 Thread Joseph Myers
On Tue, 16 Jun 2020, Jonathan Wakely via Gcc-patches wrote: > Currently the __atomic_{load,store,exchange,compare_exchange} built-ins > will happily store values through pointers to const, or use pointers to > volatile as the input and output arguments. This patch ensures that any > pointer that w

[PATCH][GCC]: Fix for PR94880: Failure to recognize andn pattern

2020-06-17 Thread Przemyslaw Wirkus
Hi, Pattern "(x | y) - y" can be optimized to simple "(x & ~y)" andn pattern. Bootstrapped and tested on aarch64-none-linux-gnu. OK for master ? Cheers, Przemyslaw gcc/ChangeLog: PR tree-optimization/94880 * match.pd (A | B) - B -> (A & ~B): New simplification. gcc/testsuite/

[PATCH] PR fortran/95687 - ICE in get_unique_hashed_string, at fortran/class.c:508

2020-06-17 Thread Harald Anlauf
Dominique reported a flaw in my initial patch (thanks!): I used XALLOCAVEC where I should have used XNEWVEC. This is rectified in the attached patch. > And yet ABRBG (another one by Gerhard) provoking a buffer overflow. > > Sigh. At least this time we caught it on master. > > Regtested on x86_64

[pushed] c++: Fix consteval operator handling.

2020-06-17 Thread Jason Merrill via Gcc-patches
We were crashing trying to find the CALL_EXPR in the result of a call to a consteval operator. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/cp/ChangeLog: * call.c (build_new_op_1): Don't look for a CALL_EXPR when calling a consteval function. gcc/testsuite/ChangeLog:

[pushed] c++: Add test for C++20 NB comment CA107.

2020-06-17 Thread Jason Merrill via Gcc-patches
We already implemented this, but it's good to have a test. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/concepts-ca107.C: New test. --- gcc/testsuite/g++.dg/cpp2a/concepts-ca107.C | 33 + 1 file changed, 33 insertions(+) create mode 100644 gcc/testsuite/g++.dg/cpp2a/conce

[pushed] c++: Treat in-class default/delete as definitions.

2020-06-17 Thread Jason Merrill via Gcc-patches
We were complaining about a constrained defaulted non-template friend in a template class because funcdef_flag wasn't set. grokdeclarator would set it for default/delete, but grokfield wasn't passing the 'initialized' values needed. Fixing that revealed some errors in existing tests that we weren

[pushed] c++: implicit operator== adjustments from P2002.

2020-06-17 Thread Jason Merrill via Gcc-patches
P2002R1, adopted at the February C++ meeting, made several refinements to the wording for operator<=>. This implements clarifications in how the implicit operator== is declared: as a duplicate of the operator<=>, with only the return type and name changed. To that end I factored out the declarati

Re: [PATCH PR95199 v2] vect: CSE for bump and offset in strided load/store operations

2020-06-17 Thread Richard Sandiford
"zhoukaipeng (A)" writes: > Bootstrapped and tested on aarch64-linux-gnu & x86_64-linux-gnu. Could you > please help install this patch? Thanks for the patch, now pushed. Richard

[PATCH] PR fortran/95707 - ICE in finish_equivalences, at fortran/trans-common.c:1319

2020-06-17 Thread Harald Anlauf
Another corner case of buffer overflows during name mangling found by Gerhard. We now check that the new buffer sizes suffice. The patch is on top of the patches for PRs 95687, 95688, 95689. Regtested on x86_64-pc-linux-gnu. OK for master / backports? Thanks, Harald PR fortran/95707 - ICE in

Re: [PATCH] c++: Fix bogus "does not declare anything" warning (PR 66159)

2020-06-17 Thread Jonathan Wakely via Gcc-patches
On 17/06/20 12:56 -0400, Jason Merrill wrote: On 6/17/20 12:49 PM, Jonathan Wakely wrote: On 17/06/20 12:32 -0400, Jason Merrill wrote: On 6/15/20 3:40 PM, Jonathan Wakely wrote: Ping ... G++ gives a bogus warning for 'struct A; using B = struct ::A;' complaining that the elaborated-type-sp

Re: [PATCH] vectorizer: add _bb_vec_info::const_iterator

2020-06-17 Thread Martin Sebor via Gcc-patches
On 6/17/20 11:05 AM, Martin Liška wrote: On 6/16/20 4:14 PM, Richard Sandiford wrote: Martin Liška writes: On 6/16/20 10:50 AM, Richard Sandiford wrote: Martin Liška writes: Also, one minor formatting nit, sorry: the other functions instead indent the “{” block by the same amount as the fun

[PATCH 01/28] rs6000: Initial create of rs6000-gen-builtins.c

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c: New. --- gcc/config/rs6000/rs6000-gen-builtins.c | 142 1 file changed, 142 insertions(+) create mode 100644 gcc/config/rs6000/rs6000-gen-builtins.c diff --git a/gcc/config/rs6000/rs6000-gen-built

[PATCH 02/28] rs6000: Add initial input files

2020-06-17 Thread Bill Schmidt via Gcc-patches
This patch adds a tiny subset of the built-in and overload descriptions. 2020-06-17 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: New. * config/rs6000/rs6000-overload.def: New. --- gcc/config/rs6000/rs6000-builtin-new.def | 178 +++ gcc/config/rs6000

[PATCH 07/28] rs6000: Add functions for matching types, part 3 of 3

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (restriction): New enum. (typeinfo): Add restriction field. (match_const_restriction): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 136 1 file changed, 136 insertions(+)

[PATCH 06/28] rs6000: Add functions for matching types, part 2 of 3

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (match_basetype): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 49 + 1 file changed, 49 insertions(+) diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6

[PATCH 03/28] rs6000: Add file support and functions for diagnostic support

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (bif_file): New filescope variable. (ovld_file): Likewise. (header_file): Likewise. (init_file): Likewise. (defines_file): Likewise. (pgm_path): Likewise. (bif_path): Li

[PATCH 10/28] rs6000: Parsing built-in input file, part 1 of 3

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (MAXBIFSTANZAS): New defined constant. (bif_stanzas): New filescope variable. (curr_bif_stanza): Likewise. (fnkinds): New enum. (typelist): New struct. (attrinfo): Likewise.

[PATCH 12/28] rs6000: Parsing built-in input file, part 3 of 3

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (parse_bif_attrs): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 84 + 1 file changed, 84 insertions(+) diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs

[PATCH 05/28] rs6000: Add functions for matching types, part 1 of 3

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (void_status): New enum. (basetype): Likewise. (typeinfo): New struct. (handle_pointer): New function. (match_basetype): New stub function. (match_const_restriction): Likewise.

[PATCH 04/28] rs6000: Add helper functions for parsing

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (MININT): New defined constant. (exit_codes): New enum. (consume_whitespace): New function. (advance_line): Likewise. (safe_inc_pos): Likewise. (match_identifier): Likewise.

[PATCH 09/28] rs6000: Main function with stubs for parsing and output

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (rbtree.h): New #include. (num_bif_stanzas): New filescope variable. (num_bifs): Likewise. (num_ovld_stanzas): Likewise. (num_ovlds): Likewise. (exit_codes): Add more enum values.

[PATCH 14/28] rs6000: Build and store function type identifiers

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (complete_vector_type): New function. (complete_base_type): Likewise. (construct_fntype_id): Likewise. (parse_bif_entry): Call construct_fntype_id. (parse_ovld_entry): Likewise. --- gc

[PATCH 15/28] rs6000: Write output to the vector definition include file

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (write_defines_file): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 4 1 file changed, 4 insertions(+) diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6000/rs6000-gen-builtins.c

[PATCH 17/28] rs6000: Write output to the builtins init file, part 1 of 3

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (write_fntype): New function. (write_fntype_init): New stub function. (write_init_bif_table): Likewise. (write_init_ovld_table): New function. (write_init_file): Implement. --- gcc/con

[PATCH 16/28] rs6000: Write output to the builtins header file

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (write_autogenerated_header): New function. (write_bif_enum): Likewise. (write_ovld_enum): Likewise. (write_decls): Likewise. (write_extern_fntype): Likewise. (write_header_file

[PATCH 18/28] rs6000: Write output to the builtins init file, part 2 of 3

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (write_init_bif_table): Implement. --- gcc/config/rs6000/rs6000-gen-builtins.c | 166 1 file changed, 166 insertions(+) diff --git a/gcc/config/rs6000/rs6000-gen-builtins.c b/gcc/config/rs6

[PATCH 19/28] rs6000: Write output to the builtins init file, part 3 of 3

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-gen-builtins.c (typemap): New struct. (TYPE_MAP_SIZE): New defined constant. (type_map): New filescope variable; initialize. (map_token_to_type_node): New function. (write_type_node): New function. (w

[PATCH 20/28] rs6000: Incorporate new builtins code into the build machinery

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config.gcc (powerpc*-*-*): Add rs6000-builtins.o to extra_objs. * config/rs6000/t-rs6000 (rs6000-gen-builtins.o): New target. (rbtree.o): Likewise. (rs6000-gen-builtins): Likewise. (rs6000-builtins.c): Likewise. (rs6000-b

[PATCH 23/28] rs6000: Add available-everywhere and ancient builtins

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add MASK_PPC_GFXOPT, MASK_POPCNTB, and MASK_CMPB builtins. --- gcc/config/rs6000/rs6000-builtin-new.def | 78 1 file changed, 78 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin

[PATCH 21/28] rs6000: Add remaining MASK_ALTIVEC builtins

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add remaining MASK_ALTIVEC builtins. --- gcc/config/rs6000/rs6000-builtin-new.def | 843 +++ 1 file changed, 843 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def b/gcc/confi

[PATCH 24/28] rs6000: Add Power7 builtins

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add MASK_POPCNTD builtins. --- gcc/config/rs6000/rs6000-builtin-new.def | 39 1 file changed, 39 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def b/gcc/config/rs6000/rs6000-bui

[PATCH 22/28] rs6000: Add MASK_VSX builtins

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add VSX builtins. --- gcc/config/rs6000/rs6000-builtin-new.def | 840 +++ 1 file changed, 840 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def b/gcc/config/rs6000/rs6000-builtin-new

[PATCH 25/28] rs6000: Add MASK_P8_VECTOR builtins

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add MASK_P8_VECTOR builtins. --- gcc/config/rs6000/rs6000-builtin-new.def | 417 +++ 1 file changed, 417 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def b/gcc/config/rs6000

[PATCH 26/28] rs6000: Add MASK_P9_VECTOR and MASK_P9_MISC builtins

2020-06-17 Thread Bill Schmidt via Gcc-patches
2020-06-17 Bill Schmidt * config/rs6000/rs6000-builtin-new.def: Add MASK_P9_VECTOR and MASK_P9_MISC builtins. --- gcc/config/rs6000/rs6000-builtin-new.def | 353 +++ 1 file changed, 353 insertions(+) diff --git a/gcc/config/rs6000/rs6000-builtin-new.def b/

  1   2   >