Re: [committed] amdgcn: Handle early debug info in mkoffload

2020-07-16 Thread Thomas Schwinge
Hi Andrew! On 2020-07-16T16:06:49+0100, Andrew Stubbs wrote: > This patch adds debug support to mkoffload, similar to what happens in > lto-wrapper. Ah, good, it's not as invasive/convoluted as I'd assumed from the verbal description you'd given. > Unlike lto-wrapper, we must deal with mismatch

Re: [PATCH] Enable GCC support for AMX

2020-07-16 Thread Hongyu Wang via Gcc-patches
Update for SAPPHIRERAPIDS and PING Hongyu Wang 于2020年7月7日周二 上午11:24写道: > > Hi Kirill, could you help review this patch? > > Hongyu Wang 于2020年7月6日周一 上午9:58写道: > > > > Hi: > > > > This patch is about to support Intel Advanced Matrix Extensions (AMX) > > which will be enabled in GLC. > > > > AMX

Re: [PATCH] Add TARGET_LOWER_LOCAL_DECL_ALIGNMENT [PR95237]

2020-07-16 Thread Sunil Pandey via Gcc-patches
Any comment on revised patch? At least, in finish_decl, decl global attributes are populated. On Tue, Jul 14, 2020 at 8:37 AM Sunil Pandey wrote: > On Sat, Jul 4, 2020 at 9:11 AM Richard Biener > wrote: > > > > On July 3, 2020 11:16:46 PM GMT+02:00, Jason Merrill > wrote: > > >On 6/29/20 5:00

Re: [PATCH 3/4] libstdc++: Add floating-point std::to_chars implementation

2020-07-16 Thread Patrick Palka via Gcc-patches
On Wed, 15 Jul 2020, Patrick Palka wrote: > On Tue, 14 Jul 2020, Patrick Palka wrote: > > > This implements the floating-point std::to_chars overloads for float, > > double and long double. We use the Ryu library to compute the shortest > > round-trippable fixed and scientific forms of a number

Re: [PATCH] x86: Rename VF_AVX512VL_VF1_128_256 to VF1_AVX512ER_128_256

2020-07-16 Thread H.J. Lu via Gcc-patches
On Mon, Jul 13, 2020 at 9:12 AM H.J. Lu wrote: > > On Thu, Jul 9, 2020 at 6:35 AM H.J. Lu wrote: > > > > On Thu, Jul 9, 2020 at 5:04 AM Kirill Yukhin > > wrote: > > > > > > On 07 июл 09:06, H.J. Lu wrote: > > > > On Tue, Jul 7, 2020 at 8:56 AM Kirill Yukhin > > > > wrote: > > > > > > > > > >

[PATCH] Add support for dynamic shadow offset

2020-07-16 Thread Harshit Sharma via Gcc-patches
Hi all, This patch adds support for dynamic shadow offset in ASan stack instrumentation. It is required by Kernel Address Sanitizer in cases where the shadow offset address is not known at compile-time as the shadow buffer may not be allocated during the early boot stages. I used a callback funct

Re: [PATCH] testsuite/rs6000: Add option to ignore vect cost model

2020-07-16 Thread Kewen.Lin via Gcc-patches
Hi, on 2020/7/17 上午4:31, Segher Boessenkool wrote: > Hi! > > On Thu, Jul 16, 2020 at 02:51:23PM +0800, Kewen.Lin wrote: >> In my testing with cost tweaking for vector with length, I found >> two cases below didn't get the expected output. Since the expected >> instructions reply on the vectoriza

[PATCH] combine: Use single_set for is_just_move

2020-07-16 Thread Segher Boessenkool
Since we now only call is_just_move on the original instructions, we always have an rtx_insn* (not just a pattern), so we can use single_set on it. This makes no detectable difference at all on all thirty Linux targets I test, but it does help cris, and it is simpler, cleaner code anyway. Tested

Re: RFA: Fix combine.c combining a move and a non-move into two non-moves, PR93372

