Re: [PATCH v2] c++: Make braced-init-list as template arg work with aggr init [PR95369]

2020-06-05 Thread Jason Merrill via Gcc-patches
On 6/5/20 3:13 PM, Marek Polacek wrote: On Fri, May 29, 2020 at 03:17:51PM -0400, Jason Merrill via Gcc-patches wrote: On 5/28/20 7:23 PM, Marek Polacek wrote: Barry pointed out to me that our braced-init-list as a template-argument extension doesn't work as expected when we

libstdc++: Extend memcmp optimization in std::lexicographical_compare

2020-06-05 Thread François Dumont via Gcc-patches
Hi     Here is the last of my algo patches this time to extend the memcmp optimization to std::deque iterators and _GLIBCXX_DEBUG mode.     To do so I had to return int in implementation details of lexicographical_compare to make sure we can treat a deque iterator range by chunk in a

Re: [PATCH] PR fortran/95530, PR fortran/95537 - Buffer overflows with long symbols

2020-06-05 Thread Thomas Koenig via Gcc-patches
Am 05.06.20 um 18:45 schrieb Harald Anlauf: The testcases for fixes of buffer overflows did show some fallout in the testsuite that occurred only with suitably instrumented compilers. Bill Seurer provided useful backtraces on powerpc64 that helped to nail down the issues. To verifiy that the

Re: [PATCH RFC] bootstrap: Update requirement to C++11.

2020-06-05 Thread Jason Merrill via Gcc-patches
On 6/5/20 12:39 PM, Jason Merrill wrote: On Fri, Jun 5, 2020 at 12:01 PM Christophe Lyon mailto:christophe.l...@linaro.org>> wrote: On Fri, 15 May 2020 at 23:54, Jason Merrill via Gcc-patches mailto:gcc-patches@gcc.gnu.org>> wrote: > > On 5/15/20 2:21 PM, Richard Biener

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

2020-06-05 Thread Segher Boessenkool
Hi! On Mon, Jun 01, 2020 at 09:14:54AM -0700, Carl Love wrote: > * config/rs6000/altivec.h: Add define for vec_sldb and > vec_srdb. (vec_sldb, vec_srdb): New defines. (Etc.) > * testsuite/gcc.target/powerpc/vec-shift-double-runnable.c: Add > runnable test case.

Re: [PATCH 07/13] OpenACC 2.6 deep copy: libgomp parts

2020-06-05 Thread Julian Brown
On Fri, 5 Jun 2020 12:39:46 +0200 Thomas Schwinge wrote: > Hi Julian! > > On 2019-12-17T22:03:47-0800, Julian Brown > wrote: > > This part contains the libgomp runtime support for the > > GOMP_MAP_ATTACH and GOMP_MAP_DETACH mapping kinds > > > --- a/libgomp/oacc-mem.c > > +++

[committed] d: Merge upstream dmd f5638c7b8.

2020-06-05 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd f5638c7b8. Adds a CHECKENABLE enum, uses it for all contract parameters for consistency in state checking. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. gcc/d/ChangeLog:

[PATCH 1/2] c++: Improve access checking inside templates [PR41437]

2020-06-05 Thread Patrick Palka via Gcc-patches
This patch generalizes our existing functionality for deferring access checking of typedefs when parsing a function or class template to now defer all kinds of access checks until template instantiation time, including member function and member object accesses. Since all access checks eventually

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

2020-06-05 Thread Segher Boessenkool
Hi! On Mon, Jun 01, 2020 at 09:15:00AM -0700, Carl Love wrote: > The following patch adds support for the vec_splati, vec_splatid and > vec_splati_ins builtins. > * config/rs6000/altivec.h: Add define for vec_splati, > vec_splatid > and vec_splati_ins. *

[PATCH] underline null argument in -Wnonnull (PR c++/86568)

2020-06-05 Thread Martin Sebor via Gcc-patches
The caret location C++ -Wnonnull warnings is in the wrong place: either under the closing parenthesis of a call to a function declared nonnull, or under the whole call (when issued from the middle end). In addition, for member functions, the one-based argument number mentioned in the warning

Re: [PATCH 07/13] OpenACC 2.6 deep copy: libgomp parts

