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

2020-06-16 Thread Martin Liška
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 to not stream these zero COUNTERS: a-tr

Re: [stage1][PATCH] Make TOPN counter dynamically allocated.

2020-06-16 Thread Martin Liška
PING^1 On 6/3/20 8:28 AM, Martin Liška wrote: On 6/2/20 3:19 PM, Martin Liška wrote: I'm suggesting to pre-allocate 16 gcov_kvp in the gcov run-time library. Please take a look at the attached patch. I also added a test-case that stresses that. I've just finished LTO PGO bootstrap of the GCC.

[PATCH] Fortran : ICE in gfc_validate_kind PR95586

2020-06-16 Thread Mark Eggleston
Please find attached fix for PR95586. OK to commit and backport? Proposed commit message: Fortran  :  ICE in gfc_validate_kind PR95586 Report syntax error for invalid letter-spec in IMPLICIT statements for derived types and not an ICE. Original patch by Steve Kargl.  Added test cases based on

Re: [PATCH] middle-end: Add another testcase for PR 95493

2020-06-16 Thread Richard Biener
On Tue, 16 Jun 2020, Jonathan Wakely wrote: > This was reported on the gcc-help mailing list. The regression started > with r10-589 and was fixed by r11-963. > > gcc/testsuite/ChangeLog: > > * g++.dg/torture/pr95493-1.C: New test. > > Tested x86_64-linux. OK for master? OK. Richard.

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

2020-06-16 Thread Hongtao Liu via Gcc-patches
Sorry,i mistakenly deleted local mail for https://gcc.gnu.org/pipermail/gcc-patches/2020-June/548174.html, so i send an another email. > What I mean is that op2 is a CONST_INT, which in theory can have any > HOST_WIDE_INT values. > By assigning that to unsigned int variable, you are effectively >

[PATCH 8/9] [OpenACC] Fix standalone attach for Fortran assumed-shape array pointers

