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 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 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.

[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

[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] 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] 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

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 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

[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: 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

[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

[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 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 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 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 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 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 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 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] 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 >

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] 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: [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][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

<    1   2