Re: [RFA] Fix various regressions and kernel build failure due to adjust-alignment issue

2020-06-09 Thread Richard Biener via Gcc-patches
On Mon, Jun 8, 2020 at 11:13 PM Jeff Law via Gcc-patches wrote: > > > We're seeing some failures due to the local-alignment pass. For example on > sh4: > > Tests that now fail, but worked before (16 tests): > > gcc.dg/pr48335-1.c (test for excess errors) > gcc.dg/pr48335-2.c (test for excess err

Re: [PR95416] outputs.exp: skip lto tests when not using linker plugin

2020-06-09 Thread Iain Sandoe via Gcc-patches
Hi Alexandre Alexandre Oliva wrote: When the linker plugin is not available, dump outputs in lto runs are different from those outputs.exp tests expect, so skip them for now. Targets (like Darwin too) that don’t have the linker plugin (presumably) use fat LTO objects and drive the LTO proce

[PATCH] libgcov: fix TOPN type casting

2020-06-09 Thread Martin Liška
The patch fixes tree-prof.exp tests on solaris11 and i686-linux-gnu, problem was that sizeof of a pointer is different from sizeof gcov_type. I'm going to install it if there are no objections. Thanks, Martin libgcc/ChangeLog: PR libgcov/95494 * libgcov-driver.c (write_top_count

Re: [PATCH] guard against calls with fewer arguments than the function type implies (PR 95581)

2020-06-09 Thread Richard Biener via Gcc-patches
On Mon, Jun 8, 2020 at 11:59 PM Martin Sebor via Gcc-patches wrote: > > PR 95581 reports an ICE in a call to gimple_call_arg() with > an out-of-bounds argument number (2). The attached patch avoids > the ICE but I'm not sure it's the right fix. Other than verifying > the ICE is gone with a power

Re: avoid line breaks in -fverbose-asm tree exprs

2020-06-09 Thread Richard Biener via Gcc-patches
On Tue, Jun 9, 2020 at 1:47 AM Alexandre Oliva wrote: > > > An asm operand with a "VIEW_CONVERT_EXPR [...] > }>" will output the definition of the struct as asm code. Oops. > > I hoped setting print_rtx_head would affect print_mem_expr, just > because it's in print-rtl rather than tree-pretty-p

[PATCH v2] tsan: Add optional support for distinguishing volatiles

2020-06-09 Thread Marco Elver via Gcc-patches
Add support to optionally emit different instrumentation for accesses to volatile variables. While the default TSAN runtime likely will never require this feature, other runtimes for different environments that have subtly different memory models or assumptions may require distinguishing volatiles.

[PATCH] gcc-changelog: fix deduction for root ChangeLog

2020-06-09 Thread Martin Liška
The patch fixes a wrong ChangeLog regex, pushed to master. Martin contrib/ChangeLog: * gcc-changelog/git_commit.py: Fix ChangeLog regex in order to match the top-level ChangeLog. * gcc-changelog/test_email.py: Add test. * gcc-changelog/test_patches.txt: Likewise.

Re: [PATCH] libsanitizer: use gnu++14

2020-06-09 Thread Martin Liška
On 6/8/20 4:53 PM, Martin Liška wrote: Hi. Thank you for the report. It's caused by fact that LLVM switch in 4d474e078ac7 to c++14. So that I suggest to use gnu++14. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. I also verified that abidiff is equal for all libsanitizer

[Ada] Spurious error on instantiations with Taft_Amendment types and tasks

2020-06-09 Thread Pierre-Marie de Rodat
An access type whose designated type is an incomplete or class-wide type may end up designating a task type or a type with a task component. It is then necessary to associate the access type with the Master of the tasks that may be generated on an allocator for that access type. This is done by cre

[Ada] Remove bypass for instance bodies from Is_Visible_Component

2020-06-09 Thread Pierre-Marie de Rodat
This removes an obsolete bypass present for long in the predicate Is_Visible_Component, which is responsible for determining whether a component present in a private tagged record type is visible in its extensions. This bypass would essentially always return true in bodies of instances, but there

[Ada] Ada2020: AI12-0301 Predicates and Default_Value