2020-06-16 Thread Julian Brown
As mentioned in the blurb for the previous patch, an "attach" operation for a Fortran pointer with an array descriptor must copy that array descriptor to the target. This patch arranges for that to be so. OK? Julian ChangeLog gcc/fortran/ * trans-openmp.c (gfc_trans_omp_clauses

[PATCH 9/9] [OpenACC] Don't detach for no-op exit data with zero dynamic refcount

2020-06-16 Thread Julian Brown
This patch fixes a set of XFAILs in some recently-added patches by skipping a detach operation on "no-op" exit data operations for blocks with zero dynamic refcount. This takes advantage of the ordering of detach clauses with respect to associated data-movement clauses: i.e., they are grouped toge

[PATCH 7/9] [OpenACC] Do not strip GOMP_MAP_TO_PSET/GOMP_MAP_POINTER for enter/exit data directives

2020-06-16 Thread Julian Brown
When attaching pointers in Fortran, OpenACC 2.6 specifies that a descriptor must be copied to the target at the same time (see next patch). That means that stripping GOMP_MAP_TO_PSET (and lesserly, GOMP_MAP_POINTER), which was behaviour introduced by the manual deep-copy middle-end support patch,

[PATCH 6/9] [OpenACC] Set bias to zero for explicit attach/detach clauses in C and C++

2020-06-16 Thread Julian Brown
This is a fix for the pointer (or array) size inadvertently being used for the bias of attach and detach clauses (PR95270), for C and C++. OK? Julian ChangeLog PR middle-end/95270 gcc/c/ * c-typeck.c (c_finish_omp_clauses): Set OMP_CLAUSE_SIZE (bias) to zero for

[PATCH 5/9] [OpenACC] Fix incompatible copyout for acc_map_data (PR92843)

2020-06-16 Thread Julian Brown
This is a repost of the following: https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546333.html I made a minor edit to the ChangeLog, but the patch is otherwise unchanged. Including for completeness. OK? ChangeLog PR libgomp/92843 libgomp/ * oacc-mem.c (goacc_exit_d

[PATCH 3/9] [OpenACC] Adjust dynamic reference count semantics

2020-06-16 Thread Julian Brown
This is a new version of the patch last sent here: https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546332.html Minus the bits that Thomas has committed already (thanks!), and with adjustments to allow for GOMP_MAP_ATTACH being grouped together with a preceding clause. OK? Julian ChangeLog

[PATCH 4/9] [OpenACC] Don't pass kind array via pointer to goacc_enter_datum

2020-06-16 Thread Julian Brown
This is a minor cleanup for goacc_enter_datum. Unchanged from previous posting, but including for completeness: https://gcc.gnu.org/pipermail/gcc-patches/2020-May/546331.html OK? Julian ChangeLog libgomp/ * oacc-mem.c (goacc_enter_datum): Use scalar kind argument instead of

[PATCH 2/9] [OpenACC] GOMP_MAP_ATTACH handling in find_group_last

2020-06-16 Thread Julian Brown
Later patches in this series assume that GOMP_MAP_ATTACH will be grouped together with a preceding GOMP_MAP_TO_PSET or other "to" data movement clause, except in cases where an explicit "attach" clause is used. This patch arranges for that to be so. OK? Julian ChangeLog libgomp/

[PATCH 1/9] [OpenACC] Fortran derived-type mapping fix

2020-06-16 Thread Julian Brown
This is a slightly-updated version of the patch sent here, with some of Thomas's suggestions incorporated: https://gcc.gnu.org/pipermail/gcc-patches/2020-June/547407.html I'm still assuming this is approved, but including for completeness. Julian ChangeLog gcc/fortran/ * trans

[PATCH 0/9] [OpenACC] Refcounting and manual deep copy improvements

2020-06-16 Thread Julian Brown
This patch series collects several improvements/bugfixes to the reference counting and manual deep-copy implementation for OpenACC, mostly based on review feedback from Thomas. In short, areas addressed are: - Some unexpectedly-dead code in goacc_enter_data_internal introduced by "Adjust dyna

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

2020-06-16 Thread Jonathan Wakely via Gcc-patches
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 will be written through does not point to a const object, and only the

[committed] d: Consistently format quotations in comments.

2020-06-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch updates comments to consistently format quotations in code comments throughout the D front-end. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to master. Regards Iain gcc/d/ChangeLog: * d-builtins.cc: Update quotation formatting of comments.

[committed] d: Remove dependency on front-end File type for json and deps file generation.

2020-06-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch replaces some uses of File with FILE. Memory allocated by the DMD front-end is never freed due to the bump pointer allocator used internally. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to master. Regards Iain gcc/d/ChangeLog: * d-lang.cc (d_p

[committed] d: Remove dependency on front-end OutBuffer for diagnostic and deps file generation.

2020-06-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch replaces some uses of OutBuffer with obstack. Memory allocated by the DMD front-end is never freed due to the bump pointer allocator used internally. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to master. Regards Iain gcc/d/ChangeLog: * d-diag

[committed] d: Update code formatting in a consistent style.

2020-06-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch is a mechanical update of various formatting to make it consistent throughout the D front-end. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to master. Regards Iain gcc/d/ChangeLog: * d-attribs.cc: Update code formatting in a consistant style.

[committed] d: Use new isTypeXxxx helpers where possible.

2020-06-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch replaces uses of casting to Type nodes with the newly introduced isTypeXxxx functions. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to master. Regards Iain gcc/d/ChangeLog: * d-builtins.cc (d_eval_constant_expression): Use isTypeXxxx helpers

[committed] d: Remove names of unused function parameters.

2020-06-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch replaces ARG_UNUSED and ATTRIBUTE_UNUSED with unnamed parameters. As the unused attribute was being used incorrectly. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to master. Regards Iain gcc/d/ChangeLog: * d-attribs.cc (handle_noreturn_attribut

[committed] d: Use new isXxxxExp helpers where possible

2020-06-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch replaces uses of casting to Expression nodes with the newly introduced isXxxxExp functions. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to master. Regards Iain gcc/d/ChangeLog: * d-attribs.cc (build_attributes): Use isXxxxExp helpers instead of

Re: [PATCH] middle-end: Add another testcase for PR 95493

2020-06-16 Thread Jeff Law via Gcc-patches
On Tue, 2020-06-16 at 18:04 +0100, Jonathan Wakely via Gcc-patches wrote: > This was reported on the gcc-help mailing list. The regression started > with r10-589 and was fixed by r11-963. > > gcc/testsuite/ChangeLog: > > * g++.dg/torture/pr95493-1.C: New test. > > Tested x86_64-linux. OK f

[committed] d: Use toTypeFunction instead of explicit cast

2020-06-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch replaces uses of casting to TypeFunction with toTypeFunction, which takes care of asserting that `ty' is a `Tfunction'. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to master. Regards Iain gcc/d/ChangeLog: * d-frontend.cc (eval_builtin): Use toT

[committed] d: Use toStringExp instead of explicit cast

2020-06-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch replaces uses of casting to StringExp with toStringExp. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to master. Regards Iain gcc/d/ChangeLog: * d-attribs.cc (build_attributes): Use toStringExp instead of cast. * toir.cc (IRVisitor::visit

[committed] d: Move generation of array bounds error to own function.

2020-06-16 Thread Iain Buclaw via Gcc-patches
Hi, This patch moves a couple code duplications into its own routine, the checkAction global parameter is now initialized and properly adjusted. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to master. Regards Iain gcc/d/ChangeLog: * d-codegen.cc (build_array_b

[committed] libstdc++: Enforce copyable/movable checks in std::atomic

2020-06-16 Thread Jonathan Wakely via Gcc-patches
C++20 adds some new preconditions to std::atomic, which weren't previously checked by our implementation. * include/std/atomic (atomic): Add static assertions. * testsuite/29_atomics/atomic/requirements/types_neg.cc: New test. Tested powerpc64le-linux, committed to master. commit

[committed] libstdc++: Strip cv-qualifiers in std::atomic (PR 95282)

2020-06-16 Thread Jonathan Wakely via Gcc-patches
This improves the previous fix for PR 95282, and extends it to also apply to the exchange function (which has a similar problem and would become ill-formed with my proposed fix for PR 95378). PR libstdc++/95282 * include/bits/atomic_base.h (__atomic_impl::load): Use the _Val

Re: [PATCH 1/3] rs6000: Add base support and types for defining MMA built-ins.

2020-06-16 Thread will schmidt via Gcc-patches
On Tue, 2020-06-16 at 13:59 -0500, Peter Bergner wrote: > On 6/15/20 5:43 PM, will schmidt wrote: > > On Mon, 2020-06-15 at 14:56 -0500, Peter Bergner via Gcc-patches wrote: > > > * config/rs6000/rs6000-cpus.def (OTHER_FUTURE_MASKS): Add > > > OPTION_MASK_MMA. > > > (POWERPC_MASKS): Likewise.

Re: [PATCH 2/3] rs6000: Add MMA built-in function definitions

2020-06-16 Thread Peter Bergner via Gcc-patches
On 6/16/20 3:30 PM, Segher Boessenkool wrote: > We have had before > > * config/rs6000/rs6000.md (define_attr "type"): New type popcnt. > > and > > * config/rs6000/rs6000.md ('type' attribute): Add > veclogical,veccmpfx,vecexts,vecmove insn types. > > (Both are fine, dou

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

2020-06-16 Thread Marek Polacek via Gcc-patches
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 e[f], and we're converting

Re: [PATCH 6/6 ver 2] rs6000 Add vector blend, permute builtin support

2020-06-16 Thread will schmidt via Gcc-patches
On Mon, 2020-06-15 at 16:38 -0700, Carl Love via Gcc-patches wrote: > v2 changes: > >Updated ChangeLog per comments. > >define_expand "xxpermx", Updated implementation to use XOR Unclear.. Updated implementation of the xxpermx ? >(icode == CODE_FOR_xxpermx, fix comments and check

Re: [PATCH 2/3] rs6000: Add MMA built-in function definitions

2020-06-16 Thread Segher Boessenkool
Hi! On Tue, Jun 16, 2020 at 02:02:36PM -0500, Peter Bergner wrote: > On 6/15/20 5:43 PM, will schmidt wrote: > >>* config/rs6000/rs6000.md ('type' attribute): Add mma type. > > > > (mma) : New 'type' attribute. > > I just copied what someone else did, but agree this is more readable. > Will

Re: [PATCH 5/6 ver 2] rs6000, Add vector splat builtin support

2020-06-16 Thread will schmidt via Gcc-patches
On Mon, 2020-06-15 at 16:38 -0700, Carl Love via Gcc-patches wrote: > v2 changes: > > change log fixes > > gcc/config/rs6000/altivec changed name of define_insn and define_expand > for vxxspltiw... to xxspltiw... Fixed spaces in > gen_xxsplti32dx_v4sf_inst (operands[0], GEN_INT >

Re: [PATCH 4/6 ver 2] rs6000, Add vector shift double builtin support

2020-06-16 Thread will schmidt via Gcc-patches
On Mon, 2020-06-15 at 16:38 -0700, Carl Love via Gcc-patches wrote: > v2 fixes: > > change logs redone > > gcc/config/rs6000/rs6000-call.c - added spaces before parenthesis around > args. > > - > GCC maintainers: > > The follow

[PATCH] PR fortran/95688 - ICE in gfc_get_string, at fortran/iresolve.c:70

2020-06-16 Thread Harald Anlauf
Here's an almost obvious one on a testcase by Gerhard, which triggered an internal error since the buffer size was checked. By looking at the format string and arguments used in name mangling, I decided to stick with the simple approach of using a fixed size buffer, but larger. Regtested on x86_6

Re: [PATCH 2/6 ver 2] rs6000 Add vector insert builtin support

2020-06-16 Thread will schmidt via Gcc-patches
On Mon, 2020-06-15 at 16:37 -0700, Carl Love via Gcc-patches wrote: > v2 changes > > Fix change log entry for config/rs6000/altivec.h > > Fix change log entry for config/rs6000/rs6000-builtin.def > > Fix change log entry for config/rs6000/rs6000-call.c > > vsx.md: Fixed if (BYTES_BIG_ENDIAN) el

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

2020-06-16 Thread Martin Sebor via Gcc-patches
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/20 3:50 PM, Sandra Loosemore wrote: On 6/2/20 6:12 PM, Martin Sebor via Gcc-patch

Re: [PATCH 2/3] rs6000: Add MMA built-in function definitions

2020-06-16 Thread Peter Bergner via Gcc-patches
On 6/15/20 5:43 PM, will schmidt wrote: > checked noses, all have been found below. Thanks for verifying! >> * config/rs6000/rs6000.md ('type' attribute): Add mma type. > > (mma) : New 'type' attribute. I just copied what someone else did, but agree this is more readable. Will change.

Re: [PATCH 1/3] rs6000: Add base support and types for defining MMA built-ins.

2020-06-16 Thread Peter Bergner via Gcc-patches
On 6/15/20 5:43 PM, will schmidt wrote: > On Mon, 2020-06-15 at 14:56 -0500, Peter Bergner via Gcc-patches wrote: >> * config/rs6000/rs6000-cpus.def (OTHER_FUTURE_MASKS): Add >> OPTION_MASK_MMA. >> (POWERPC_MASKS): Likewise. > > Don't see POWERPC_MASKS in the patch here. It's this

[pushed] PR tree-optimization/95649: Fix pasto in the substitute_and_fold_engine merge with evrp.

2020-06-16 Thread Aldy Hernandez via Gcc-patches
The original code only propagated into PHI arguments if the value was a constant. This behavior was lost in the conversion, allowing any value (SSAs for instance) to be propagated into PHIs. Pre-approved by Jeff in the PR. Aldy commit 8fb4d1d58362b77da78c09740c6b5562124a369e Author: Aldy Hern

Re: [PATCH 3/6 ver 2] rs6000, Add vector replace builtin support

2020-06-16 Thread will schmidt via Gcc-patches
On Mon, 2020-06-15 at 16:37 -0700, Carl Love via Gcc-patches wrote: > v2 fixes: > > change log entries config/rs6000/vsx.md, config/rs6000/rs6000-builtin.def, > config/rs6000/rs6000-call.c. > > gcc/config/rs6000/rs6000-call.c: fixed if check for 3rd arg between 0 and 3 >

Re: [PATCH 1/6 ver 2] rs6000, Update support for vec_extract

2020-06-16 Thread will schmidt via Gcc-patches
On Mon, 2020-06-15 at 16:37 -0700, Carl Love via Gcc-patches wrote: > v2 changes > > config/rs6000/altivec.md log entry for move from changed as > suggested. > > config/rs6000/vsx.md log entro for moved to here changed as > suggested. > > define_mode_iterator VI2 also moved, included in both cha

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

2020-06-16 Thread Martin Sebor via Gcc-patches
On 6/16/20 10:13 AM, Jeff Law wrote: On Mon, 2020-06-15 at 11:10 -0600, Martin Sebor wrote: That's fine. Since they are treated as equivalent it shouldn't matter which of the equivalent alternatives is chosen (there may be many). It's the particular choice of the smaller member that makes it

PING^2: V5 [PATCH] x86: Move cpuinfo.h from libgcc to common/config/i386

2020-06-16 Thread H.J. Lu via Gcc-patches
On Tue, Jun 9, 2020 at 9:35 AM H.J. Lu wrote: > > On Tue, May 26, 2020 at 6:27 AM Martin Liška wrote: > > > > On 5/26/20 1:59 PM, H.J. Lu wrote: > > > On Tue, May 26, 2020 at 2:30 AM Martin Liška wrote: > > >> > > >> On 5/25/20 7:42 PM, H.J. Lu wrote: > > >>> Here is the updated patch. OK for m

[PATCH] middle-end: Add another testcase for PR 95493

2020-06-16 Thread Jonathan Wakely via Gcc-patches
This was reported on the gcc-help mailing list. The regression started with r10-589 and was fixed by r11-963. gcc/testsuite/ChangeLog: * g++.dg/torture/pr95493-1.C: New test. Tested x86_64-linux. OK for master? commit 03f6e6bea110994d4e1d49a2469f808082d5bded Author: Jonathan Wakely Da

Re: [PATCH] sanitizer: do not inline no-sanitize into sanitizer fn

2020-06-16 Thread Jakub Jelinek via Gcc-patches
Hi! On Tue, Jun 09, 2020 at 09:58:11PM +0200, Martin Liška wrote: > On 6/9/20 9:42 PM, Rainer Orth wrote: > > Excess errors: > > cc1: error: '-fsanitize=address' is incompatible with > > '-fsanitize=kernel-address' > > Sorry for that, I'm going to install the following patch. These tests are UN

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

2020-06-16 Thread Jeff Law via Gcc-patches
On Mon, 2020-06-15 at 11:10 -0600, Martin Sebor wrote: > > That's fine. Since they are treated as equivalent it shouldn't > matter which of the equivalent alternatives is chosen (there > may be many). It's the particular choice of the smaller member > that makes it a problem: both in the terms o

Re: [PATCH] c++: Fix ICE in check_local_shadow with enum [PR95560]

2020-06-16 Thread Jason Merrill via Gcc-patches
On 6/15/20 9:20 PM, Marek Polacek wrote: On Thu, Jun 11, 2020 at 03:32:14PM -0400, Jason Merrill wrote: On 6/10/20 5:11 PM, Marek Polacek wrote: Another indication that perhaps this warning is emitted too early. We crash because same_type_p gets a null type: we have an enumerator without a fix

Re: [PATCH] c++: zero_init_expr_p of dependent expression

2020-06-16 Thread Jason Merrill via Gcc-patches
On 6/16/20 9:06 AM, Patrick Palka wrote: On Thu, Apr 23, 2020 at 5:17 PM Jason Merrill wrote: On 4/23/20 4:09 PM, Patrick Palka wrote: This fixes a ICE coming from mangle.c:write_expression when compiling the ranges-v3 testsuite; the added testcase is a reduced reproducer of the ICE. Bootstr

Re: [PATCH v2] c++: Don't allow designated initializers with non-aggregates [PR95369]

2020-06-16 Thread Jason Merrill via Gcc-patches
On 6/15/20 4:56 PM, Marek Polacek wrote: On Thu, Jun 11, 2020 at 06:15:26PM -0400, Jason Merrill via Gcc-patches wrote: On 6/11/20 5:28 PM, Marek Polacek wrote: On Thu, Jun 11, 2020 at 03:51:29PM -0400, Jason Merrill wrote: On 6/9/20 2:17 PM, Marek Polacek wrote: Another part of 95369 is that

[PATCH v2, RS6000 PR target/94954] Fix wrong codegen for vec_pack_to_short_fp32() builtin

2020-06-16 Thread will schmidt via Gcc-patches
[PATCH v2, PR target/94954] Fix wrong codegen for vec_pack_to_short_fp32() builtin Hi, Fix codegen for builtin vec_pack_to_short_fp32. This includes adding a define_insn for xvcvsphp, and adding a new define_expand for convert_4f32_8f16. [v2] Comment on altivec.md "convert_4f32_8f16"

Re: [Patch] OpenMP/Fortran: Permit impure ELEMENTAL in omp directives

2020-06-16 Thread Tobias Burnus
Ups. Good catch. – I think the follow-up patch is obvious. Unless there are comments, I will commit it as such. Tobias On 6/16/20 4:41 PM, Thomas Schwinge wrote: Hi! On 2020-06-16T13:27:43+0200, Tobias Burnus wrote: when looking into a PURE/ELEMENTAL issue with OpenACC, Thomas and I came ac

Re: [PATCH] S/390: Emit vector alignment hints for z13 if AS accepts them

2020-06-16 Thread Andreas Krebbel via Gcc-patches
On 16.06.20 10:26, Stefan Schulze Frielinghaus wrote: > Since 87cb9423add vector alignment hints are emitted for target z13, > too. This patch changes this behaviour in the sense that alignment > hints are only emitted for target z13 if the assembler accepts them. > > Bootstrapped and regtested o

[committed] openmp: Initial part of OpenMP 5.0 non-rectangular loop support

2020-06-16 Thread Jakub Jelinek via Gcc-patches
Hi! OpenMP 5.0 adds support for non-rectangular loop collapses, e.g. triangular and more complex. This patch deals just with the diagnostics so that they aren't rejected immediately as before. As the spec generally requires as before that the iteration variable initializer and bound in the compa

Re: [Patch] OpenMP/Fortran: Permit impure ELEMENTAL in omp directives

2020-06-16 Thread Thomas Schwinge
Hi! On 2020-06-16T13:27:43+0200, Tobias Burnus wrote: > when looking into a PURE/ELEMENTAL issue with OpenACC, Thomas and > I came across the analogous OpenMP code – and stumbled over > ELEMENTAL. > > In Fortran, ELEMENTAL implies PURE but one can also have an IMPURE > ELEMENTAL procedure. > > As

[committed] openmp: Diagnose invalid OpenMP schedule(simd, static)

2020-06-16 Thread Jakub Jelinek via Gcc-patches
Hi! I've noticed we weren't diagnosing this, fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk. 2020-06-16 Jakub Jelinek gcc/c/ * c-parser.c (c_parser_omp_clause_schedule): Reject modifier separated from kind by comma rather than colon. gc

Re: PING^2: [PATCH] x86: Add UNSPECV_PATCHABLE_AREA

2020-06-16 Thread H.J. Lu via Gcc-patches
On Tue, Jun 16, 2020 at 7:17 AM Jakub Jelinek wrote: > > On Tue, Jun 09, 2020 at 09:34:01AM -0700, H.J. Lu via Gcc-patches wrote: > > > > * gcc.target/i386/pr93492-3.c: Likewise. > > > > * gcc.target/i386/pr93492-5.c: Likewise. > > These tests FAIL on i686-linux. > E.g. in the firs

Re: PING^2: [PATCH] x86: Add UNSPECV_PATCHABLE_AREA

2020-06-16 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 09, 2020 at 09:34:01AM -0700, H.J. Lu via Gcc-patches wrote: > > > * gcc.target/i386/pr93492-3.c: Likewise. > > > * gcc.target/i386/pr93492-5.c: Likewise. These tests FAIL on i686-linux. E.g. in the first one I see .file "pr93492-3.c" .text .gl

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

2020-06-16 Thread Richard Sandiford
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 consistent with the usual out-of-class

OpenACC/Fortran: permit 'routine' inside PURE

2020-06-16 Thread Tobias Burnus
While OpenACC 2.0 had "OpenACC directives may not appear in Fortran PURE or ELEMENTAL procedures" OpenACC 2.5 relaxed this. This patch permits 'acc routine' (with explicit or implicit 'seq' clause) inside PURE procedures. The 'match' → 'matcha' change permits that the gfc_errors inside the 'rou

Re: [PATCH] recog: Use parameter packs for operator()

2020-06-16 Thread Jonathan Wakely via Gcc-patches
On 16/06/20 11:42 +0100, Richard Sandiford wrote: Jonathan Wakely writes: + template + rtx_insn *operator() (Ts... args...) const Why is this declared as a variadic template **and** a varargs function? I think the second ellipsis is wrong, it should be just: + template + rtx_insn *operat

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

2020-06-16 Thread Martin Liška
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 consistent with the usual out-of-class formatting. Hope I fixed that. Sor

[Ada] Change how we detect internal protected subprograms

2020-06-16 Thread Pierre-Marie de Rodat
We don't always have Convention_Protected, so test for presence of Protected_Body_Subprogram. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-16 Richard Kenner gcc/ada/ * exp_unst.adb (Subp_Index): Change way we detect internal protected subprograms.--- gcc/ada/exp_

[Ada] Reuse Is_Object where possible

2020-06-16 Thread Pierre-Marie de Rodat
Reuse a high-level Is_Object, which is meant to be more readable than a low-level membership test with Ekind. Semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-16 Piotr Trojanek gcc/ada/ * einfo.adb, exp_spark.adb, exp_util.adb, sem_eval.adb: Replace

[Ada] Expand 'Pos and 'Val for enumeration types with standard representation

2020-06-16 Thread Pierre-Marie de Rodat
This changes the front-end to expand the 'Pos and 'Val attributes for enumeration types with standard representation. It turns out that this was the only remaining case where it does not expand them, as it does so for enumeration types with non-standard representation as well as for integer types.

[Ada] Fix spurious error on derived private type with predicate

2020-06-16 Thread Pierre-Marie de Rodat
As explained in the head comment of Compatible_Types_In_Predicate, anomalies involving private and full views can occur when a call to a predicate or invariant function is generated by the compiler. The function uses the child function Common_Type to reconcile the various views of a private type,

[Ada] Declare expressions

2020-06-16 Thread Pierre-Marie de Rodat
This patch implements AI12-0236-1, declare expressions. They are implemented in terms of N_Expression_With_Actions, which has the same semantics. A superset of the semantics, actually. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-16 Bob Duff gcc/ada/ * par-ch4.adb (P_Cas

[Ada] Improve bug box customer language

2020-06-16 Thread Pierre-Marie de Rodat
The language used in the bugbox for a customer to report an error message is missing an upper-case for the start of a sentence and also could be worded a bit clearer. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-16 Richard Kenner gcc/ada/ * comperr.adb (Compiler_Abort):

[Ada] Minor casing of " The " after a comma in docs and comments

2020-06-16 Thread Pierre-Marie de Rodat
Fix wrong casing in phrases like "something, The"; also, fix other small typos in comments. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-16 Piotr Trojanek gcc/ada/ * checks.adb, doc/gnat_ugn/the_gnat_compilation_model.rst, einfo.ads, exp_ch5.adb, exp_ch7.adb, lib

[Ada] Implement AI12-0216 on restricting overlap errors in calls

2020-06-16 Thread Pierre-Marie de Rodat
This patch implements A12-0216, which clarifies RM 6.4.1 (6.16-17/3) concerning illegal overlappings between actuals in a call. The previous illegality rule applied to a call in which two writable actuals, one of them having an elementary type, are known to overlap. The new rule states that illegal

[Ada] Crash in tagged type constructor with task components

2020-06-16 Thread Pierre-Marie de Rodat
This patch fixes the regressions introduced in CodePeer (caused by missing support for thunks) and enforces checks on BIP formals in the frontend to avoid mismatch when their values are passed as actuals of BIP calls. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-16 Javier Miranda

[Ada] Implement AI12-0249, AI12-0295 (user-defined numeric & string literals)

2020-06-16 Thread Pierre-Marie de Rodat
Implement Ada 202x's Integer_Literal, Real_Literal, and String_Literal aspects. This is just a preliminary implementation; interactions with controlled types, build-in-place functions, abstract types, interface types, aspects specifying an operator (e.g, "+"), mandatory aspect overriding, and many

[Ada] Enable literal aspect specifications in Big_Numbers specs

2020-06-16 Thread Pierre-Marie de Rodat
Specify the Integer_Literal aspect for the type Ada.Numerics.Big_Numbers.Big_Integers.Big_Integer. Specify the Real_Literal aspect for the type Ada.Numerics.Big_Numbers.Big_Reals.Big_Real. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-16 Steve Baird gcc/ada/ * libgnat/a-

[Ada] Fix assertion failure on qualified type names in predicates

2020-06-16 Thread Pierre-Marie de Rodat
An assertion is code for static membership tests was failing on this code: subtype A is Integer with predicate => A > 0; subtype B is Integer with predicate => B in P.A; where a qualified type name "P.A" appears in the predicate of type B. The fix is trivial and the problem didn'

[Ada] ACATS 4.1P - BC55001 - Error missed

2020-06-16 Thread Pierre-Marie de Rodat
This ACATS test shows that we are not checking legality of functions returning interfaces that need to be abstract. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-16 Arnaud Charlet gcc/ada/ * sem_ch6.adb (Analyze_Subprogram_Specification): Generate error message fo

[Ada] ACATS C452005/C452006 memberships use wrong equality operation

2020-06-16 Thread Pierre-Marie de Rodat
ACATS tests C452005 and C452006 show that GNAT is using the wrong equality operation for non record/non limited types as defined in RM 4.5.2 (28.1/4). This is actually a follow up/complement of the previous change for ACATS B452001 against RM 4.5.2(4.1/4). Tested on x86_64-pc-linux-gnu, committed

[Ada] Force evaluation of operator calls in renamings

2020-06-16 Thread Pierre-Marie de Rodat
When renaming a qualified expression with an operator, e.g.: Y : Boolean renames Boolean'(not X); routine Evaluate_Name should handle operators just like it handles function calls. This doesn't appear to matter for GNAT (where this routine is called in very few cases, as described in the comme

[Ada] ACATS 4.1K - B452001 - No errors detected

2020-06-16 Thread Pierre-Marie de Rodat
This is a test against RM 4.5.2(4.1/4), the rule that ensures that equality is visible for a membership involving objects. GNAT wasn't handling this case properly because during the rewrite of membership tests, the legality rules were bypassed as the rewrite was no longer treated as if it came from

[Ada] ACATS 4.1P - C432003 - Errors missed on extension aggregates

2020-06-16 Thread Pierre-Marie de Rodat
This ACATS test show that GNAT was not implementing AI05-0115 properly, now fixed by checking the relevant parent type. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-16 Arnaud Charlet gcc/ada/ * sem_aggr.adb (Resolve_Extension_Aggregate): Fix implementation of AI0

[Ada] Fix premature freezing of artificial array subtype

2020-06-16 Thread Pierre-Marie de Rodat
This prevents the compiler from placing the freeze node of an array subtype, generated for the expression of an if-expression whose type is an array type declared with a predicate, ahead of this expression and, in particular, before its declaration. Tested on x86_64-pc-linux-gnu, committed on trun

[Ada] Crash in tagged type constructor with task components

2020-06-16 Thread Pierre-Marie de Rodat
This patch removes part of the patch added to process the run-time package system.ads; it is not needed because we now rely on Targparm.Restrictions_On_Target. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-16 Javier Miranda gcc/ada/ * sem_prag.adb (Process_Restrictions_Or

[Ada] Force evaluation of qualified aggregates

2020-06-16 Thread Pierre-Marie de Rodat
This patch fixes regressions in GNATprove, after a previous patch changed routine Is_Object_Reference to literally implement the Ada RM and recognize aggregates as objects. Now routine Evaluate_Name also literally implements the Ada RM rules about name evaluation; in particular, it restores forced

[Ada] Check if attribute Passed_By_Reference is called on incomplete types

2020-06-16 Thread Pierre-Marie de Rodat
Problem: When Passed_By_Reference is used on an incomplete type (e.g. `type T; B : Boolean := T'Passed_By_Reference;`) GNAT crashes in Gigi because it doesn't know the size of T. Solution: Reject programs that use Passed_By_Reference on incomplete types, just like what is currently done for the Al

[Ada] Spurious undefined symbol with nested call to expression function

2020-06-16 Thread Pierre-Marie de Rodat
The compiler creates a link failure involving an expression function that is not a completion when the expression of the expression function includes a call to a function F declared in on outer scope of the same package declaration, becausw the compiler places the freeze node for F in the generated

[Ada] Implement AI12-0351 Matching for actuals for formal derived types

2020-06-16 Thread Pierre-Marie de Rodat
This implements the AI in all versions of the language, since it is a binding interpretation. The AI extends the 12.5.1(8) subclause: "For a generic formal derived type with no discriminant_part, the actual subtype shall be statically compatible with the ancestor subtype" from constained types to

[Ada] Fix spurious error on implicit dereference for private type

2020-06-16 Thread Pierre-Marie de Rodat
This is a fallout of the earlier work on the handling of Ada 95 implicit dereferences. The dereferences are now made explicit only at the final stage of type resolution and this slightly changes the way they are analyzed during semantic analysis. In particular, in the case of an implicit derefere

[Ada] Accept renamings of folded string aggregates

2020-06-16 Thread Pierre-Marie de Rodat
Routine Is_Object_Reference, which implements Ada RM 3.3(2) that says "All of the following are objects: ..." was slightly diverging from the exact wording of that rule and from the exact wording of AI05-0003, which allows qualified expressions to be used as objects (provided that their expression

[Ada] Fix small fallout of freezing change for expression functions

2020-06-16 Thread Pierre-Marie de Rodat
The previous change implemented the rule in Freeze_Expression that expression functions that are not completions are not freeze points. However, for code generation purposes, the artificial entities that are created during the expansion of the expressions must still be frozen inside the body create

Re: [PATCH] c++: zero_init_expr_p of dependent expression

2020-06-16 Thread Patrick Palka via Gcc-patches
On Thu, Apr 23, 2020 at 5:17 PM Jason Merrill wrote: > > On 4/23/20 4:09 PM, Patrick Palka wrote: > > This fixes a ICE coming from mangle.c:write_expression when compiling the > > ranges-v3 testsuite; the added testcase is a reduced reproducer of the ICE. > > > > Bootstrapped and regtested on x86_

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

2020-06-16 Thread zhoukaipeng (A)
Bootstrapped and tested on aarch64-linux-gnu & x86_64-linux-gnu. Could you please help install this patch? Kaipeng Zhou > -Original Message- > From: Richard Biener [mailto:rguent...@suse.de] > Sent: Tuesday, June 16, 2020 5:49 PM > To: zhoukaipeng (A) > Cc: Richard Sandiford ; gcc- > p

[PATCH] gcov: fix gcov-tool merge for TOPN counters

2020-06-16 Thread Martin Liška
Hello. The patch is about corrupted gcov-tool merge command for a TOPN counter. What was missing is transition of a on-disk representation to a memory representation expected by __gcov_merge_topn function. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. I'm going to instal

Re: [stage1][PATCH] Change semantics of -frecord-gcc-switches and add -frecord-gcc-switches-format.

2020-06-16 Thread Martin Liška
PING^3 On 6/2/20 11:16 AM, Martin Liška wrote: PING^2 On 5/15/20 11:58 AM, Martin Liška wrote: We're in stage1: PING^1 On 4/3/20 8:15 PM, Egeyar Bagcioglu wrote: On 3/18/20 10:05 AM, Martin Liška wrote: On 3/17/20 7:43 PM, Egeyar Bagcioglu wrote: Hi Martin, I like the patch. It definite

Re: [PATCH] Defined libcall_arg_t

2020-06-16 Thread Richard Sandiford
Kamlesh Kumar writes: > thanks Richard, > > addressed your concern. > > diff --git a/gcc/rtl.h b/gcc/rtl.h > index 0872cc4..7206c8a 100644 > --- a/gcc/rtl.h > +++ b/gcc/rtl.h > @@ -2238,6 +2238,16 @@ struct address_info { >    enum rtx_code base_outer_code; >  }; > > +/* This is used for passing

Re: [PATCH] ipa: special pass-through op for Fortran strides

2020-06-16 Thread Martin Jambor
Hi, On Mon, Jun 15 2020, Jan Hubicka wrote: >> On Fri, Jun 12, 2020 at 11:28 PM Martin Jambor wrote: >> > >> > Hi, >> > >> > when Fortran functions pass array descriptors they receive as a >> > parameter to another function, they actually rebuild it. Thanks to >> > work done mainly by Feng, IPA-

Re: [PATCH] middle-end/95690 - avoid MEM_EXPRs for constants

2020-06-16 Thread Richard Biener
On Tue, 16 Jun 2020, Richard Biener wrote: > > [the following fixes fallout of the last change which introduced > an assert - after this change we can likely trim down the set > of tree codes we "ignore"] > > The following avoids calling set_mem_attributes on the > DECL_INITIAL of a CONST_DECL w

Re: [PATCH][v2] tree-optimization/94988 - enhance SM some more

2020-06-16 Thread Richard Biener
On Tue, 16 Jun 2020, Thomas Schwinge wrote: > Hi! > > On 2020-05-11T16:51:41+0200, Richard Biener wrote: > > This enhances store-order preserving store motion to handle the case > > of non-invariant dependent stores in the sequence of unconditionally > > executed stores on exit by re-issueing th

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

2020-06-16 Thread Przemyslaw Wirkus
On 12 June 2020 20:55 Andrew Pinski wrote: > Subject: Re: [PATCH][GCC][Aarch64]: Fix for PR94880: Failure to recognize > andn pattern > > On Fri, Jun 12, 2020 at 7:50 AM Przemyslaw Wirkus > wrote: > > > > Hi all, > > > > Pattern "(x | y) - y" can be optimized to simple "(x & ~y)" andn pattern. >

RE: [PATCH][GCC] arm: Fix the MVE ACLE vaddq_m polymorphic variants.

2020-06-16 Thread Kyrylo Tkachov
> -Original Message- > From: Srinath Parvathaneni > Sent: 04 June 2020 17:57 > To: gcc-patches@gcc.gnu.org > Cc: Kyrylo Tkachov > Subject: [PATCH][GCC] arm: Fix the MVE ACLE vaddq_m polymorphic variants. > > Hello, > > This patch fixes the MVE ACLE vaddq_m polymorphic variants by mod

  1   2   >