2020-06-05 Thread Julian Brown
On Fri, 5 Jun 2020 13:17:09 +0200 Thomas Schwinge wrote: > Hi Julian! > > On 2019-12-17T21:03:47-0800, Julian Brown > wrote: > > This part contains the libgomp runtime support for the > > GOMP_MAP_ATTACH and GOMP_MAP_DETACH mapping kinds > > > --- a/libgomp/target.c > > +++

[pushed] c++: Fix pretty-print of pointer minus integer.

2020-06-05 Thread Jason Merrill via Gcc-patches
For whatever reason, GCC internally represents a pointer minus an integer as a pointer plus a very large unsigned integer. But exposing that to users is unsightly, and it's easy enough to show the real value. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/cp/ChangeLog: * error.c

Re: [PATCH] Prefer simple case changes in spelling suggestions

2020-06-05 Thread Pip Cet via Gcc-patches
David Malcolm writes: > On Sat, 2020-05-30 at 18:51 +, Pip Cet wrote: >> How's this? > > Thanks; looks good to me. Hopefully this doesn't clash with Tom's > patch. It doesn't, but I hope I got the commit message right this time. (I don't have git access, so if someone could commit this if

Re: [PATCH v2] c++: Make braced-init-list as template arg work with aggr init [PR95369]

2020-06-05 Thread Marek Polacek via Gcc-patches
On Fri, May 29, 2020 at 03:17:51PM -0400, Jason Merrill via Gcc-patches wrote: > On 5/28/20 7:23 PM, Marek Polacek wrote: > > Barry pointed out to me that our braced-init-list as a template-argument > > extension doesn't work as expected when we aggregate-initialize. Thus > > fixed by calling

[PATCH 2/2] c++: Clean up previous change [PR41437]

2020-06-05 Thread Patrick Palka via Gcc-patches
The previous patch mostly avoided making any changes that had no functional impact, such as adjusting now-outdated comments and performing renamings. Such changes have been consolidated to this followup patch for easier review. The main change here is that we now reuse struct

Re: [PATCH] PowerPC: Add future hwcap2 bits

2020-06-05 Thread Segher Boessenkool
Hi! On Thu, Jun 04, 2020 at 10:11:29PM -0400, Michael Meissner wrote: > This patch adds support for the two new HWCAP2 fields used by the > __builtin_cpu_supports function. It adds support in the target_clones > attribute for -mcpu=future. > --- a/gcc/config/rs6000/rs6000-call.c > +++

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

2020-06-05 Thread Segher Boessenkool
Hi! On Mon, Jun 01, 2020 at 09:15:06AM -0700, Carl Love wrote: > The following patch adds support for the vec_blendv and vec_permx > builtins. Pretty interesting insns ;-) > * config/rs6000/altivec.h: Add define for vec_blendv and > vec_permx. > * config/rs6000/altivec.md: Add

[PATCH RFA] tree-inline: Fix VLA handling [PR95552]

2020-06-05 Thread Jason Merrill via Gcc-patches
The problem in this testcase comes from cloning the constructor into complete and base variants. When we clone the body the first time, walk_tree_1 calls copy_tree_body_r on the type of the artificial TYPE_DECL we made for the VLA type without calling it on the decl itself, so we overwrite the

Re: [PATCH 2/7] [OpenACC] Adjust dynamic reference count semantics

2020-06-05 Thread Julian Brown
On Wed, 3 Jun 2020 17:19:47 +0200 Thomas Schwinge wrote: > Hi Julian! > > On 2020-06-03T14:36:14+0200, I wrote: > > On 2020-05-22T15:16:05-0700, Julian Brown > > wrote: > >> This patch adjusts the semantics of dynamic reference counts, as > >> described in the parent email. > > > > Thanks!

[committed] d: Merge upstream dmd 740f3d1ea.

2020-06-05 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 740f3d1ea. Backports the conversion of the parameter fields debugids and versionids to Identifiers. The idea is that Identifiers should be used instead of C strings where ever possible. Bootstrapped and regression tested on

[PATCH] Add C++2a synchronization support

2020-06-05 Thread Thomas Rodgers
Add support for - atomic wait/notify_one/notify_all counting_semaphore binary_semaphore latch * include/Makefile.am (bits_headers): Add new header. * include/Makefile.in: Regenerate. * include/bits/atomic_base.h (__atomic_base<_Itp>::wait):

[OpenACC 'exit data'] Simplify 'GOMP_MAP_STRUCT' handling (was: [PATCH 07/13] OpenACC 2.6 deep copy: libgomp parts)