2020-07-16 Thread Segher Boessenkool
On Tue, Jul 14, 2020 at 04:33:42PM -0500, Segher Boessenkool wrote: > > If combine only did lower-cost combinations (perhaps with > > Richard Sandifords lower-size-when-tied suggestion), I guess > > this wouldn't happen. 0:-) > > And we would regress (a LOT). Like this. C0 is an unmodified compi

[PING][PATCH] improve validation of attribute arguments (PR c/78666)

2020-07-16 Thread Martin Sebor via Gcc-patches
Ping: https://gcc.gnu.org/pipermail/gcc-patches/2020-July/549686.html (Jeff, I forgot to mention this patch when we spoke earlier today.) On 7/8/20 6:01 PM, Martin Sebor wrote: GCC has gotten better at detecting conflicts between various attributes but it still doesn't do a perfect job of detec

Re: [PATCH] config/debuginfod.m4: Use PKG_CHECK_MODULES

2020-07-16 Thread Aaron Merey via Gcc-patches
On Fri, May 8, 2020 at 4:56 PM Tom Tromey wrote: > > > "Aaron" == Aaron Merey via Binutils writes: > > Aaron> * Makefile.in: Replace LIBDEBUGINFOD with DEBUGINFOD_LIBS. > Aaron> * aclocal.m4: Rebuild. > > Instead of inlining pkg.m4 into aclocal.m4, how about making > config/pk

Re: [PATCH] config/debuginfod.m4: Use PKG_CHECK_MODULES

2020-07-16 Thread Aaron Merey via Gcc-patches
Hi Tom, Sorry for the delay, I've modified the patch to include config/pkg.m4. Aaron Use PKG_CHECK_MODULES to set debuginfod autoconf vars. Also add pkg.m4 to config/. ChangeLog: * config/debuginfod.m4: use PKG_CHECK_MODULES. * config/pkg.m4: New file. * configure: Reb

Re: [PATCH v2] sparc/sparc64: use crtendS.o for default-pie executables [PR96190]

2020-07-16 Thread Sergei Trofimovich via Gcc-patches
On Wed, 15 Jul 2020 13:46:12 +0200 Eric Botcazou wrote: > > This should be: > > > > PR target/96190 > > * config/sparc/linux.h (ENDFILE_SPEC): Use GNU_USER_TARGET_ENDFILE_SPEC > > to get crtendS.o for !no-pie mode. > > * config/sparc/linux64.h(ENDFILE_SPEC): Ditto. > > *

[PATCH v3] sparc/sparc64: use crtendS.o for default-pie executables [PR96190]

2020-07-16 Thread Sergei Trofimovich via Gcc-patches
From: Sergei Trofimovich In --enable-default-pie mode compiler should switch from using crtend.o to crtendS.o. On sparc it is especially important because crtend.o contains PIC-unfriendly code. We use GNU_USER_TARGET_ENDFILE_SPEC as a baseline spec to get crtendS.o instead of crtend.o in !no-pie

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

2020-07-16 Thread Julian Brown
On Thu, 16 Jul 2020 11:35:23 +0200 Thomas Schwinge wrote: > Hi Julian! > > Ping. > > On 2020-06-26T11:20:40+0200, I wrote: > > 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 kin

Re: [PATCH] coroutines: Correct frame capture of compiler temps [PR95591+4].

2020-07-16 Thread Iain Sandoe
Nathan Sidwell wrote: On 7/16/20 11:56 AM, Iain Sandoe wrote: It's unfortunate the original plan of handling lifetime issues in a gimple pass didn't work out. I’ve revisited this (on balance every couple of months, I suppose when it gets tricky doing something in the FE). However, it s

Re: [PATCH] testsuite/rs6000: Add option to ignore vect cost model

2020-07-16 Thread Segher Boessenkool
Hi! On Thu, Jul 16, 2020 at 02:51:23PM +0800, Kewen.Lin wrote: > In my testing with cost tweaking for vector with length, I found > two cases below didn't get the expected output. Since the expected > instructions reply on the vectorization occurrence, we don't expect > vectorization gets disable