2020-06-09 Thread Pierre-Marie de Rodat
This AI clarifies that predicate checks apply at object declaration for types that contain components with a Default_Value or Default_Component_Value. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-09 Arnaud Charlet gcc/ada/ * sem_util.ads, sem_util.adb (Is_Partially_Initi

[Ada] Refine implementation of AI05-0149 missing conversion checks

2020-06-09 Thread Pierre-Marie de Rodat
We were accepting conversion from anon-access-T'Class to access-all-T which is incorrect. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-09 Arnaud Charlet gcc/ada/ * sem_type.adb (Covers): Fix implementation of AI05-0149. * sem_res.adb: Fix typo.--- gcc/ada/sem_res

[Ada] Ada2020 AI12-0282: Shared variable control aspects in generics

2020-06-09 Thread Pierre-Marie de Rodat
This patch refines the checks and the corresponding error messsages on the legality of instantiations where some formal objects and their corresponding actuals may carry Atomic, Atonic_Components, Volatile, Volatile_Components, Independent, or Independent_Components aspect specifications. The lega

[Ada] Annotate Ada.Synchronous_Barriers with SPARK_Mode => Off

2020-06-09 Thread Pierre-Marie de Rodat
Synchronous barriers are currently not supported by GNATprove (i.e. it doesn't recognize that they are initialized by synchronous). They are specifically detected and rejected as not-in-SPARK, but it is more elegant to annotate the Ada.Synchronous runtime library unit with SPARK_Mode => Off. Compi

[Ada] Spurious overlap error on zero-sized arrays with -gnateV

2020-06-09 Thread Pierre-Marie de Rodat
This patch corrects an issue whereby the compiler would incorrectly generate checks for overlapping formals (-gnateV) leading to spurious runtime errors when a zero-sized array actual gets passed alongside another formal declared in the same region. Tested on x86_64-pc-linux-gnu, committed on trun

[Ada] Crash on exit statement within predicated loop

2020-06-09 Thread Pierre-Marie de Rodat
This patch corrects an issue whereby the compiler would crash if it encountered an exit statement featuring a loop identifier where such referenced loop iterates through a predicated type. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-09 Justin Squirek gcc/ada/ * exp_ch5.

[Ada] Write_Invocation_Graph_Vertex: include lib item name

2020-06-09 Thread Pierre-Marie de Rodat
Make each invocation graph point to the corresponding library graph. Use this information in Write_Invocation_Graph_Vertex to print out the name of the library item containing this vertex. For procedures that take both the library graph and invocation graph as parameters, remove the library graph

[Ada] Add debugging message

2020-06-09 Thread Pierre-Marie de Rodat
When raising Program_Error due to an incorrect Kind transition, print a more informative debugging message. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-09 Bob Duff gcc/ada/ * bindo-graphs.adb (Add_Edge_Kind_Check): Add the Image of the old and new Kinds to the r

[Ada] Membership test against a non-excluding subtype

2020-06-09 Thread Pierre-Marie de Rodat
GNAT ignores the null exclusion property of the target access type in a membership test (e.g. Ptr in Null_Excluding_Ptr_Type), this is fixed here. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-09 Arnaud Charlet gcc/ada/ * exp_ch4.adb (Expand_N_In): Fix handling of null ex

[Ada] gnatbind: Correct assertions in Add_Edge_Kind_Check

2020-06-09 Thread Pierre-Marie de Rodat
This patch corrects the assertions in Add_Edge_Kind_Check. In particular, a spec-->body edge can come from an Invocation_Edge or a Forced_Edge in case of cycles. Other edges are added in a certain order. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-09 Bob Duff gcc/ada/

[Ada] Disable assertion regarding Body_Before_Spec_Edge

2020-06-09 Thread Pierre-Marie de Rodat
This patch disables a sometimes-failing assertion. The assertion is failing because there is an invocation edge spec-->body, and then we later add a Body_Before_Spec_Edge for the SCC computation. This is a temporary fix; we need to investigate why the spec-->body invocation edge exists. Tested on

[Ada] Improve handling of null unbounded strings

2020-06-09 Thread Pierre-Marie de Rodat
This is a useful optimization to avoid contention around the shared empty string. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-09 Arnaud Charlet gcc/ada/ * libgnat/a-strunb__shared.ads, libgnat/a-strunb__shared.adb (Reference, Unreference): No-op for Empty_Shared

[Ada] Improve handling of aggregates in Side_Effect_Free

2020-06-09 Thread Pierre-Marie de Rodat
Side_Effect_Free was always assuming an aggregate isn't side effects free, but we can do better by taking advantage of the Compile_Time_Known_Aggregate flag. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-09 Arnaud Charlet gcc/ada/ * exp_util.adb (Side_Effect_Free): Improv

[Ada] Implement AI12-0028: Import of variadic C functions

2020-06-09 Thread Pierre-Marie de Rodat
This implements the support for the new C_Variadic_n conventions, n ranging from 0 to 16, in all versions of the language since the AI is a binding interpretation. These new conventions are meant to be used in conjunction with the Import aspect/pragma to call variadic C functions with the special

[Ada] Expand more others aggregates statically

2020-06-09 Thread Pierre-Marie de Rodat
Now that there is no artifical limit on Convert_To_Positional, we use the same heuristics than in Aggr_Size_OK, to share the code and to generate static aggregates in more cases. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-09 Arnaud Charlet gcc/ada/ * exp_aggr.adb (Max_

[Ada] Small cleanup in Einfo unit

2020-06-09 Thread Pierre-Marie de Rodat
This moves around the declarations of functions that are not in the right category, adds pragma Inline for others and fixes alphabetization issues. This also clearly splits the functions subject to pragma Inline from the procedures subject to the pragma, the former being read by XEINFO but not the

[Ada] Code clean ups and comments updates

2020-06-09 Thread Pierre-Marie de Rodat
We identify all the places where error messages are issued in the expander and should be issued in semantic analysis instead, for future clean ups. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-09 Arnaud Charlet gcc/ada/ * exp_ch3.adb, exp_ch4.adb, exp_ch6.adb, exp_ch9.ad

[Ada] Missing check on private overriding of dispatching primitive

2020-06-09 Thread Pierre-Marie de Rodat
When a dispatching operation overrides an inherited subprogram, it must be subtype conformant with the inherited subprogram. Such check is not performed by the frontend on overriding primitives of private types which are declared before the full type declaration of the private type. Tested on x86

[Ada] Propagate DIC, Invariant and Predicate attributes to views

2020-06-09 Thread Pierre-Marie de Rodat
This change is a step towards propagating more consistently the DIC, Invariant and Predicate attributes between different views of the same type, in particular to the newly built underlying full views. It also cleans up the handling of the base types for the DIC and Invariant attributes, which loo

[Ada] Fix wrong type being used for range check generation

2020-06-09 Thread Pierre-Marie de Rodat
Before this commit, GNAT would use the type of the expression rather than that of the subtype mark in order to decide whether it should generate range checks or not. This means that in some cases, GNAT would decide that no range checks were needed, which was wrong. This issue went mostly unnoticed

[Ada] Ada2020 AI12-0282: Shared variable control aspects in generics

2020-06-09 Thread Pierre-Marie de Rodat
This patch further refines the checks and the corresponding error messsages on the legality of instantiations where some formal types and their corresponding actuals may carry Atomic, Volatile, etc. aspect specifications. The legality rules stated in RN 6.1 (12/5) are in fact backward-incompatibl

[Ada] Remove kludge for AI05-0087

2020-06-09 Thread Pierre-Marie de Rodat
This is a code clean up as part of removing all calls to Error_Msg* in the expander. Tested on x86_64-pc-linux-gnu, committed on trunk 2020-06-09 Arnaud Charlet gcc/ada/ * exp_ch5.adb (Expand_N_Assignment): Remove kludge for AI05-0087. * sem_ch12.adb (Validate_Derived

Re: [patch] Make memory copy functions scalar storage order barriers

2020-06-09 Thread Richard Biener via Gcc-patches
On Mon, Jun 8, 2020 at 10:37 AM Eric Botcazou wrote: > > > OK, but all I was saying is that looking at the pointed-to type of > > the address argument to the memcpy looks fragile to me. For the > > case cited above it would be better to look at the actual > > reference we are looking up and not a

Re: Fix ICE with typeless storage

2020-06-09 Thread Richard Biener via Gcc-patches
On Fri, Jun 5, 2020 at 11:08 AM Jan Hubicka wrote: > > 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 pointer

[PATCH/RFC] How to fix PR95440

2020-06-09 Thread Iain Sandoe
Hi C++ folks, There are a number of places in the coroutine codegen where we need to build calls to promise methods. Such methods can, in several cases, also be constexpr or static (or both) which leads to the PR, Now the mechanism I use is this; 1/ lookup the method in the relevant scop

Re: [PATCH v2] tsan: Add optional support for distinguishing volatiles

2020-06-09 Thread Martin Liška
On 6/9/20 9:48 AM, Marco Elver wrote: v2: * Add Optimization keyword to -param=tsan-distinguish-volatile= as the parameter can be different per TU. * Add tree-dump check to test. Hello. I support the patch. @Jakub: Can you please approve the patch? Thanks, Martin

[PATCH PR95569] ICE in tmmark:verify_ssa failed

2020-06-09 Thread qianchao
Hi Commit eb72dc663e9070b281be83a80f6f838a3a878822 introduces a ICE on AArch64. See the discussion on the bug for details. Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95569 Trivial patch fixing the ICE attached. Bootstrap and tested on aarch64 platform. No new regression witnessed

Re: [PATCH v2] arm: Warn if IRQ handler is not compiled with -mgeneral-regs-only [PR target/94743]

2020-06-09 Thread Christophe Lyon via Gcc-patches
Ping? Maybe I could mention that LLVM emits a warning in this case (https://reviews.llvm.org/D28820). Thanks, Christophe On Wed, 3 Jun 2020 at 15:23, Christophe Lyon wrote: > > Ping? > https://gcc.gnu.org/pipermail/gcc-patches/2020-May/545747.html > > On Wed, 27 May 2020 at 13:52, Christophe

Re: [PATCH v2] tsan: Add optional support for distinguishing volatiles

2020-06-09 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 09, 2020 at 09:48:34AM +0200, Marco Elver wrote: > gcc/ > * params.opt: Define --param=tsan-distinguish-volatile=[0,1]. > * sanitizer.def (BUILT_IN_TSAN_VOLATILE_READ1): Define new > builtin for volatile instrumentation of reads/writes. > (BUILT_IN_TSAN_VOLATILE_

Re: [PATCH v2] tsan: Add optional support for distinguishing volatiles

2020-06-09 Thread Marco Elver via Gcc-patches
On Tue, 9 Jun 2020 at 11:50, Jakub Jelinek wrote: > > On Tue, Jun 09, 2020 at 09:48:34AM +0200, Marco Elver wrote: > > gcc/ > > * params.opt: Define --param=tsan-distinguish-volatile=[0,1]. > > * sanitizer.def (BUILT_IN_TSAN_VOLATILE_READ1): Define new > > builtin for volatile in

Re: [PATCH v2] tsan: Add optional support for distinguishing volatiles

2020-06-09 Thread Marco Elver via Gcc-patches
Just wanted to change this one, and noticed this > > +DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_VOLATILE_WRITE16, > > "__tsan_volatile_write16", > > + BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST) is precisely 80 characters. So if I read the style guide right, it's <= 80 chars (and not < 8

Re: [PATCH v2] tsan: Add optional support for distinguishing volatiles

2020-06-09 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 09, 2020 at 12:08:07PM +0200, Marco Elver wrote: > Just wanted to change this one, and noticed this > > > > +DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_VOLATILE_WRITE16, > > > "__tsan_volatile_write16", > > > + BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST) > > is precisely 80 ch

Re: [patch] Make memory copy functions scalar storage order barriers

2020-06-09 Thread Eric Botcazou
> I'm probably completely misunderstanding how TYPE_REVERSE_STORAGE_ORDER > works and what the constraints are. But if the memcpy is the storage order > barrier then what cases are OK? > > - both source and destination objects are [only] accessed with the same >storage order > - both source

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

2020-06-09 Thread Jonathan Wakely via Gcc-patches
On 08/06/20 19:20 +0100, Jonathan Wakely wrote: On 05/06/20 22:24 +0200, François Dumont via Libstdc++ wrote: 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 imp

OpenACC 'attach'/'detach' has no business affecting user-visible reference counting (was: [PATCH 07/13] OpenACC 2.6 deep copy: libgomp parts)

2020-06-09 Thread Thomas Schwinge
Hi Julian! 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 >> wrote: >> > This part contains the libgomp runtime support for the >> > GOMP_MAP_ATTACH and GOMP_MAP_DETACH mapping kinds >> >

Re: [PATCH v2] tsan: Add optional support for distinguishing volatiles

2020-06-09 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 09, 2020 at 12:01:24PM +0200, Marco Elver wrote: > > Do we need/want Optimization here? Optimization means the option is > > per-function, but to me whether you want to distinguish volatiles or not > > seems to be a global decision for the whole project. > > Adding Optimization here w

Re: [PATCH] libgcov: fix TOPN type casting

2020-06-09 Thread Martin Liška
On 6/9/20 9:33 AM, Martin Liška wrote: I'm going to install it if there are no objections. Pushed as 862b9b225fb. Martin

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

2020-06-09 Thread Martin Liška
On 6/8/20 1:07 PM, Martin Liška wrote: Can you please test the following patch candidate: I've just pushed 862b9b225fb which should fix that. Can you please test the current master? Thanks, Martin

[PATCH] gcov: improve --coverage small example

2020-06-09 Thread Martin Liška
Pushed to master. gcc/ChangeLog: PR gcov-profile/95365 * doc/gcov.texi: Compile and link one example in 2 steps. --- gcc/doc/gcov.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/doc/gcov.texi b/gcc/doc/gcov.texi index 61250c9407e..22e42da2ea6 10064

Re: [PATCH] AArch64: Adjust costing of by element MUL to be the same as SAME3 MUL.

2020-06-09 Thread Tamar Christina
Hi Richard, The 06/08/2020 16:42, Richard Sandiford wrote: > Tamar Christina writes: > > diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c > > index > > 97da60762390db81df9cffaf316b909cd1609130..9cc8da338125afa01bc9fb645f4112d2d7ef548c > > 100644 > > --- a/gcc/config/aar

Re: [PATCH] AArch64: Adjust costing of by element MUL to be the same as SAME3 MUL.

2020-06-09 Thread Richard Sandiford
Tamar Christina writes: > Hi Richard, > The 06/08/2020 16:42, Richard Sandiford wrote: >> Tamar Christina writes: >> > diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c >> > index >> > 97da60762390db81df9cffaf316b909cd1609130..9cc8da338125afa01bc9fb645f4112d2d7ef548c >> >

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

2020-06-09 Thread Martin Liška
Hello. The patch is follow up of the kernel discussion: https://lore.kernel.org/lkml/canpmjnnrz5ovkb6pe7k6gjfogbht_zhypkng9ad+kjndzk7...@mail.gmail.com/ The patch changes inliner in the following way: 1) do not compare caller and callee sanitizer attributes for always_inline functions - that

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

2020-06-09 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 09, 2020 at 01:53:38PM +0200, Martin Liška wrote: > + const sanitize_code codes[] = > +{ > + SANITIZE_ADDRESS, > + SANITIZE_THREAD, > + SANITIZE_LEAK, Why leak? That is really a link time option only, doesn't affect code generation in any way. On the other side, d

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

2020-06-09 Thread Martin Liška
On 6/9/20 2:01 PM, Jakub Jelinek wrote: On Tue, Jun 09, 2020 at 01:53:38PM +0200, Martin Liška wrote: + const sanitize_code codes[] = +{ + SANITIZE_ADDRESS, + SANITIZE_THREAD, + SANITIZE_LEAK, Why leak? I was too eager ;) That is really a link time option only, doesn't

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

2020-06-09 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 09, 2020 at 02:09:06PM +0200, Martin Liška wrote: > - return ((sanitize_flags_p (SANITIZE_ADDRESS, caller) > -== sanitize_flags_p (SANITIZE_ADDRESS, callee)) > - && (sanitize_flags_p (SANITIZE_POINTER_COMPARE, caller) > - == sanitize_flags_p (SANITIZE_POINTER_CO

Re: [PATCH] AArch64: Adjust costing of by element MUL to be the same as SAME3 MUL.

2020-06-09 Thread Tamar Christina
Hi Richard, The 06/09/2020 12:44, Richard Sandiford wrote: > Tamar Christina writes: > > Hi Richard, > > The 06/08/2020 16:42, Richard Sandiford wrote: > >> Tamar Christina writes: > >> > diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c > >> > index > >> > 97da60762390db

Re: OpenACC 'attach'/'detach' has no business affecting user-visible reference counting (was: [PATCH 07/13] OpenACC 2.6 deep copy: libgomp parts)

2020-06-09 Thread Julian Brown
On Tue, 9 Jun 2020 12:41:21 +0200 Thomas Schwinge wrote: > Hi Julian! > > On 2020-06-05T21:31:08+0100, Julian Brown > wrote: > >> For the OpenACC runtime API 'acc_attach' etc. routines they don't, > >> so what's the conceptual reason that for the corresponding OpenACC > >> directive variants, '

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

2020-06-09 Thread Thomas Schwinge
Hi! On 2020-05-26T04:08:44-0300, Alexandre Oliva wrote: > Thanks, here's the combined patch I'm checking in. > > revamp dump and aux output names For BRIG (HSAIL) front end testing, I'm see a lot of failures like: Running [...]/source-gcc/gcc/testsuite/brig.dg/dg.exp ... PASS: brig.dg/t

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

2020-06-09 Thread Martin Liška
On 6/9/20 2:15 PM, Jakub Jelinek wrote: Sorry for not writing everything at once, but are the SANITIZER_POINTER_{COMPARE,SUBTRACT} differences unimportant? They are. I got confused that they are not part of SANITIZE_UNDEFINED or SANITIZE_UNDEFINED_NONDEFAULT. Anyway, good point! Martin >From

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

2020-06-09 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 09, 2020 at 02:32:36PM +0200, Martin Liška wrote: > >From 5fe0671ad79d14d1c9d0fead1a471875a4416fac Mon Sep 17 00:00:00 2001 > From: Martin Liska > Date: Tue, 9 Jun 2020 13:03:55 +0200 > Subject: [PATCH] sanitizer: do not inline no-sanitize into sanitizer fn > > gcc/ChangeLog: > >

[PATCH] gcov-dump: fix --help spacing

2020-06-09 Thread Martin Liška
Pushed to master. gcc/ChangeLog: * gcov-dump.c (print_usage): Fix spacing for --raw option in --help. --- gcc/gcov-dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/gcov-dump.c b/gcc/gcov-dump.c index 90cbd1ace52..ffb71ca4b68 100644 --- a/gcc/gcov-du

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

2020-06-09 Thread Eric Botcazou
> Yes, but the problem is that remap_decl isn't getting called. Right, I can get it to be called by adding a pushdecl to grokdeclarator... > Attaching it to the BIND_EXPR doesn't help walk_tree_1 do the right > thing with the DECL_EXPR. ... but, indeed, this still ICEs. So the key is that the D

BRIG FE testsuite: Fix all dump-scans (Was: Re: drop -aux{dir, base}, revamp -dump{dir, base})

2020-06-09 Thread Martin Jambor
Hi, On Tue, Jun 09 2020, Thomas Schwinge wrote: > Hi! > > On 2020-05-26T04:08:44-0300, Alexandre Oliva wrote: >> Thanks, here's the combined patch I'm checking in. >> >> revamp dump and aux output names > > For BRIG (HSAIL) front end testing, I'm see a lot of failures like: > > Running [...]/

Re: [PATCH PR95569] ICE in tmmark:verify_ssa failed

2020-06-09 Thread Richard Biener via Gcc-patches
On Tue, Jun 9, 2020 at 11:47 AM qianchao wrote: > > Hi > > Commit eb72dc663e9070b281be83a80f6f838a3a878822 introduces a ICE on AArch64. > See the discussion on the bug for details. > Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95569 > > Trivial patch fixing the ICE attached. > > Bootstrap a

Re: [patch] Make memory copy functions scalar storage order barriers

2020-06-09 Thread Richard Biener via Gcc-patches
On Tue, Jun 9, 2020 at 12:19 PM Eric Botcazou wrote: > > > I'm probably completely misunderstanding how TYPE_REVERSE_STORAGE_ORDER > > works and what the constraints are. But if the memcpy is the storage order > > barrier then what cases are OK? > > > > - both source and destination objects are

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

2020-06-09 Thread Thomas Schwinge
Hi! On 2020-05-26T04:08:44-0300, Alexandre Oliva wrote: > Thanks, here's the combined patch I'm checking in. > > revamp dump and aux output names For libgomp offloading testing, I'm seeing a number of failures like: UNSUPPORTED: libgomp.oacc-c/../libgomp.oacc-c-c++-common/nvptx-merged-loop

[PATCH v3] tsan: Add optional support for distinguishing volatiles

2020-06-09 Thread Marco Elver via Gcc-patches
Add support to optionally emit different instrumentation for accesses to volatile variables. While the default TSAN runtime likely will never require this feature, other runtimes for different environments that have subtly different memory models or assumptions may require distinguishing volatiles.

Re: [PATCH v3] tsan: Add optional support for distinguishing volatiles

2020-06-09 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 09, 2020 at 03:15:39PM +0200, Marco Elver wrote: > gcc/ > * params.opt: Define --param=tsan-distinguish-volatile=[0,1]. > * sanitizer.def (BUILT_IN_TSAN_VOLATILE_READ1): Define new > builtin for volatile instrumentation of reads/writes. > (BUILT_IN_TSAN_VOLATILE_

RE: [PATCH] move permutation validity check

2020-06-09 Thread Alex Coplan
> -Original Message- > From: Gcc-patches On Behalf Of Richard > Biener > Sent: 05 May 2020 14:49 > To: gcc-patches@gcc.gnu.org > Subject: [PATCH] move permutation validity check > > > This delays the SLP permutation check to vectorizable_load and optimizes > permutations only after all S

Re: [PATCH] move permutation validity check

2020-06-09 Thread Richard Biener via Gcc-patches
On Tue, Jun 9, 2020 at 3:22 PM Alex Coplan wrote: > > > -Original Message- > > From: Gcc-patches On Behalf Of Richard > > Biener > > Sent: 05 May 2020 14:49 > > To: gcc-patches@gcc.gnu.org > > Subject: [PATCH] move permutation validity check > > > > > > This delays the SLP permutation che

RE: [PATCH] move permutation validity check

2020-06-09 Thread Alex Coplan
> -Original Message- > From: Richard Biener > Sent: 09 June 2020 14:24 > To: Alex Coplan > Cc: Richard Biener ; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] move permutation validity check > > On Tue, Jun 9, 2020 at 3:22 PM Alex Coplan wrote: > > > > > -Original Message- > > >

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

2020-06-09 Thread Richard Biener via Gcc-patches
On Mon, Jun 8, 2020 at 1:04 PM Martin Liška wrote: > > Hello. > > Thank you for the approval. There's the patch that defines 4 new > DEF_INTERNAL_OPTAB_FN. > > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > It also builds on ppc64le-linux-gnu. > > Ready to be installed?

Re: [PATCH v3] tsan: Add optional support for distinguishing volatiles

2020-06-09 Thread Marco Elver via Gcc-patches
On Tue, 9 Jun 2020 at 15:22, Jakub Jelinek wrote: > > On Tue, Jun 09, 2020 at 03:15:39PM +0200, Marco Elver wrote: > > gcc/ > > * params.opt: Define --param=tsan-distinguish-volatile=[0,1]. > > * sanitizer.def (BUILT_IN_TSAN_VOLATILE_READ1): Define new > > builtin for volatile in

[PATCH] Remove dead code

2020-06-09 Thread Richard Biener
This removes dead code that was left over from the reduction vectorization refactoring last year. Bootstrapped / tested on x86_64-unknown-linux-gnu, applied. Richard. 2020-06-09 Richard Biener * tree-vect-stmts.c (vect_transform_stmt): Remove dead code. --- gcc/tree-vect-stmts.c | 4

Re: [Patch][RFC] openmp: ensure variables in offload table are streamed out (PRs 94848 + 95551)

2020-06-09 Thread Tobias Burnus
It turned out that this patch fails with LTO and partitions, causing fails at runtime such as libgomp: Duplicate node via libgomp/splay-tree.c's splay_tree_insert. In the test case, the problem occurred for functions - namely main._omp_fn.* on the host. If the code is run in LTO context, the fi

Re: [Patch][RFC] openmp: ensure variables in offload table are streamed out (PRs 94848 + 95551)

2020-06-09 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 09, 2020 at 04:02:19PM +0200, Tobias Burnus wrote: > It turned out that this patch fails with LTO and partitions, > causing fails at runtime such as > libgomp: Duplicate node > via libgomp/splay-tree.c's splay_tree_insert. > > In the test case, the problem occurred for functions - na

[RFC][vect] BB SLP reduction prototype

2020-06-09 Thread Andre Vieira (lists)
Hi, So this is my rework of the code you sent me, I have not included the 'permute' code you included as I can't figure out what it is meant to be doing. Maybe something to look at later. I have also included three tests that show it working for some simple cases and even a nested one. Unf

Re: [PR95416] outputs.exp: skip lto tests when not using linker plugin

2020-06-09 Thread Rainer Orth
Hi Alexandre, > When the linker plugin is not available, dump outputs in lto runs are > different from those outputs.exp tests expect, so skip them for now. > > Regstrapped on x86_64-linux-gnu. Ok to install? > > > for gcc/testsuite/ChangeLog > > * outputs.exp (skip_lto): Set when missing

Re: [PATCH] rs6000/testsuite: Allow xxperm* instead of only vperm*

2020-06-09 Thread will schmidt via Gcc-patches
On Tue, 2020-06-09 at 01:00 +, Segher Boessenkool wrote: > Some testcases failed (esp. with --with-cpu=power9) after my change > to > prefer xxperm over vperm when all else is equal. Fix that. (This > also > tightens the relevant REs somewhat). > > Tested on way too many configurations. Com

Re: [RFC][vect] BB SLP reduction prototype

2020-06-09 Thread Andre Vieira (lists)
The 'you' here is Richi, which Richi is probably aware but maybe not the rest of the list :') On 09/06/2020 15:29, Andre Vieira (lists) wrote: Hi, So this is my rework of the code you sent me, I have not included the 'permute' code you included as I can't figure out what it is meant to be do

Re: [RFA] Fix various regressions and kernel build failure due to adjust-alignment issue

2020-06-09 Thread Jeff Law via Gcc-patches
On Tue, 2020-06-09 at 09:17 +0200, Richard Biener wrote: > On Mon, Jun 8, 2020 at 11:13 PM Jeff Law via Gcc-patches > wrote: > > > > We're seeing some failures due to the local-alignment pass. For example on > > sh4: > > > > Tests that now fail, but worked before (16 tests): > > > > gcc.dg/pr

Re: [RFA] Fix various regressions and kernel build failure due to adjust-alignment issue

2020-06-09 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 09, 2020 at 08:54:47AM -0600, Jeff Law via Gcc-patches wrote: > > While technically OK the issue is that it does not solve the x86 issue > > which with incoming stack alignment < 8 bytes does not perform > > dynamic re-alignment to align 'long long' variables appropriately. > > Currentl

Re: [RFA] Fix various regressions and kernel build failure due to adjust-alignment issue

2020-06-09 Thread Jeff Law via Gcc-patches
On Tue, 2020-06-09 at 16:59 +0200, Jakub Jelinek wrote: > On Tue, Jun 09, 2020 at 08:54:47AM -0600, Jeff Law via Gcc-patches wrote: > > > While technically OK the issue is that it does not solve the x86 issue > > > which with incoming stack alignment < 8 bytes does not perform > > > dynamic re-alig

Re: [RFA] Fix various regressions and kernel build failure due to adjust-alignment issue

2020-06-09 Thread Jakub Jelinek via Gcc-patches
On Tue, Jun 09, 2020 at 09:18:25AM -0600, Jeff Law wrote: > On Tue, 2020-06-09 at 16:59 +0200, Jakub Jelinek wrote: > > On Tue, Jun 09, 2020 at 08:54:47AM -0600, Jeff Law via Gcc-patches wrote: > > > > While technically OK the issue is that it does not solve the x86 issue > > > > which with incomin

Re: [RFA] Fix various regressions and kernel build failure due to adjust-alignment issue

2020-06-09 Thread Jeff Law via Gcc-patches
On Tue, 2020-06-09 at 17:26 +0200, Jakub Jelinek wrote: > On Tue, Jun 09, 2020 at 09:18:25AM -0600, Jeff Law wrote: > > On Tue, 2020-06-09 at 16:59 +0200, Jakub Jelinek wrote: > > > On Tue, Jun 09, 2020 at 08:54:47AM -0600, Jeff Law via Gcc-patches wrote: > > > > > While technically OK the issue is

Re: [PATCH] guard against calls with fewer arguments than the function type implies (PR 95581)

2020-06-09 Thread Martin Sebor via Gcc-patches
On 6/9/20 1:43 AM, Richard Biener wrote: On Mon, Jun 8, 2020 at 11:59 PM Martin Sebor via Gcc-patches wrote: PR 95581 reports an ICE in a call to gimple_call_arg() with an out-of-bounds argument number (2). The attached patch avoids the ICE but I'm not sure it's the right fix. Other than ver

Re: [PATCH] guard against calls with fewer arguments than the function type implies (PR 95581)

2020-06-09 Thread Richard Biener via Gcc-patches
On Tue, Jun 9, 2020 at 5:51 PM Martin Sebor wrote: > > On 6/9/20 1:43 AM, Richard Biener wrote: > > On Mon, Jun 8, 2020 at 11:59 PM Martin Sebor via Gcc-patches > > wrote: > >> > >> PR 95581 reports an ICE in a call to gimple_call_arg() with > >> an out-of-bounds argument number (2). The attache

[pushed] c++: Tweak predeclare_vla.

2020-06-09 Thread Jason Merrill via Gcc-patches
We only need to predeclare a VLA type if it's wrapped in a pointer type; otherwise gimplify_type_sizes will handle it. Tested x86_64-pc-linux-gnu, applying to trunk. gcc/cp/ChangeLog: PR c++/95552 * cp-gimplify.c (predeclare_vla): Only predeclare a VLA if it's wrapped in

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

2020-06-09 Thread Jason Merrill via Gcc-patches
On 6/9/20 8:41 AM, Eric Botcazou wrote: Yes, but the problem is that remap_decl isn't getting called. Right, I can get it to be called by adding a pushdecl to grokdeclarator... Attaching it to the BIND_EXPR doesn't help walk_tree_1 do the right thing with the DECL_EXPR. ... but, indeed, thi

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

2020-06-09 Thread Jonathan Wakely via Gcc-patches
On 09/06/20 00:02 +0100, Jonathan Wakely wrote: On 08/06/20 22:08 +0100, Jonathan Wakely wrote: On 08/06/20 19:20 +0100, Jonathan Wakely wrote: On 05/06/20 22:24 +0200, François Dumont via Libstdc++ wrote: Hi     Here is the last of my algo patches this time to extend the memcmp optimiza

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

2020-06-09 Thread Jonathan Wakely via Gcc-patches
On 09/06/20 17:11 +0100, Jonathan Wakely wrote: On 09/06/20 00:02 +0100, Jonathan Wakely wrote: On 08/06/20 22:08 +0100, Jonathan Wakely wrote: On 08/06/20 19:20 +0100, Jonathan Wakely wrote: On 05/06/20 22:24 +0200, François Dumont via Libstdc++ wrote: Hi     Here is the last of my algo

[PATCH] Remove dead code

2020-06-09 Thread Richard Biener
This removes dead code left over from the reduction vectorization refactoring last year. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2020-06-09 Richard Biener * tree-vect-loop.c (vectorizable_induction): Remove dead code. --- gcc/tree-vect-loop.c | 42 ---

Re: [PATCH] libsanitizer: use gnu++14

2020-06-09 Thread Richard Biener via Gcc-patches
On Tue, Jun 9, 2020 at 10:09 AM Martin Liška wrote: > > On 6/8/20 4:53 PM, Martin Liška wrote: > > Hi. > > > > Thank you for the report. It's caused by fact that LLVM switch in > > 4d474e078ac7 > > to c++14. So that I suggest to use gnu++14. > > > > Patch can bootstrap on x86_64-linux-gnu and sur

PING^1 [PATCH 0/2] x86: Add cmpmemsi for -minline-all-stringops

2020-06-09 Thread H.J. Lu via Gcc-patches
On Sun, May 31, 2020 at 4:10 PM H.J. Lu wrote: > > We used to expand memcmp to "repz cmpsb" via cmpstrnsi. It was changed > by > > commit 9b0f6f5e511ca512e4faeabc81d2fd3abad9b02f > Author: Nick Clifton > Date: Fri Aug 12 16:26:11 2011 + > > builtins.c (expand_builtin_memcmp): Do not us

PING^2: [PATCH] x86: Add UNSPECV_PATCHABLE_AREA

2020-06-09 Thread H.J. Lu via Gcc-patches
On Fri, May 22, 2020 at 4:22 AM H.J. Lu wrote: > > On Sat, May 2, 2020 at 4:55 AM H.J. Lu wrote: > > > > Currently patchable area is at the wrong place. It is placed immediately > > after function label, before both .cfi_startproc and ENDBR. This patch > > adds UNSPECV_PATCHABLE_AREA for pseudo

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

2020-06-09 Thread H.J. Lu via Gcc-patches
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 master? > >> > >> Thank you for the updated patch. > >> > >> I h

Ping: [PATCH] diagnostics: Add options to control the column units [PR49973] [PR86904]

2020-06-09 Thread Lewis Hyatt via Gcc-patches
May I please ping this patch? https://gcc.gnu.org/pipermail/gcc-patches/2020-May/545426.html Thanks! -Lewis On Fri, May 08, 2020 at 03:35:25PM -0400, Lewis Hyatt wrote: > On Fri, Jan 31, 2020 at 03:31:59PM -0500, David Malcolm wrote: > > On Fri, 2020-01-31 at 14:31 -0500, Lewis Hyatt wrote: > >

[committed] d: Merge upstream dmd 13d67c575.

2020-06-09 Thread Iain Buclaw via Gcc-patches
Hi, This patch merges the D front-end implementation with upstream dmd 13d67c575. Contains many small API changes, most contained within the front-end, but some spill out into the codegen. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. gcc/d/C

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

2020-06-09 Thread Thomas Koenig via Gcc-patches
Hi Bernhard, For Fortran identifiers, that would be really good. Would you do that? Is it really needed? We do not enter internal helper names (class names, anything artificial, anything leading underscore or leading uppercase) to the suggestions proposals so should never actually recommend a

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

2020-06-09 Thread Eric Botcazou
> Like this? Fine with me, thanks! -- Eric Botcazou

  1   2   >