2020-06-05 Thread Thomas Schwinge
Hi! On 2020-05-20T11:37:35+0200, I wrote: > Moving this over, from the "Fix component mappings with derived types for > OpenACC" thread, > , where > you propose to change this 'GOMP_MAP_STRUCT' handling code: > > On

[OpenACC 'exit data'] Strip 'GOMP_MAP_STRUCT' mappings (was: [PATCH 07/13] OpenACC 2.6 deep copy: libgomp parts)

2020-06-05 Thread Thomas Schwinge
Hi! On 2020-05-20T11:37:35+0200, I wrote: > Moving this over, from the "Fix component mappings with derived types for > OpenACC" thread, > , where > you propose to change this 'GOMP_MAP_STRUCT' handling code: > > On

Re: [PATCH RFC] bootstrap: Update requirement to C++11.

2020-06-05 Thread Jason Merrill via Gcc-patches
On Fri, Jun 5, 2020 at 12:01 PM Christophe Lyon wrote: > On Fri, 15 May 2020 at 23:54, Jason Merrill via Gcc-patches > wrote: > > > > On 5/15/20 2:21 PM, Richard Biener wrote: > > > On May 15, 2020 7:30:38 PM GMT+02:00, Jason Merrill > wrote: > > >> On Fri, May 15, 2020 at 3:15 AM Richard

Re: [PATCH] middle-end/95493 - bogus MEM_ATTRS for variable array access