[committed] i386: Additional peephole2 to use flags from CMPXCHG more [PR96189]

2020-07-16 Thread Uros Bizjak via Gcc-patches
CMPXCHG instruction sets ZF flag if the values in the destination operand and EAX register are equal; otherwise the ZF flag is cleared and value from destination operand is loaded to EAX. Following assembly: xorl%eax, %eax lock cmpxchgl %edx, (%rdi) testl %eax, %eax

Re: [PATCH] coroutines: Correct frame capture of compiler temps [PR95591+4].

2020-07-16 Thread Nathan Sidwell
On 7/16/20 11:56 AM, Iain Sandoe wrote: Hello folks, It's unfortunate the original plan of handling lifetime issues in a gimple pass didn't work out. OK for master? OK for 10.x? ok, some nits +struct interesting +{ not a very good name. As it's not in an anonumous namespace, it has

[PATCH PR95696] regrename creates overlapping register allocations for vliw

2020-07-16 Thread zhongyunde via Gcc-patches
hi,   Insometarget,itislimitedtoissuetwoinsnstogetherwithchangethesameregister,so Imakeapatchtoextendtheliverangeuntiltheendofvliwtoavoidit.(Theinsn73startwithinsn:TI,soitwillbeissuedtogetherwithothersinsnsuntilanewinsnstartwithinsn:TI,suchasinsn71)TheregrenamecanknownthemodeV2VFininsn73needtwosucc

[committed] c++: Add test for DR 188.

2020-07-16 Thread Marek Polacek via Gcc-patches
Tested x86_64-pc-linux-gnu, applying to trunk. gcc/testsuite/ChangeLog: DR 188 * g++.dg/DRs/dr188.C: New test. --- gcc/testsuite/g++.dg/DRs/dr188.C | 7 +++ 1 file changed, 7 insertions(+) create mode 100644 gcc/testsuite/g++.dg/DRs/dr188.C diff --git a/gcc/testsuite/g++.dg

[PATCH] coroutines: Correct frame capture of compiler temps [PR95591+4].

2020-07-16 Thread Iain Sandoe
Hello folks, This is a patch correcting a thinko on my part which turns out to have quite serious consequences for coroutines. Sorry it took longer to clean up than I expected. 1/ I am sad that this is (too) late for 10.2 .. .. my advice to distros would be to apply the patch to 10.2… I will c

[committed,OG10] amdgcn: Handle early debug info in mkoffload

2020-07-16 Thread Andrew Stubbs
On 16/07/2020 16:06, Andrew Stubbs wrote: This patch adds debug support to mkoffload, similar to what happens in lto-wrapper. Unlike lto-wrapper, we must deal with mismatched architectures and mismatched program scope. These are fixed up using manual ELF patching because there's no useful sup

[committed,OG10] amdgcn: Support basic DWARF

2020-07-16 Thread Andrew Stubbs
On 29/06/2020 12:05, Andrew Stubbs wrote: This patch configures the DWARF debug output to match the proposed DWARF specification from AMD.  This is already implemented in LLVM and rocgdb (out of tree). This makes no attempt to support CFI, yet, and has some issues with vector registers. GCC w

[PATCH] c++: Variable template and template parameter pack [PR96218]

2020-07-16 Thread Marek Polacek via Gcc-patches
This is DR 2032 which says that the restrictions regarding template parameter packs and default arguments apply to variable templates as well, but we weren't detecting that. Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? gcc/cp/ChangeLog: DR 2032 PR c++/96218

[committed] amdgcn: Handle early debug info in mkoffload

2020-07-16 Thread Andrew Stubbs
This patch adds debug support to mkoffload, similar to what happens in lto-wrapper. Unlike lto-wrapper, we must deal with mismatched architectures and mismatched program scope. These are fixed up using manual ELF patching because there's no useful support in simple_object (yet). Should this be

RE: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions emitted at -O3

2020-07-16 Thread xiezhiheng
> -Original Message- > From: Richard Sandiford [mailto:richard.sandif...@arm.com] > Sent: Thursday, July 16, 2020 8:42 PM > To: xiezhiheng > Cc: Richard Biener ; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions > emitted at -O3 > > xiezhiheng

[Patch][OG10] omp-low.c: Avoid offload-target lto1 is-missing error by not-privatizing TREE_READONLY vars

2020-07-16 Thread Tobias Burnus
[This is an OpenACC issue but I would not completely surprised if something similar could occur for OpenMP offloading as well. However, the patch is for an OpenACC-specific function.] This issue occurs for libgomp.oacc-fortran/privatized-ref-2.f90, for which on the device lto1 complains: lto1: fa

Re: [PATCH 1/6] AArch64: Fix bugs in -mcpu=native detection.

2020-07-16 Thread Tamar Christina
Hi Richard, I have fixed the formatting issues and made it so it checks explicitly for ':'. Ok for master, GCC 10, 9 and 8 after some stew? Thanks, Tamar gcc/ChangeLog: * config/aarch64/driver-aarch64.c (INCLUDE_SET): New. (parse_field): Use std::string. (split_words, r

Re: [PATCH] c++: Get rid of convert_like* macros.

2020-07-16 Thread Marek Polacek via Gcc-patches
On Thu, Jul 16, 2020 at 09:16:06AM -0400, Nathan Sidwell wrote: > On 7/15/20 6:59 PM, Marek Polacek wrote: > > The convert_like* macros were introduced in > > > > 2000-03-05 Nathan Sidwell > > > > * call.c (convert_like): Macrofy. > > (convert_like_with_context): New macro. >

Re: [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]

2020-07-16 Thread Victor Rodriguez via Gcc-patches
On Tue, Jul 14, 2020 at 9:52 AM Qing Zhao via Gcc-patches wrote: > > Hi, Gcc team, > > This patch is a follow-up on the previous patch and corresponding discussion: > https://gcc.gnu.org/pipermail/gcc-patches/2020-May/545101.html >

Re: [PATCH] c++: Get rid of convert_like* macros.

2020-07-16 Thread Nathan Sidwell
On 7/15/20 6:59 PM, Marek Polacek wrote: The convert_like* macros were introduced in 2000-03-05 Nathan Sidwell * call.c (convert_like): Macrofy. (convert_like_with_context): New macro. but now we can use overloading so we can do away with the macros. I've also taken this c

Re: [PATCH] analyzer: Fix -Wanalyzer-possible-null-argument warning

2020-07-16 Thread Nathan Sidwell
On 7/16/20 9:01 AM, Jonathan Wakely wrote: On 06/07/20 11:27 +0100, Jonathan Wakely wrote: On 05/07/20 21:48 -0400, David Malcolm wrote: On Wed, 2020-07-01 at 18:29 +0100, Jonathan Wakely wrote: On 30/06/20 17:43 +0100, Jonathan Wakely wrote: gcc/testsuite/ChangeLog: * g++.dg/analyzer/pr

[PATCH] Don't write COMDAT group id to LTO output on PE/COFF

2020-07-16 Thread Markus Böck via Gcc-patches
COFF targets currently do not support COMDAT groups. On MinGW targets GCC instead puts symbols part of a COMDAT group inside of sections annotated with the .linkonce GAS directive. This leads to GAS generating a section so that the COMDAT name is the same as the name of the actual symbol. When usi

Re: [PATCH] analyzer: Fix -Wanalyzer-possible-null-argument warning

2020-07-16 Thread Jonathan Wakely via Gcc-patches
On 06/07/20 11:27 +0100, Jonathan Wakely wrote: On 05/07/20 21:48 -0400, David Malcolm wrote: On Wed, 2020-07-01 at 18:29 +0100, Jonathan Wakely wrote: On 30/06/20 17:43 +0100, Jonathan Wakely wrote: gcc/testsuite/ChangeLog: * g++.dg/analyzer/pr94028.C: Make operator new non-throwing

[pushed] coroutines: Spelling corrections in comments [NFC].

2020-07-16 Thread Iain Sandoe
Hi Correct some typos noticed while working on another patch. tested on x86_64-darwin, pushed to master, thanks Iain gcc/cp/ChangeLog: * coroutines.cc: Correct some spelling errors in comments. --- gcc/cp/coroutines.cc | 22 +++--- 1 file changed, 11 insertions(+

[committed] build: Fix 'make TAGS' in gcc/

2020-07-16 Thread Andrea Corallo
Hi all, the following simple patch fixes 'make TAGS' for gcc/ Wasn't working because still searching for params.def. Committed as obvious fix. Regards Andrea gcc/ChangeLog: 2020-07-16 Andrea Corallo * Makefile.in (TAGS): Remove 'params.def'. >From 0037265f07295c5e5b0db15c0e8710

[Patch][OG10, committed] libgomp.oacc-fortran/firstprivate-int.f90 fix for nonexisting kind-16 int

2020-07-16 Thread Tobias Burnus
i386 (alias x86-64 with -m32) does not support integer(kind=16); this fix simply uses the highest available value in integer_kinds. This patch still assumes that all offload targets support at least those , but that seems to currently the case. Alternatively, one could operate with effective-targ

Re: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions emitted at -O3

2020-07-16 Thread Richard Sandiford
xiezhiheng writes: >> -Original Message- >> From: Richard Sandiford [mailto:richard.sandif...@arm.com] >> Sent: Tuesday, July 7, 2020 10:08 PM >> To: xiezhiheng >> Cc: Richard Biener ; gcc-patches@gcc.gnu.org >> Subject: Re: [PATCH PR94442] [AArch64] Redundant ldp/stp instructions >> emit

RE: [PATCH] x86: Provide expanders for truncdisi2 and friends.

2020-07-16 Thread Roger Sayle
Hi Richard, Many thanks. As promised, here's a clean-up patch that removes the last direct call to targetm.truly_noop_truncation from the middle-end, allowing this hook at some point in the future to take modes instead of sizes. middle-end: Prefer TRULY_NOOP_TRUNCATION_MODES_P over raw target

RE: [PATCH] target: fix default value checking of x_str_align_functions in aarch64.c

2020-07-16 Thread Hu, Jiangping
PING. > -Original Message- > From: Gcc-patches On Behalf Of Hu > Jiangping > Sent: Tuesday, July 14, 2020 3:55 PM > To: gcc-patches@gcc.gnu.org > Subject: [PATCH] target: fix default value checking of x_str_align_functions > in > aarch64.c > > Hi, > > This patch deal with the -falign-X

[PATCH] Define TARGET_TRULY_NOOP_TRUNCATION to false.

2020-07-16 Thread Roger Sayle
Many thanks to Richard Biener for approving the midde-end patch that cleared the way for this one. This nvptx patch defines the target hook TARGET_TRULY_NOOP_TRUNCATION to false, indicating that integer truncations require explicit instructions. nvptx.c already defines TARGET_MODES_TIEABLE_P and

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

2020-07-16 Thread Thomas Schwinge
Hi Julian! Ping. On 2020-06-26T11:20:40+0200, I wrote: > 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 (etc.), as introduced by the front-end >> patches following in this series. > >

Re: [PATCH] libsanitizer: Fix GetPcSpBp determination of SP on 32-bit Solaris/x86

2020-07-16 Thread Rainer Orth
Hi Jakub, >> fair enough. What about the gcc-9 branch by then? I expect there will >> be at least one more release from that one, too? > > Ok, but please do it in order (i.e. trunk, then 10+9+8 (if you want 8 too)). that's been the plan: I want to avoid older releases to have fixes missing in n

Re: [PATCH] libsanitizer: Fix GetPcSpBp determination of SP on 32-bit Solaris/x86

2020-07-16 Thread Jakub Jelinek via Gcc-patches
On Thu, Jul 16, 2020 at 10:44:21AM +0200, Rainer Orth wrote: > Hi Jakub, > > >> I may still be mistaken, but all this suggests that Linux might be > >> playing games with ESP and UESP, while Solaris and NetBSD (see below) > >> keep them separate, but in the end UESP is the register to use. > > > >

[Ada] Ongoing work for AI12-0212 : container aggregates

2020-07-16 Thread Pierre-Marie de Rodat
This patch adds support for indexed aggregates with both positional components and component associations that include multiple choices and range specifications. For indexed aggregates the expansion uses a separate pass, as suggested in AI12-0212, to compute the size of the resulting object and pre

[Ada] Spurious error in instance nested in formal package

2020-07-16 Thread Pierre-Marie de Rodat
This patch removes a spurious error in a compilation of a generic body GB that includes a formal package whose source GF includes a nested generic package NGF, and GB includes instances of NGF and of further generic units declared within NGF. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/

[Ada] AI12-0132 Freezing of renames_as_body

2020-07-16 Thread Pierre-Marie de Rodat
This AI clarifies that a renames-as-body freezes the expression of any expression function that it renames. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch8.adb (Analyze_Subprogram_Renaming): A renames-as-body freezes the expression of any expression function

[Ada] Set missing Parent field of block entity

2020-07-16 Thread Pierre-Marie de Rodat
This sets the Parent field of the block entity created in the case of a statement sequence by Expand_N_Accept_Statement to the newly created block statment, as done for example in Add_Block_Identifier. This is needed in peculiar cases where the block contains instantiations of packages with generi

[Ada] Ada2020: AI12-0117 Restriction No_Tasks_Unassigned_To_CPU

2020-07-16 Thread Pierre-Marie de Rodat
Implement the No_Tasks_Unassigned_To_CPU restriction. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * gnatbind.adb (Gnatbind): For No_Tasks_Unassigned_To_CPU, check that CPU has been set on the main subprogram. (Restriction_Could_Be_Set): Don't print

[Ada] Adjust heuristics about size of static aggregates

2020-07-16 Thread Pierre-Marie de Rodat
This patch adjusts the heuristics about the size of static aggregates, which determine whether an aggregate should be statically allocated. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_aggr.adb (Max_Aggregate_Size): Use the small size of 64 when copying is nee

[Ada] Wrong execution of Tan on large argument

2020-07-16 Thread Pierre-Marie de Rodat
The custom implementation of Tan in a-numaux__x86.adb has some holes for large values and will e.g. produce the wrong result on Tan (16367173.0 * 2.0**72). This is fixed by replacing the use of a-numaux__x86 by a-numaux__libc-x86.ads. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/

[Ada] Implicit dereferencing in container indexing

2020-07-16 Thread Pierre-Marie de Rodat
The compiler was disallowing an access to a container to be used as the prefix of an indexing of the container, but implicit dereferencing is allowed in such a context (basically because a prefix can be an implicit_dereference, by RM 4.1(4); a Ramification note was added in RM 4.1.6(11.a/5), to cla

[Ada] Misplace of internal master renaming declaration

2020-07-16 Thread Pierre-Marie de Rodat
This patch fixes a regression introduced by the recent work done for tagged type constructors with task components. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch3.adb (Expand_N_Full_Type_Declaration): Ensure a _master declaration on limited types that might

[Ada] AI12-0004 Normalization and allowed characters

2020-07-16 Thread Pierre-Marie de Rodat
This Ada AI clarifies that Ada identifiers that contain characters that are not allowed in Normalization Form KC are illegal. It also introduces a new function Is_NFKC. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * scng.adb (Scan): Detect wide characters not in NFKC.

[Ada] gnatbind: Fix No_Entry_Calls_In_Elaboration_Code message

2020-07-16 Thread Pierre-Marie de Rodat
This patch fixes a bug where gnatbind would suggest adding the No_Entry_Calls_In_Elaboration_Code restriction, when that restriction is already present. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * bindo-diagnostics.adb (Output_Invocation_Related_Suggestions): Use

[Ada] Disable Initialize_Scalars on runtime files

2020-07-16 Thread Pierre-Marie de Rodat
To avoid creating circular dependencies between runtime units and to allow compiling e.g. GNAT with Initialize_Scalars. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * frontend.adb: Disable Initialize_Scalars on runtime files.diff --git a/gcc/ada/frontend.adb b/gcc/ada/front

[Ada] Ada2020: AI12-0107 convention of By_Protected_Procedure

2020-07-16 Thread Pierre-Marie de Rodat
A prefixed view of a subprogram with aspect Synchronization being By_Protected_Procedure has convention protected. This new feature is documented in AI12-0107. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_attr.adb (Has_By_Protected_Procedure_Prefixed_View): New

[Ada] AI12-0042: Type invariant checking rules

2020-07-16 Thread Pierre-Marie de Rodat
AI12-0042 specifies a couple of new rules for type invariants. The first is that when a type extension inherits a nonabstract subprogram that is a private operation of an ancestor type that has a class-wide invariant and the parent subprogram is visible at that point, the subprogram must be overrid

[Ada] Handle N_Others_Choice case in range-building function

2020-07-16 Thread Pierre-Marie de Rodat
GNAT crashes when building static predicate functions out of a case expression that contain an "others" clause. This is because it attempts to call Is_OK_Static_Expression() on the N_Others_Choice of the case expression when trying to figure out whether the case is exhaustive or not. Fixing requir

[Ada] Overflow in string streaming

2020-07-16 Thread Pierre-Marie de Rodat
The routine to output strings in an optimized manner has an overflow error in case of very large strings. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-ststop.ads: Fix typo. * libgnat/s-ststop.adb (Read, Write): Fix block number computation to avo

[Ada] Do not perform null exclusion static checks on generated entities

2020-07-16 Thread Pierre-Marie de Rodat
Performing null exclusion checks on generated entities can result in bogus error messages. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch3.adb (Analyze_Object_Declaration): Add Comes_From_Source call.diff --git a/gcc/ada/sem_ch3.adb b/gcc/ada/sem_ch3.adb ---

[Ada] Simplify detection of others choice with just one value

2020-07-16 Thread Pierre-Marie de Rodat
Trivial cleanup with equality between universal integers, which should be much faster than subtraction. Semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_case.adb (Build_Choice): Simplify.diff --git a/gcc/ada/sem_case.adb b/gcc/ada/sem_case.adb ---

[Ada] Ada2020: AI12-0289 Implicitly null excluding anon access

2020-07-16 Thread Pierre-Marie de Rodat
This patch implements AI12-0289. In particular, if an untagged type T is completed with a tagged full type, and a parameter whose type is "access T", where T denotes the partial view in the subprogram spec, an explicit "not null" is required. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/

[Ada] Add centralized capacity check in Generic_Bignums

2020-07-16 Thread Pierre-Marie de Rodat
This replaces the special case done in "**" so far. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * libgnat/s-genbig.adb ("**"): Remove capacity limit check. Improve code by using an extended return. (Normalize): Perform capacity limit check here instead whic

[Ada] Spurious accessibility error on allocator in generic instance

2020-07-16 Thread Pierre-Marie de Rodat
This patch fixes an error in the compiler whereby an allocator for a limited type may cause spurious accessibility errors due to a miscalculation of access levels on internally generated temporaries within the instance. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_ch4

[Ada] Spurious redundant use clause warning

2020-07-16 Thread Pierre-Marie de Rodat
The recent change in Exp_Ch3.Freeze_Type exposes a latent issue in Sem_Ch8.Note_Redundant_Use when Load_RTU triggers at the wrong time, causing spurious redundant use clause warnings. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch8.adb (Note_Redundant_Use): Add missi

[Ada] AI12-0373 Additional check on Integer_Literal function

2020-07-16 Thread Pierre-Marie de Rodat
Part (1) clarifies that we anticipated in Statically_Names_Object, update comment accordingly. Part 4 (4) clarifies: 4.2.1(3/5) says that the only parameter of a user-defined Integer_Literal function is of type String. But it doesn't specify a mode. Since the parameter is passed a string literal,

[Ada] Incorrect static accessibility error in return aggregate

2020-07-16 Thread Pierre-Marie de Rodat
This patch fixes a bug in the compiler whereby a local object of a named access type used as an actual for an anonymous access discriminant within a return aggregate would lead to an incorrect accessibility level calculation and thus an incorrect compile-time accessibility error on such an object.

Re: [PATCH] libsanitizer: Fix GetPcSpBp determination of SP on 32-bit Solaris/x86

2020-07-16 Thread Rainer Orth
Hi Jakub, >> I may still be mistaken, but all this suggests that Linux might be >> playing games with ESP and UESP, while Solaris and NetBSD (see below) >> keep them separate, but in the end UESP is the register to use. > > I think what matters more is > kernel/signal.c and ia32/ia32_signal.c doin

Re: OpenACC 'attach'/'detach' has no business affecting user-visible reference counting

2020-07-16 Thread Thomas Schwinge
Hi Julian! On 2020-06-18T19:21:57+0100, Julian Brown wrote: > On Tue, 9 Jun 2020 12:41:21 +0200 > Thomas Schwinge wrote: >> On 2020-06-05T21:31:08+0100, Julian Brown >> wrote: >> > On Fri, 5 Jun 2020 13:17:09 +0200 >> > Thomas Schwinge wrote: >> >> On 2019-12-17T21:03:47-0800, Julian Brown >>

[wwwdocs PATCH v2] projects/tree-ssa: add a big banner to tree-browser.html

2020-07-16 Thread Hu Jiangping
Hi, Different from Patch v1 which removed the page, I add a big banner to say that the page is no longer up-to-date, just as Richard and Gerald recommended. OK for push? Regards! Hujp --- htdocs/projects/tree-ssa/tree-browser.html | 5 + 1 file changed, 5 insertions(+) diff --git a/htdocs/

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

2020-07-16 Thread Andreas Krebbel via Gcc-patches
On 09.07.20 09:29, Stefan Schulze Frielinghaus wrote: > gcc/ChangeLog: > > * config.in: Regenerate. > * config/s390/s390.c (print_operand): Emit vector alignment hints > for target z13, if AS accepts them. For other targets the logic > stays the same. > * config/s390

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

2020-07-16 Thread Andreas Krebbel via Gcc-patches
On 09.07.20 09:35, Stefan Schulze Frielinghaus wrote: > Bootstrapped and regtested on s390x with and without a patched gas. Ok > for master? > > gcc/ChangeLog: > > * config.in: Regenerate. > * config/s390/s390.c (print_operand): Emit vector alignment hints > for target z13, if A

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

2020-07-16 Thread Andreas Krebbel via Gcc-patches
On 15.07.20 17:53, Stefan Schulze Frielinghaus wrote: > gcc/ChangeLog: > > * config.in: Regenerate. > * config/s390/s390.c (print_operand): Emit vector alignment hints > for target z13, if AS accepts them. For other targets the logic > stays the same. > * config/s390

Re: [PATCH 1/2] S/390: Support vector load/store alignment hints

2020-07-16 Thread Andreas Krebbel via Gcc-patches
On 15.07.20 17:53, Stefan Schulze Frielinghaus wrote: > From: Andreas Krebbel > > The IBM z14 POP adds an optional alignment operand to the vl, vst, > vlm, and vstm instruction (vector loads and stores). Vectors residing > on 8 or 16 byte boundaries might get loaded or stored faster on some > mod