2020-06-05 Thread Eric Botcazou
> I've installed it on trunk but will give it quite a while there before > backporting. I'm still somewhat worried about the > > /* ??? If we end up with a constant or a descriptor do not > record a MEM_EXPR. */ > else if (CONSTANT_CLASS_P (t) > >||

[PATCH] PR fortran/95530, PR fortran/95537 - Buffer overflows with long symbols

2020-06-05 Thread Harald Anlauf
The testcases for fixes of buffer overflows did show some fallout in the testsuite that occurred only with suitably instrumented compilers. Bill Seurer provided useful backtraces on powerpc64 that helped to nail down the issues. To verifiy that the newly chosen buffer size is now sufficent, a

[PATCH 0/4] aarch64: avoid exposing signed return addresses [PR94891]

2020-06-05 Thread Szabolcs Nagy
I'm not familiar with gcc internals enough to fix this the right way, this is a big hammer fix to avoid exposing mangled pointer representation to user code when pointer signing is used on aarch64. I.e. this is not an optimal fix just to show how i would want the ABI to work. This touches

[PATCH 2/4] aarch64: fix __builtin_eh_return with pac-ret [PR94891]

2020-06-05 Thread Szabolcs Nagy
The handler argument must not be signed since that may come from outside the current module and exposing signed addresses is a pointer ABI break. (The signed address also may not be representable as void * which is why pac-ret is currently broken on ilp32.) There is no point protecting the eh

[PATCH 3/4] libgcc: fix the handling of return address mangling [PR94891]

2020-06-05 Thread Szabolcs Nagy
Mangling, currently only used on AArch64 for return address signing, is an internal representation that should not be exposed via __builtin_return_address return value, __builtin_eh_return handler argument, _Unwind_DebugHook handler argument. Note that a mangled address might not even fit

[PATCH 1/4] aarch64: fix return address access with pac [PR94891][PR94791]

2020-06-05 Thread Szabolcs Nagy
This is a big hammer fix for __builtin_return_address (PR target/94891) returning signed addresses (sometimes, depending on wether lr happens to be signed or not at the time of call which depends on optimizations), and similarly -pg may pass signed return address to _mcount (PR target/94791). At

[PATCH 4/4] doc: Clarify __builtin_return_address [PR94891]

2020-06-05 Thread Szabolcs Nagy
The expected semantics and valid usage of __builtin_return_address is not clear since it exposes implementation internals that are normally not meaningful to portable c code. This documentation change tries to clarify the semantics in case the return address is stored in a mangled form. This

Re: [PATCH 3/3] Fortran derived-type mapping fix

2020-06-05 Thread Thomas Schwinge
Hi Julian! On 2020-06-04T06:40:55-0700, Julian Brown wrote: > This patch provides the same fix for Fortran derived type component > mappings with derived types as the patch posted previously: > > https://gcc.gnu.org/legacy-ml/gcc-patches/2020-01/msg00512.html > > IIUC this part was previously

Re: [PATCH] Do not copy NULL string with memcpy.

2020-06-05 Thread Richard Biener via Gcc-patches
On June 4, 2020 10:22:55 PM GMT+02:00, Alexandre Oliva wrote: >On Jun 3, 2020, Martin Liška wrote: > >> On 6/3/20 5:58 AM, Alexandre Oliva wrote: >>> Please let me know if you'd prefer me to take this PR over. > >> Yes, please take a look. > >Here's what I've regstrapped on x86_64-linux-gnu.

[PATCH] ix86: Improve __builtin_c[lt]z followed by extension [PR95535]

2020-06-05 Thread Jakub Jelinek via Gcc-patches
Hi! In January I've added patterns to optimize SImode -> DImode sign or zero extension of __builtin_popcount, this patch does the same for __builtin_c[lt]z. Like most other instructions, the [tl]zcntl instructions clear the upper 32 bits of the destination register and as the instructions only

Re: [PATCH 1/2] [aarch64] Rework fpcr fpsr getter/setter builtins

2020-06-05 Thread Andrea Corallo
Richard Sandiford writes: > Andrea Corallo writes: >> Hi all, >> >> I'd like to submit this patch introducing the following 64bit builtins >> variants as FPCR and FPSR registers getter/setter: >> >> unsigned long long __builtin_aarch64_get_fpcr64 () >> void __builtin_aarch64_set_fpcr64

Re: [PATCH] middle-end/95493 - bogus MEM_ATTRS for variable array access

2020-06-05 Thread Eric Botcazou
> The patch ends up recording the whole Array ref with variable index. All > alias analysis code deals with this just fine. IIRC historically we tried > to save memory with stripping and dropping of MEM_EXPRs. OK, I agree that the cleanup makes sense these days and can probably also be

Re: [PATCH] Fortran : ICE in maybe_canonicalize_comparison_1 PR92993

2020-06-05 Thread Thomas Koenig via Gcc-patches
Hi Mark, OK to commit? Yes. As a general rule, I think that committing test cases for PRs that have been fixed by something else falls under the "obvious and simple" rule - no approval required. Thanks! Regards Thomas

Re: [PATCH] ix86: Improve __builtin_c[lt]z followed by extension [PR95535]

2020-06-05 Thread Uros Bizjak via Gcc-patches
On Fri, Jun 5, 2020 at 8:45 AM Jakub Jelinek wrote: > > Hi! > > In January I've added patterns to optimize SImode -> DImode sign or zero > extension of __builtin_popcount, this patch does the same for > __builtin_c[lt]z. Like most other instructions, the [tl]zcntl instructions > clear the upper

Re: [PATCH] Fortran : ICE in maybe_canonicalize_comparison_1 PR92993

2020-06-05 Thread Mark Eggleston
This time with actual patch. On 05/06/2020 09:04, Mark Eggleston wrote: OK to commit? Commit message: Fortran  : ICE in maybe_canonicalize_comparison_1 PR92993 This issue has been fixed by PR94090.  Add test case to ensure that this does not re-occur. 2020-06-04  Mark Eggleston

[PATCH] Fortran : ICE in maybe_canonicalize_comparison_1 PR92993

2020-06-05 Thread Mark Eggleston
OK to commit? Commit message: Fortran  : ICE in maybe_canonicalize_comparison_1 PR92993 This issue has been fixed by PR94090.  Add test case to ensure that this does not re-occur. 2020-06-04  Mark Eggleston gcc/fortran/     PR fortran/92993     * gfortran.dg/pr92993.f90: New test. --

Re: [PATCH] diagnostics: Consistently add fixit hint for implicit builtin declaration

2020-06-05 Thread Joseph Myers
This patch is OK. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH 07/13] OpenACC 2.6 deep copy: libgomp parts

2020-06-05 Thread Thomas Schwinge
Hi Julian! On 2019-12-17T22:03:47-0800, Julian Brown wrote: > This part contains the libgomp runtime support for the GOMP_MAP_ATTACH and > GOMP_MAP_DETACH mapping kinds > --- a/libgomp/oacc-mem.c > +++ b/libgomp/oacc-mem.c > @@ -1018,6 +1033,33 @@ goacc_exit_data_internal (struct

Re: [PATCH] Add pattern for pointer-diff on addresses with same base/offset (PR 94234)

2020-06-05 Thread Feng Xue OS via Gcc-patches
As Marc suggested, removed the new pointer_diff rule, and add another rule to fold convert-add expression. This new rule is: (T)(A * C) +- (T)(B * C) -> (T) ((A +- B) * C) Regards, Feng --- 2020-06-01 Feng Xue gcc/ PR tree-optimization/94234 * match.pd ((T)(A * C) +-

Re: [PATCH] middle-end/95493 - bogus MEM_ATTRS for variable array access

2020-06-05 Thread Richard Biener
On Fri, 5 Jun 2020, Eric Botcazou wrote: > > The patch ends up recording the whole Array ref with variable index. All > > alias analysis code deals with this just fine. IIRC historically we tried > > to save memory with stripping and dropping of MEM_EXPRs. > > OK, I agree that the cleanup makes

Fix ICE with typeless storage

2020-06-05 Thread Jan Hubicka
Hi, this patch fixes ICE while bulding Firefox on assert in record_component_aliases which checks that the alias set did not change while peeling off vector and array types. This is done so we can translate notice references to pointers. If array is TYPE_TYPELESS_STORAGE then it is not true that

Re: [PATCH PR95254] aarch64: gcc generate inefficient code with fixed sve vector length

2020-06-05 Thread Richard Sandiford
Richard Sandiford writes: > "Yangfei (Felix)" writes: >> Hi, >> >>> -Original Message- >>> From: Richard Sandiford [mailto:richard.sandif...@arm.com] >>> Sent: Monday, June 1, 2020 4:47 PM >>> To: Yangfei (Felix) >>> Cc: gcc-patches@gcc.gnu.org; Uros Bizjak ; Jakub >>> Jelinek ; Hongtao

[PATCH] tree-optimization/95539 - fix SLP_TREE_REPRESENTATIVE vs. dr_info

2020-06-05 Thread Richard Biener
This fixes a disconnect between the stmt_info used for dr_info analysis and the one in SLP_TREE_REPRESENTATIVE with a temporary workaround. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. 2020-06-05 Richard Biener PR tree-optimization/95539 *

Re: [PATCH] warn on uninitialized accesses by function calls (PR 10138)

2020-06-05 Thread Christophe Lyon via Gcc-patches
On Thu, 4 Jun 2020 at 18:59, Jeff Law via Gcc-patches wrote: > > On Fri, 2020-05-15 at 17:31 -0600, Martin Sebor via Gcc-patches wrote: > > Besides better buffer overflow checking, the new GCC 10 attribute > > access also provides an opportunity to detect other kinds of bugs, > > including

[committed] d: Merge upstream dmd 6d5bffa54

2020-06-05 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 6d5bffa54. Removes an unused parameter from Condition::include(), all callers have been updated in the front-end. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain.

[Ada] AI12-0144 Make Discrete_Random more flexible

2020-06-05 Thread Pierre-Marie de Rodat
A new version of Random is provided to provide more flexibility on the range of values returned, see the Ada AI for more details. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-05 Arnaud Charlet gcc/ada/ * libgnat/a-nudira.ads, libgnat/a-nudira.adb (Random): New

[Ada] Add No_Truncation flag on view conversion for GNAT-LLVM

2020-06-05 Thread Pierre-Marie de Rodat
This puts the No_Truncation flag on the unchecked conversion built for converting between the prefix of 'Valid_Scalars and the view of its type as returned by Validated_View for scalar types. This is needed in order to prevent GNAT-LLVM from masking out the bits outside the RM size of the prefix,

[Ada] Assertion_Policy (Ignore) ignores invariants

2020-06-05 Thread Pierre-Marie de Rodat
Previous check-in for this ticket was incomplete. It did not properly cover invariants inherited from one type to another. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-05 Bob Duff gcc/ada/ * einfo.adb, einfo.ads, exp_util.adb: Remove Invariants_Ignored flag.

[Ada] AI12-0207 Convention of anonymous access types

2020-06-05 Thread Pierre-Marie de Rodat
This AI was already implemented except for the case of array components which is done here. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-05 Arnaud Charlet gcc/ada/ * sem_prag.adb (Set_Convention_From_Pragma): Set the convention of anonymous access array

[Ada] AI12-0237 Getting the representation of an enumeration value

2020-06-05 Thread Pierre-Marie de Rodat
Attributes Enum_Rep/Enum_Val are now standard in Ada 202x, so adjust their handling accordingly. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-05 Arnaud Charlet gcc/ada/ * sem_attr.ads (Attribute_Impl_Def): Remove Enum_Rep/Val. * sem_attr.adb (Attribute_20): New,

[Ada] Add missing Global contract to Ada.Containers.Functional_Vectors

2020-06-05 Thread Pierre-Marie de Rodat
While annotating Ada.Containers.Functional_Vectors unit with Global/Pre/Post contracts we omitted its First function. This was most likely because it is an expression function and we though that Global will be generated, while Pre/Post will be effectively provided by inlining. However, GNATprove

[Ada] Fix assertion failure on double rederivation of private type

2020-06-05 Thread Pierre-Marie de Rodat
As shown by the testcase, Build_Derived_Private_Type still does not handle properly multiple rederivations of a private type initially derived as a completion. In order to address this, this changes factors out the retrieval of the full and underlying full views of the parent type into an helper

[PR51447] restore the global reg var before returning from main

2020-06-05 Thread Alexandre Oliva
The testcase for PR51447, on x86_64, uses rbx as a global register variable for the global PTR variable. A runtime system might legitimately hold in rbx a value expected to be preserved across the call to main, but its use as a global register variable stops main from preserving it. We've

[Ada] Move routine for detecting special Text_IO packages from GNATprove

2020-06-05 Thread Pierre-Marie de Rodat
In GNATprove we were detecting special Text_IO packages by looking at the Ada[_Wide[_Wide]]_Text_IO_Child subtypes provided by the frontend Rtsfind spec. However, it seems more elegant to hide those subtypes in the Rtsfind body and only expose a single query routine. This patch implements this

[Ada] Simplify iteration over components

2020-06-05 Thread Pierre-Marie de Rodat
Instead of iterating with First_Entity/Next_Entity and then detecting components with Ekind, it feels simpler to iterate with First_Component/ Next_Component. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-05 Piotr Trojanek gcc/ada/ * einfo.adb: Minor reformatting.

[Ada] Make the Has_Dynamic_Range_Check flag obsolete

2020-06-05 Thread Pierre-Marie de Rodat
This flag is set on N_Subtype_Declaration nodes and on all expression nodes to prevent checks from being generated multiple times for the same node. It was probably deemed necessary because semantic analysis and expansion for Ch3 tread on each other's toes and can generate the same check twice,

[Ada] Spurious error on address clause in task body

2020-06-05 Thread Pierre-Marie de Rodat
Compiler rejects an aspect specification for Address on a local variable in a task body, when the expression for the address is the address of a previous local object in the same task body. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-05 Ed Schonberg gcc/ada/ *

[Ada] Put_Image attribute

2020-06-05 Thread Pierre-Marie de Rodat
Misc cleanup in preparation for further work on Put_Image and Image. Mostly removal of redundant or obvious comments. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-05 Bob Duff gcc/ada/ * exp_attr.adb, exp_ch11.adb, exp_imgv.adb, exp_tss.ads, par-ch4.adb,

[Ada] Do not create an empty list of nodes that confuses GNATprove

2020-06-05 Thread Pierre-Marie de Rodat
Frontend typically expands record aggregates to an N_Aggregate node with Expressions field set to No_List; for example, in Step_8 of the Sem_Aggr.Resolve_Record_Aggregate routine. In the GNATprove backend we never traverse this field, but we have an assertion to confirm that the Expressions field

[Ada] Rename parameter of routines in Checks

2020-06-05 Thread Pierre-Marie de Rodat
This renames the Ck_Node parameter of some routines in Checks to the more consistent Expr, which is used and documented by other routines. In order to avoid any shadowing, parameters of a few child procedures are also renamed (although no actual shadowing would have occurred). No functional

[Ada] Optimize Normalize_Pathname

2020-06-05 Thread Pierre-Marie de Rodat
No need to get current directory if Directory parameter is absolute pathname. No need to convert Windows drive letter to upper case and slash to backslash in Normalize_Pathname.Get_Directory on Windows because it is alredy done in Normalize_Pathname body processing. Avoid recursion together with

[Ada] Fix incorrect initialization for array of non-standard enumeration type

2020-06-05 Thread Pierre-Marie de Rodat
This prevents the compiler from generating an incorrect call to a memset primitive for the initialization of an array, whose component type is an enumeration type with a non-standard representation, by means of an aggregate with a single Others choice. The predicate Aggr_Assignment_OK_For_Backend

[Ada] Add note about gnatcov reliance on thunk names

2020-06-05 Thread Pierre-Marie de Rodat
Add a note indicating that the names generated for interface thunks should not be changed without reflecting the change in gnatcoverage, as it relies on that information to exclude thunks from source coverage. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-05 Thomas Quinot

[Ada] Support 'Reduce under -gnatX

2020-06-05 Thread Pierre-Marie de Rodat
There are still ongoing discussions about the usefulness of this as a language attribute, so keep it under -gnatX for now. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-05 Arnaud Charlet gcc/ada/ * scng.adb (Scan): Fix typo to take into account all future

[Ada] Fix punctuation in description of Enum_Rep attribute

2020-06-05 Thread Pierre-Marie de Rodat
Style guides might disagree whether "i.e." should be followed by a comma, but certainly it should not be followed by a comma and a colon. Also, this colon was inconsistent with how the same phrase is punctuated when describing Enum_Val. Tested on x86_64-pc-linux-gnu, committed on trunk

Re: [PATCH 07/13] OpenACC 2.6 deep copy: libgomp parts

2020-06-05 Thread Thomas Schwinge
Hi Julian! On 2019-12-17T21:03:47-0800, Julian Brown wrote: > This part contains the libgomp runtime support for the GOMP_MAP_ATTACH and > GOMP_MAP_DETACH mapping kinds > --- a/libgomp/target.c > +++ b/libgomp/target.c > @@ -1203,6 +1211,32 @@ gomp_map_vars_internal (struct gomp_device_descr

[PATCH] fortran/95509 - fix spellcheck-operator.f90 regression

2020-06-05 Thread Tom Tromey
My earlier patch to add case handling to the spell checker caused a Fortran regression. I believe I must have misread the test results. This patch fixes the problem by changing the cutoff. I chose this value because the previous patch effectively multiplied the result of get_edit_distance by 2

Re: [PATCH] Enable CET in cross compiler if possible

2020-06-05 Thread H.J. Lu via Gcc-patches
On Tue, May 12, 2020 at 10:28 AM Jeff Law wrote: > > On Fri, 2020-05-08 at 06:11 -0700, H.J. Lu via Gcc-patches wrote: > > Don't perform CET run-time check for host when cross compiling. Instead, > > enable CET in cross compiler if possible so that it will run on both CET > > and non-CET hosts.

Add 'libgomp.oacc-c-c++-common/struct-copyout-{1, 2}.c' (was: [PATCH 1/3] OpenACC "exit data" copyout for struct members)

2020-06-05 Thread Thomas Schwinge
Hi! On 2020-06-04T06:40:53-0700, Julian Brown wrote: > [...] I've added a couple of new testcases to verify the behaviour > (which fail without the patch). Thanks. Given the preparational patches pushed yesterday, these now PASS already. > *

Re: [PATCH] fortran/95509 - fix spellcheck-operator.f90 regression

2020-06-05 Thread Thomas Koenig via Gcc-patches
Hi Tom, My earlier patch to add case handling to the spell checker caused a Fortran regression. I believe I must have misread the test results. This patch fixes the problem by changing the cutoff. I chose this value because the previous patch effectively multiplied the result of

[committed] d: Merge upstream dmd 56f0a65c4.

2020-06-05 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 56f0a65c4. Updates the Target interface, removing static from all members, so all field accesses and member function calls go through a a single global 'target'. Information relating to extern ABI are now in TargetC,

Re: [PATCH] warn on uninitialized accesses by function calls (PR 10138)

2020-06-05 Thread Martin Sebor via Gcc-patches
On 6/5/20 5:07 AM, Christophe Lyon wrote: On Thu, 4 Jun 2020 at 18:59, Jeff Law via Gcc-patches wrote: On Fri, 2020-05-15 at 17:31 -0600, Martin Sebor via Gcc-patches wrote: Besides better buffer overflow checking, the new GCC 10 attribute access also provides an opportunity to detect other

Re: [PATCH RFC] bootstrap: Update requirement to C++11.

2020-06-05 Thread Christophe Lyon via Gcc-patches
On Fri, 15 May 2020 at 23:54, Jason Merrill via Gcc-patches wrote: > > On 5/15/20 2:21 PM, Richard Biener wrote: > > On May 15, 2020 7:30:38 PM GMT+02:00, Jason Merrill > > wrote: > >> On Fri, May 15, 2020 at 3:15 AM Richard Biener > >> > >> wrote: > >> > +# When bootstrapping with GCC,