Re: [PATCH] Fix symver attribute with LTO

2019-12-17 Thread Jan Hubicka
> Hi, > with Jan's patch commited in r278878 we can use symver attribute for functions > and variables. The symver attribute is designed for replacing toplevel asm > statements containing ".symver" which may be removed by LTO. Unfortunately, > a quick test shown GCC still generates buggy so file

Re: [patch] libgomp/openacc.f90 – clean-up public/private attributes

2019-12-17 Thread Tobias Burnus
Hi Thomas, updated version committed (r279456) – which adds 'acc_device_gcn' to openacc_lib.h – besides the other cleanup. On 12/16/19 9:41 PM, Thomas Schwinge wrote I'll point out there also exists 'libgomp/config/accel/openacc.f90', I have now updated that file in the same way – and added

Re: [Patch 0/X] HWASAN v3

2019-12-17 Thread Matthew Malcomson
I've noticed a few minor problems with this patch series after I sent it out (mostly testcase stuff, one documentation tidy-up, but also that one patch didn't bootstrap due to something fixed in a later patch). I also rely on a documentation change that isn't part of the series. I figure I

[PATCH] IPA-CP: Remove bogus static keyword (PR 92971)

2019-12-17 Thread Martin Jambor
Hi, as reported in PR 92971, IPA-CP's cgraph_edge_brings_all_agg_vals_for_node defines one local variable with the static keyword which is a clear mistake, probabley a cut'n'paste error when I originally wrote the code. I'll commit the following as obvious after a round of bootstrap and testing.

Re: Move -Wmaybe-uninitialized to -Wextra

2019-12-17 Thread Pedro Alves
On 12/16/19 2:45 PM, Martin Jambor wrote: > On Sat, Dec 07 2019, Jeff Law wrote: >> [...] > I'm afraid I that -Wmaybe-uninitialized is getting out of hand. I bet > that some users regularly get these warnings coming from c++ header > "libraries" (like they sometimes come out our vec.h which

[committed, amdgcn] Implement clz and ctz

2019-12-17 Thread Andrew Stubbs
This patch implements the count leading and trailing zeros instruction patterns in the AMD GCN backend. This is prerequisite for implementing the extract_last patterns. Andrew Stubbs Mentor Graphics / CodeSourcery Add clz and ctz for amdgcn 2019-12-17 Andrew Stubbs gcc/ *

[committed, amdgcn] Implement extract_last and fold_extract_last

2019-12-17 Thread Andrew Stubbs
This patch implements the vector extract last instruction patterns in the AMD GCN backend. This is both an optimization and a "fix" for pr92772, in which the conditional reduction algorithm is broken for architectures with masked vectors. This fixes too many testcase failures in vect.exp to

Re: [PATCH] Fix symver attribute with LTO

2019-12-17 Thread Xi Ruoyao
On 2019-12-17 09:32 +0100, Jan Hubicka wrote: > > Hi, > > with Jan's patch commited in r278878 we can use symver attribute for > > functions > > and variables. The symver attribute is designed for replacing toplevel asm > > statements containing ".symver" which may be removed by LTO.

[PATCH 3/4] Also propagate SRA accesses from LHS to RHS (PR 92706)

2019-12-17 Thread Martin Jambor
Hi, the previous patch unfortunately does not fix the first testcase in PR 92706 and since I am afraid it might be the important one, I also focused on that. The issue here is again total scalarization accesses clashing with those representing accesses in the IL - on another aggregate but here

[PATCH 4/4] Make total scalarization also copy padding (PR 92486)

2019-12-17 Thread Martin Jambor
Hi, PR 92486 shows that DSE, when seeing a "normal" gimple aggregate assignment coming from a C struct assignment and one a representing a folded memcpy, can kill the latter and keep in place only the former, which does not copy padding - at least when SRA decides to totally scalarize a least one

[PATCH 2/4] SRA: Total scalarization after access propagation (PR 92706)

2019-12-17 Thread Martin Jambor
Hi, this patch fixes the second testcase in PR 92706 by performing total scalarization only quite a bit later, when we already have access trees constructed and even done propagation of accesses from RHSs of assignment to LHSs. The new code simultaneously traverses the existing access tree and

[PATCH 1/4] Add verification of SRA accesses

2019-12-17 Thread Martin Jambor
Hi, because the follow-up patches perform some non-trivial operations on SRA patches, I wrote myself a verifier. And sure enough, it has spotted two issues, one of which is fixed in this patch too - we did not correctly set the parent link when creating artificial accesses for propagation across

Re: [PATCH] OpenACC 2.6 manual deep copy support (attach/detach)

2019-12-17 Thread Thomas Schwinge
Hi Julian! As a first step, can you please split out just the code required to make the OpenACC 'acc_attach*', 'acc_detach*' runtime library routines work? Assuming there were no other defects in libgomp, whould this already make the 'libgomp.oacc-c-c++-common/deep-copy-3.c',

[committed, pr92772] Mention bug in comment

2019-12-17 Thread Andrew Stubbs
This patch only changes a comment, so I'm committing it as "obvious". The point is that I don't intend to spend the time to fix the bug because implementing the fold_extract_last is both a work around and an optimization, but future ports might encounter the same problem and hopefully the

Re: [PATCH] IPA-CP: Remove bogus static keyword (PR 92971)

2019-12-17 Thread Jakub Jelinek
On Tue, Dec 17, 2019 at 01:50:32PM +0100, Martin Jambor wrote: > Hi, > > as reported in PR 92971, IPA-CP's > cgraph_edge_brings_all_agg_vals_for_node defines one local variable with > the static keyword which is a clear mistake, probabley a cut'n'paste > error when I originally wrote the code. >

Re: [PATCH 2/2] [ARM] Add support for -mpure-code in thumb-1 (v6m)

2019-12-17 Thread Kyrill Tkachov
Hi Christophe, On 11/18/19 9:00 AM, Christophe Lyon wrote: On Wed, 13 Nov 2019 at 15:46, Christophe Lyon wrote: > > On Tue, 12 Nov 2019 at 12:13, Richard Earnshaw (lists) > wrote: > > > > On 18/10/2019 14:18, Christophe Lyon wrote: > > > +  bool not_supported = arm_arch_notm || flag_pic

[PATCH] Some compute_objsize/gimple_call_alloc_size/maybe_warn_overflow cleanups (PR tree-optimization/92868)

2019-12-17 Thread Jakub Jelinek
Hi! When looking at the PR, I wrote a cleanup patch with various things I've noticed, with latest Martin's changes half of them aren't valid anymore, but I found further ones. So, besides formatting fixes, this patch tries to make sure the rng1 ranges are meaningful even in some corner cases.

Patch ping (was Re: [PATCH] Oprimize stack_protect_set_1_ followed by a move to the same register (PR target/92841))

2019-12-17 Thread Jakub Jelinek
Hi! I'd like to ping this patch (with the sizeof (c) -> sizeof (c) / sizeof (c[0]) testsuite fix Andreas pointed out). Thanks! On Tue, Dec 10, 2019 at 10:57:35AM +0100, Jakub Jelinek wrote: > 2019-12-10 Jakub Jelinek > > PR target/92841 > * config/i386/i386.md

Re: [PATCH, GCC/ARM, 4/10] Clear GPR with CLRM

2019-12-17 Thread Kyrill Tkachov
Hi Mihail, On 12/16/19 6:29 PM, Mihail Ionescu wrote: Hi Kyrill, On 11/12/2019 09:55 AM, Kyrill Tkachov wrote: Hi Mihail, On 10/23/19 10:26 AM, Mihail Ionescu wrote: [PATCH, GCC/ARM, 4/10] Clear GPR with CLRM Hi, === Context === This patch is part of a patch series to add support for

Re: [PATCH 2/2] [ARM] Add support for -mpure-code in thumb-1 (v6m)

2019-12-17 Thread Christophe Lyon
Ping? On Wed, 11 Dec 2019 at 18:19, Christophe Lyon wrote: > > Ping? > > Le jeu. 5 déc. 2019 à 11:13, Christophe Lyon a > écrit : >> >> ping? >> https://gcc.gnu.org/ml/gcc-patches/2019-11/msg01667.html >> >> Kyrill approved the previous version modulo a typo fix, but Richard >> wanted a better

[patch] libstdc++/configure: strengthen the check for availability of pthread_rwlock_t

2019-12-17 Thread Jérôme Lambourg
Hello, This patch to libstdc++ configure ensures that pthread_rwlock_t is used only when pthread is used for gthreads implementation. The original issue is that VxWorks comes with its native tasking layer and an optional pthread layer built above it. As pthread is an optional feature of the

[PATCH] Some x86 AMD -march= docs fixes + formatting fixes (PR target/92962)

2019-12-17 Thread Jakub Jelinek
Hi! The bug report complained just about missing RDPID and WBNOINVD in znver2 description and double comma before CLWB, but reading the docs I found various other nits and when trying to compare it with what the compiler actually does, I found ugly formatting there too. Bootstrapped/regtested on

Re: [PATCH] Add OpenACC 2.6 `acc_get_property' support

2019-12-17 Thread Martin Jambor
Hi, On Tue, Dec 17 2019, Thomas Schwinge wrote: > On 2019-11-14T16:35:31+0100, Frederik Harwath > wrote: >> this patch implements OpenACC 2.6 "acc_get_property" and related functions. > > [...] > >> --- a/libgomp/plugin/plugin-hsa.c >> +++ b/libgomp/plugin/plugin-hsa.c >> @@ -699,6 +699,32 @@

Re: [PATCH] Add OpenACC 2.6 `acc_get_property' support

2019-12-17 Thread Andrew Stubbs
On 16/12/2019 23:00, Thomas Schwinge wrote: There is no AMD GCN support yet. This will be added later on. ACK, just to note that there now is a 'libgomp/plugin/plugin-gcn.c' that at least needs to get a stub implementation (can mostly copy from 'libgomp/plugin/plugin-hsa.c'?) as otherwise the

Re: [PATCH, GCC/ARM, 2/10] Add command line support for Armv8.1-M Mainline

2019-12-17 Thread Kyrill Tkachov
Hi Mihail, On 12/16/19 6:28 PM, Mihail Ionescu wrote: Hi Kyrill On 11/06/2019 03:59 PM, Kyrill Tkachov wrote: Hi Mihail, On 11/4/19 4:49 PM, Kyrill Tkachov wrote: Hi Mihail, On 10/23/19 10:26 AM, Mihail Ionescu wrote: > [PATCH, GCC/ARM, 2/10] Add command line support > > Hi, > > ===

Re: [PATCH, GCC/ARM, 3/10] Save/restore FPCXTNS in nsentry functions

2019-12-17 Thread Kyrill Tkachov
Hi Mihail, On 12/16/19 6:29 PM, Mihail Ionescu wrote: Hi Kyrill, On 11/06/2019 04:12 PM, Kyrill Tkachov wrote: Hi Mihail, On 10/23/19 10:26 AM, Mihail Ionescu wrote: [PATCH, GCC/ARM, 3/10] Save/restore FPCXTNS in nsentry functions Hi, === Context === This patch is part of a patch series

Re: [PATCH] Some x86 AMD -march= docs fixes + formatting fixes (PR target/92962)

2019-12-17 Thread Uros Bizjak
On Tue, Dec 17, 2019 at 10:09 AM Jakub Jelinek wrote: > > Hi! > > The bug report complained just about missing RDPID and WBNOINVD in znver2 > description and double comma before CLWB, but reading the docs I found > various other nits and when trying to compare it with what the compiler > actually

[PATCH 1/1] Work around array out of bounds warning in mkdeps

2019-12-17 Thread Andreas Krebbel
This suppresses an array out of bounds warning in mkdeps.c as proposed by Martin Sebor in the bugzilla. array subscript 2 is outside array bounds of ‘const char [2]’ Since this warning does occur during bootstrap it currently breaks werror builds on IBM Z. The problem can be reproduced also on

Re: [PATCH] Oprimize stack_protect_set_1_ followed by a move to the same register (PR target/92841)

2019-12-17 Thread Uros Bizjak
On Tue, Dec 10, 2019 at 10:57 AM Jakub Jelinek wrote: > > Hi! > > The stack_protect_set_1_ pattern intentionally clears the register it > used as a temporary to read the canary from the register and push it back > on the stack for security reasons, to make sure the stack canary isn't > spilled

[PATCH] Handle aggregate pass-through for self-recursive call (PR ipa/92794)

2019-12-17 Thread Feng Xue OS
If argument for a self-recursive call is a simple pass-through, the call edge is also considered as source of any value originated from non-recursive call to the function. Scalar pass-through and full aggregate pass-through due to pointer pass-through have also been handled. But we missed another

Re: [PATCH 2/2] [ARM] Add support for -mpure-code in thumb-1 (v6m)

2019-12-17 Thread Kyrill Tkachov
On 12/17/19 2:33 PM, Christophe Lyon wrote: On Tue, 17 Dec 2019 at 11:34, Kyrill Tkachov wrote: Hi Christophe, On 11/18/19 9:00 AM, Christophe Lyon wrote: On Wed, 13 Nov 2019 at 15:46, Christophe Lyon wrote: On Tue, 12 Nov 2019 at 12:13, Richard Earnshaw (lists) wrote: On 18/10/2019

Re: [GCC][testsuite][ARM][AArch64] Add ARM v8.6 effective target checks to target-supports.exp

2019-12-17 Thread Stam Markianos-Wright
On 12/13/19 11:15 AM, Richard Sandiford wrote: > Stam Markianos-Wright writes: >> Hi all, >> >> This small patch adds support for the ARM v8.6 extensions +bf16 and >> +i8mm to the testsuite. This will be tested through other upcoming >> patches, which is why we are not providing any explicit

Re: Fix partitioning ICE with external comdats

2019-12-17 Thread Andreas Schwab
On Dez 17 2019, Jan Hubicka wrote: > Index: symtab.c > === > --- symtab.c (revision 279178) > +++ symtab.c (working copy) > @@ -1952,6 +1952,11 @@ symtab_node::get_partitioning_class (voi >if (DECL_EXTERNAL (decl)) >

In 'libgomp/target.c', 'struct splay_tree_key_s', use 'struct splay_tree_aux' for infrequently-used or API-specific data (was: [PATCH] OpenACC 2.6 manual deep copy support (attach/detach))

2019-12-17 Thread Thomas Schwinge
Hi Jakub! On 2019-11-06T18:43:39+, Julian Brown wrote: > In particular, [a new big patch] incorporates the idea [...] > relating to adding the new "attach_count" field to the memory-mapping > splay tree key type without growing that structure in the common case > (i.e. when structure

C++ Patch Ping (was Re: [C++ PATCH] Improve C++ error recovery (PR c++/59655))

2019-12-17 Thread Jakub Jelinek
Hi! On Tue, Dec 10, 2019 at 10:02:47PM +0100, Jakub Jelinek wrote: > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > Or do you want to use an additional bit for that? > > 2019-12-10 Jakub Jelinek > > PR c++/59655 > * pt.c (push_tinst_level_loc): If

Re: [PATCH] V10 patch #1, Use PLI to load up large DImode constants if -mcpu=future

2019-12-17 Thread Segher Boessenkool
Hi! On Wed, Dec 11, 2019 at 07:12:23PM -0500, Michael Meissner wrote: > --- gcc/config/rs6000/rs6000.c(revision 279141) > +++ gcc/config/rs6000/rs6000.c(working copy) > @@ -5541,6 +5541,10 @@ num_insns_constant_gpr (HOST_WIDE_INT va > && (value >> 31 == -1 || value >> 31

Re: [PATCH] V10 patch #2, use PLI to load up large SImode constants if -mcpu=future

2019-12-17 Thread Segher Boessenkool
Hi! On Wed, Dec 11, 2019 at 07:15:15PM -0500, Michael Meissner wrote: > This patch adds an alternative to use PLI to load up large SImode constants if > -mcpu=future is used. > > * config/rs6000/rs6000.md (movsi_internal1): Add alternative to > use PLI to load up 34-bit constants if

Re: [PATCH] V10 patch #3, Use PADDI to add large constants if -mcpu=future is used

2019-12-17 Thread Segher Boessenkool
On Wed, Dec 11, 2019 at 07:17:02PM -0500, Michael Meissner wrote: > This patch adds an alternative to use PADDI to add large SImode and DImode > constants if -mcpu=future is used. > 2019-12-09 Michael Meissner > > * config/rs6000/predicates.md (add_operand): Allow eI constants. >

[PATCH, committed] Add myself to MAINTAINERS

2019-12-17 Thread Mihail Ionescu
Hi all, I have committed the attached patch adding myself to the Write After Approval section of the MAINTAINERS file. ChangeLog: 2019-12-17 Mihail Ionescu * MAINTAINERS (write_after_approval): Add myself. Regards, Mihail diff --git a/MAINTAINERS b/MAINTAINERS index

Re: [PING 3][PATCH] track dynamic allocation in strlen (PR 91582)

2019-12-17 Thread Christophe Lyon
On Sat, 14 Dec 2019 at 22:35, Jeff Law wrote: > > On Fri, 2019-12-13 at 17:55 -0700, Martin Sebor wrote: > > After more testing by Jeff's buildbot and correcting the problems > > it exposed I have committed the attached patch in r279392. > And just to close the loop on this. Your last version

Fix partitioning ICE with external comdats

2019-12-17 Thread Jan Hubicka
Hi, while hacking firefox to work around ABI compatibility issues with LLVM I ran into an ICE where comdat group was resolved externaly but contains a static alias (for thunk). In this case parittioner attempts to put that static definition into a partition which triggers an ICE.

Re: [PATCH] Fix symver attribute with LTO

2019-12-17 Thread Jan Hubicka
> Hi Jan, > > I'm using GNU ld 2.33.1. > > I'll attach a testcase simplified from fuse-3.9 code. "local: *;" in the > versioning script triggers the issue. Without it there would be no problem. Thanks. You are right that I did not play with local:. Now I wonder what is the intended behaviour

Re: [PATCH 2/2] [ARM] Add support for -mpure-code in thumb-1 (v6m)

2019-12-17 Thread Christophe Lyon
On Tue, 17 Dec 2019 at 16:31, Kyrill Tkachov wrote: > > > On 12/17/19 2:33 PM, Christophe Lyon wrote: > > On Tue, 17 Dec 2019 at 11:34, Kyrill Tkachov > > wrote: > >> Hi Christophe, > >> > >> On 11/18/19 9:00 AM, Christophe Lyon wrote: > >>> On Wed, 13 Nov 2019 at 15:46, Christophe Lyon > >>>

Re: [PATCH 2/2] [ARM] Add support for -mpure-code in thumb-1 (v6m)

2019-12-17 Thread Christophe Lyon
On Tue, 17 Dec 2019 at 11:34, Kyrill Tkachov wrote: > > Hi Christophe, > > On 11/18/19 9:00 AM, Christophe Lyon wrote: > > On Wed, 13 Nov 2019 at 15:46, Christophe Lyon > > wrote: > > > > > > On Tue, 12 Nov 2019 at 12:13, Richard Earnshaw (lists) > > > wrote: > > > > > > > > On 18/10/2019

[Patch, Fortran] PR92896 [10 Regression] Fix - Prevent character conversion in array constructor

2019-12-17 Thread Mark Eggleston
Prevent conversion of character data in array constructors. Fix for PR fortran/92896 [10 Regression] [DEC] ICE in reduce_unary, at fortran/arith.c:1283. This was caused by an unintended side affect of "Allow CHARACTER literals in assignments and data statements" (revision 277975). If the

Re: [PATCH][AArch64] Fixup core tunings

2019-12-17 Thread Wilco Dijkstra
Hi Richard, > This changelog entry is inadequate.  It's also not in the correct style. > > It should say what has changed, not just that it has changed. Sure, but there is often no useful space for that. We should auto generate changelogs if they are deemed useful. I find the commit message a

Re: [PATCH] Some compute_objsize/gimple_call_alloc_size/maybe_warn_overflow cleanups (PR tree-optimization/92868)

2019-12-17 Thread Martin Sebor
On 12/17/19 1:58 AM, Jakub Jelinek wrote: Hi! When looking at the PR, I wrote a cleanup patch with various things I've noticed, with latest Martin's changes half of them aren't valid anymore, but I found further ones. So, besides formatting fixes, this patch tries to make sure the rng1 ranges

Re: [Patch, Fortran] PR92896 [10 Regression] Fix - Prevent character conversion in array constructor

2019-12-17 Thread Steve Kargl
On Tue, Dec 17, 2019 at 03:41:41PM +, Mark Eggleston wrote: > gcc/fortran/ChangeLog > >     Mark Eggleston  > >     PR fortran/92896 >     * array.c (walk_array_constructor): Replace call to cfg_convert_type s/cfg_convert_type/gfc_convert_type >     with call to gfc_convert_type_warn

Re: [PATCH] V10 patch #5, Fix codegen bug with vector extracts using a variable offset & PC-relative address

2019-12-17 Thread Segher Boessenkool
Hi! On Wed, Dec 11, 2019 at 07:48:39PM -0500, Michael Meissner wrote: > This patch fixes a bug with vector extracts using a PC-relative address and a > variable offset with using -mcpu=future. > > Consider the code: > > #include > > static vector double vd; > vector double

[patch] Use simple LRA algorithm at -O0

2019-12-17 Thread Eric Botcazou
Hi, LRA is getting measurably slower since GCC 8, at least on x86, and things are worsening since GCC 9. While this might be legitimate when optimization is enabled, it's a pure waste of cycles at -O0 so the attached patch switches LRA over to using the simple algorithm when optimization is

Re: [C++ PATCH] Improve C++ error recovery (PR c++/59655)

2019-12-17 Thread Jason Merrill
On 12/10/19 4:02 PM, Jakub Jelinek wrote: Hi! On the following testcase, we emit 2 errors and 1 warning, when the user really should see one error. The desirable error is static_assert failure, the bogus error is during error recovery, complaining that a no_linkage template isn't defined when

Re: [PATCH] V10 patch #4, Add new prefixed/non-prefixed memory constraints

2019-12-17 Thread Segher Boessenkool
Hi! On Wed, Dec 11, 2019 at 07:29:05PM -0500, Michael Meissner wrote: > +(define_memory_constraint "em" > + "A memory operand that does not contain a prefixed address." > + (and (match_code "mem") > + (match_operand 0 "non_prefixed_memory"))) > + > +(define_memory_constraint "ep" > + "A

Re: [Patch, Fortran] PR92896 [10 Regression] Fix - Prevent character conversion in array constructor

2019-12-17 Thread Steve Kargl
On Tue, Dec 17, 2019 at 05:28:05PM +, Mark Eggleston wrote: > > On 17/12/2019 17:06, Steve Kargl wrote: > > On Tue, Dec 17, 2019 at 03:41:41PM +, Mark Eggleston wrote: > >> gcc/fortran/ChangeLog > >> > >>     Mark Eggleston  > >> > >>     PR fortran/92896 > >>     * array.c

Re: [PATCH] Fix symver attribute with LTO

2019-12-17 Thread Jan Hubicka
> Would it be equivalent to: > 1) output foo_v2 local > 2) producing static alias with local name (.L1) > 3) do .symver .L1,foo@@@VERS_2 > That is somewhat more systematic and would not lead to false > visibilities. I spent some time playing with this. An in order to 1) be able to handle foo_v2

Re: [Patch, Fortran] PR92896 [10 Regression] Fix - Prevent character conversion in array constructor

2019-12-17 Thread Janne Blomqvist
On Tue, Dec 17, 2019 at 7:47 PM Steve Kargl wrote: > > On Tue, Dec 17, 2019 at 05:28:05PM +, Mark Eggleston wrote: > > > > On 17/12/2019 17:06, Steve Kargl wrote: > > > On Tue, Dec 17, 2019 at 03:41:41PM +, Mark Eggleston wrote: > > >> gcc/fortran/ChangeLog > > >> > > >> Mark

Re: [Patch, Fortran] PR92896 [10 Regression] Fix - Prevent character conversion in array constructor

2019-12-17 Thread Steve Kargl
On Tue, Dec 17, 2019 at 08:04:30PM +0200, Janne Blomqvist wrote: > > Well, frontends are nowadays C++, so > > a) No need to include stdbool.h, bool is a builtin type. > > b) optional arguments are a thing (they are also used elsewhere in the > Fortran frontend). > Ah, yes. The creep of C++

[WIP] OpenACC 'acc_attach*', 'acc_detach*' runtime library routines (was: [PATCH] OpenACC 2.6 manual deep copy support (attach/detach))

2019-12-17 Thread Thomas Schwinge
Hi! On 2019-12-17T12:28:32+0100, Thomas Schwinge wrote: > As a first step, can you please split out just the code required to make > the OpenACC 'acc_attach*', 'acc_detach*' runtime library routines work? I've now simply done this myself (that is, code extraction from Julian's patch, not any

Re: [Patch] Add OpenACC 2.6's no_create

2019-12-17 Thread Tobias Burnus
Hi Thomas, I am reasonably comfortable with the current patch (regarding your TODOs) – see attachment. It is the previous patch plus your changes plus one additional condition (see below) in target.c's first GOMP_MAP_IF_PRESENT handling. I intent to re-test it tomorrow and then commit it,

Re: [Patch, Fortran] PR92896 [10 Regression] Fix - Prevent character conversion in array constructor

2019-12-17 Thread Mark Eggleston
On 17/12/2019 17:06, Steve Kargl wrote: On Tue, Dec 17, 2019 at 03:41:41PM +, Mark Eggleston wrote: gcc/fortran/ChangeLog     Mark Eggleston      PR fortran/92896     * array.c (walk_array_constructor): Replace call to cfg_convert_type s/cfg_convert_type/gfc_convert_type    

Re: [PATCH] add -Wmismatched-tags (PR 61339)

2019-12-17 Thread Jason Merrill
On 12/16/19 6:31 PM, Martin Sebor wrote: + class_decl_loc_t *rdl = class2loc.get (type_decl); + if (!rdl) +{ + rdl = _or_insert (type_decl); I was thinking class_decl_loc_t *rdl = _or_insert (type_decl); OK with that change. Jason

[C++ PATCH] Avoid weird inform without previos error during SFINAE (PR c++/92965)

2019-12-17 Thread Jakub Jelinek
Hi! On the following testcase, complain & tf_error is 0 during sfinae, so we don't emit error, but we called structural_type_p with explain=true anyway, which emitted the inform messages. Fixed by doing it only when we emit the error. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for

[C++ PATCH] Fix bad defaulted comparison operator error recovery (PR c++/92966)

2019-12-17 Thread Jakub Jelinek
Hi! When the prototype of defaulted comparison operator is incorrect, we set DECL_MAYBE_DELETED, but don't set DECL_DEFAULTED_FN and other flags, so we ICE during synthetize_method. Seems only marking DECL_MAYBE_DELETED those operators that we are also going to mark DECL_DEFAULTED_FN results in

[C++ PATCH] Disallow defaulted comparison operators in C++11-17 modes (PR c++/92973)

2019-12-17 Thread Jakub Jelinek
Hi! As discussed on IRC, defaulted comparison operators were added only in C++2a, so we shouldn't accept it in older standard modes. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2019-12-17 Jakub Jelinek PR c++/92973 * method.c

Re: [modulo-sched][PATCH] Fix PR92591

2019-12-17 Thread Roman Zhuykov
Hello. As pointed out in the PR https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92591#c1, the test can be fixed by DFA-checking more adjacent row sequences in the partial schedule. I've found that on powerpc64 gcc.c-torture/execute/pr61682.c test catches same issue with -Os

[PATCH] Avoid suspicious -Wduplicate-branches warning in lto-wrapper.c (PR lto/92972)

2019-12-17 Thread Jakub Jelinek
Hi! big ? "-fno-pie" : "-fno-pie" doesn't make much sense, either we want to use big ? "-fno-PIE" : "-fno-pie", but as both mean the same thing, I think just using "-fno-pie" is good enough. + a few formatting nits and one comment typo. Bootstrapped/regtested on x86_64-linux and i686-linux, ok

[C++ PATCH] * name-lookup.c (get_std_name_hint): Add std::byte.

2019-12-17 Thread Jason Merrill
I noticed we didn't have a hint for std::byte yet. Tested x86_64-pc-linux-gnu, applying to trunk. --- gcc/cp/name-lookup.c| 2 ++ gcc/testsuite/g++.dg/lookup/missing-std-include-9.C | 3 +++ 2 files changed, 5 insertions(+) create mode 100644

[C++ PATCH] PR c++/79592 - missing explanation of invalid constexpr.

2019-12-17 Thread Jason Merrill
We changed months back to use the pre-generic form for constexpr evaluation, but explain_invalid_constexpr_fn was still using DECL_SAVED_TREE. This mostly works, but misses some issues due to folding. So with this patch we save the pre-generic form of constexpr functions even when we know they

[C++ PATCH] PR c++/92576 - redeclaration of variable template.

2019-12-17 Thread Jason Merrill
The variable templates patch way back when forgot to add handling here. The simplest answer seems to be recursing to the underlying declaration. Tested x86_64-pc-linux-gnu, applying to trunk. * decl.c (redeclaration_error_message): Recurse for variable templates. ---

Re: [PATCH] V10 patch #4, Add new prefixed/non-prefixed memory constraints

2019-12-17 Thread Michael Meissner
On Tue, Dec 17, 2019 at 11:15:29AM -0600, Segher Boessenkool wrote: > Hi! > > On Wed, Dec 11, 2019 at 07:29:05PM -0500, Michael Meissner wrote: > > +(define_memory_constraint "em" > > + "A memory operand that does not contain a prefixed address." > > + (and (match_code "mem") > > +

Re: C++ PATCH for c++/88337 - Implement P1327R1: Allow dynamic_cast in constexpr

2019-12-17 Thread Marek Polacek
On Mon, Dec 16, 2019 at 04:00:14PM -0500, Jason Merrill wrote: > On 12/16/19 3:55 PM, Jason Merrill wrote: > > On 12/14/19 4:25 PM, Marek Polacek wrote: > > > On Fri, Dec 13, 2019 at 05:56:57PM -0500, Jason Merrill wrote: > > > > On 12/13/19 3:20 PM, Marek Polacek wrote: > > > > > +  /* Given

[PATCH 4/4] analyzer: purge state for unknown function calls

2019-12-17 Thread David Malcolm
Whilst analyzing the reproducer for detecting CVE-2005-1689 (krb5-1.4.1's src/lib/krb5/krb/recvauth.c), the analyzer reports a false double-free of the form: krb5_xfree(inbuf.data); krb5_read_message(..., ); krb5_xfree(inbuf.data); /* false diagnostic here. */ where the call to

[PATCH 0/4] analyzer: Fixes for problems seen with CVE-2005-1689

2019-12-17 Thread David Malcolm
I attempted to use the analyzer to detect CVE-2005-1689, a double-free in krb5-1.4.1's src/lib/krb5/krb/recvauth.c With v1-v4 of the analyzer, it emits 11 double-free warnings: https://dmalcolm.fedorapeople.org/gcc/2019-11-13/CVE-2005-1689.html of which most were either false positives or

[PATCH 1/4] analyzer: add ChangeLog

2019-12-17 Thread David Malcolm
gcc/analyzer/ChangeLog: * ChangeLog: New file. --- gcc/analyzer/ChangeLog | 10 ++ 1 file changed, 10 insertions(+) create mode 100644 gcc/analyzer/ChangeLog diff --git a/gcc/analyzer/ChangeLog b/gcc/analyzer/ChangeLog new file mode 100644 index ..7144b69596e2 ---

[PATCH 3/4] analyzer: fix dedupe issue seen with CVE-2005-1689

2019-12-17 Thread David Malcolm
Whilst analyzing the reproducer for detecting CVE-2005-1689 (krb5-1.4.1's src/lib/krb5/krb/recvauth.c), the analyzer reported 11 double-free diagnostics on lines of the form: krb5_xfree(inbuf.data); with no deduplication occcurring. The root cause is that the diagnostics each have a

[PATCH 2/4] analyzer: better logging for dedupe_winners::add

2019-12-17 Thread David Malcolm
gcc/analyzer/ChangeLog: * diagnostic-manager.cc (dedupe_winners::add): Add logging of deduplication decisions made. --- gcc/analyzer/diagnostic-manager.cc | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git

Re: [PATCH] V10 patch #4, Add new prefixed/non-prefixed memory constraints

2019-12-17 Thread Segher Boessenkool
On Tue, Dec 17, 2019 at 05:29:44PM -0500, Michael Meissner wrote: > On Tue, Dec 17, 2019 at 11:15:29AM -0600, Segher Boessenkool wrote: > > > +;; Return true if the operand is a valid memory address that does not > > > use a > > > +;; prefixed address. > > > +(define_predicate

Re: [PATCH] Fix attribute((section)) for templates

2019-12-17 Thread Nathan Sidwell
On 12/16/19 6:20 PM, Jason Merrill wrote: On 11/29/19 6:23 PM, Strager Neds wrote: How can we solve this problem? Some ideas (none of which I like): * Disallow this code, possibly with an improved diagnostic. * Silently make the section SECTION_LINKONCE if there is a conflict. * Silently

Re: [PATCH] V10 patch #4, Add new prefixed/non-prefixed memory constraints

2019-12-17 Thread Michael Meissner
On Tue, Dec 17, 2019 at 05:35:24PM -0600, Segher Boessenkool wrote: > On Tue, Dec 17, 2019 at 05:29:44PM -0500, Michael Meissner wrote: > > On Tue, Dec 17, 2019 at 11:15:29AM -0600, Segher Boessenkool wrote: > > > > +;; Return true if the operand is a valid memory address that does not > > > >

[PATCH] rs6000: Fix PR92923, __builtin_vec_xor() causes subregs to be used when not using V4SImode vectors

2019-12-17 Thread Peter Bergner
PR92923 shows a problem where builtin function usage is causing performance problems due to unneeded subreg usage. These are being caused by the front- end emitting unneeded VIEW_CONVERT_EXPR's on the builtin functions operands. These in tern where caused by a lack of overloaded builtin entries

[PATCH 10/13] OpenACC 2.6 deep copy: Fortran front-end parts

2019-12-17 Thread Julian Brown
This patch has been broken out of the "OpenACC 2.6 manual deep copy support" patch, last posted here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02376.html This part contains the Fortran front-end support for parsing the new attach and detach clauses, as well as derived-type members on

[PATCH 09/13] OpenACC 2.6 deep copy: C and C++ front-end parts

2019-12-17 Thread Julian Brown
This patch has been broken out of the "OpenACC 2.6 manual deep copy support" patch, last posted here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02376.html This part contains the C and C++ changes to parse attach and detach clauses and struct member accesses via "." or "->" on other

[PATCH 08/13] OpenACC 2.6 deep copy: middle-end parts

2019-12-17 Thread Julian Brown
This patch has been broken out of the "OpenACC 2.6 manual deep copy support" patch, last posted here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02376.html This part contains the middle-end support for OpenACC 2.6 attach and detach operations, either as standalone clauses or as

[PATCH 11/13] OpenACC 2.6 deep copy: C and C++ execution tests

2019-12-17 Thread Julian Brown
This patch has been broken out of the "OpenACC 2.6 manual deep copy support" patch, last posted here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02376.html This part adds C and C++ execution tests to libgomp. Tested alongside other patches in this series with offloading to NVPTX. OK?

[PATCH] Fix redundant load missed by fre [tree-optimization 92980]

2019-12-17 Thread Hongtao Liu
Hi: This patch is to simplify A * C + (-D) -> (A - D/C) * C when C is a power of 2 and D mod C == 0. bootstrap and make check is ok. changelog gcc/ * gcc/match.pd (A * C + (-D) = (A - D/C) * C. when C is a power of 2 and D mod C == 0): Add new simplification. gcc/testsuite

Re: [PATCH] Fix redundant load missed by fre [tree-optimization 92980]

2019-12-17 Thread Andrew Pinski
On Tue, Dec 17, 2019 at 6:33 PM Hongtao Liu wrote: > > Hi: > This patch is to simplify A * C + (-D) -> (A - D/C) * C when C is a > power of 2 and D mod C == 0. > bootstrap and make check is ok. I don't see why D has to be negative here. >TREE_CODE (TREE_TYPE (@0)) == INTEGER_TYPE + &&

[PATCH 03/13] OpenACC reference count consistency checking

2019-12-17 Thread Julian Brown
This is a rebased version of the reference count consistency checking patch last posted upstream here: https://gcc.gnu.org/ml/gcc-patches/2019-10/msg00239.html This is not necessary for proper operation of the rest of the patches in this series, but has proved useful in development. Tested

[PATCH 05/13] Factor out duplicate code in gimplify_scan_omp_clauses

2019-12-17 Thread Julian Brown
This patch was previously posted here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg00321.html This version is the same as the last-posted version. The middle-end patch later in the series depends on this. Tested alongside other patches in this series with offloading to NVPTX. OK? Thanks,

[PATCH 04/13] Use gomp_map_val for OpenACC host-to-device address translation

2019-12-17 Thread Julian Brown
This patch was previously approved here, but I have not committed it yet (without the other patches in this series): https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01156.html Included for completeness. I will commit this alongside other patches if they are approved (or it could probably go in

[PATCH 06/13] OpenACC 2.6 deep copy: attach/detach API routines

2019-12-17 Thread Julian Brown
This patch has been broken out of the "OpenACC 2.6 manual deep copy support" patch, last posted here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02376.html It contains just the minimal libgomp bits necessary to support the OpenACC runtime API routines (acc_attach, acc_detach and

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

2019-12-17 Thread Julian Brown
This patch has been broken out of the "OpenACC 2.6 manual deep copy support" patch, last posted here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02376.html This part contains the libgomp runtime support for the GOMP_MAP_ATTACH and GOMP_MAP_DETACH mapping kinds (etc.), as introduced by the

[PATCH 01/13] Use aux struct in libgomp for infrequently-used/API-specific data

2019-12-17 Thread Julian Brown
This patch has been broken out of the "OpenACC 2.6 manual deep copy support" patch, last posted here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02376.html This part is included for completeness. It is the same as the patch posted by Thomas here:

[PATCH 02/13] OpenACC reference count overhaul

2019-12-17 Thread Julian Brown
This is a rebased version of the reference-count overhaul patch last posted here: https://gcc.gnu.org/ml/gcc-patches/2019-11/msg02235.html This version omits parts of the above patch already committed upstream and merges some recent REFCOUNT_INFINITY changes. This patch causes the newish

[PATCH 00/13] OpenACC 2.6 manual deep copy support

2019-12-17 Thread Julian Brown
Hi, This patch series provides support for OpenACC 2.6's manual deep copy (attach/detach) feature. Many of these patches have been submitted previously, but this series has been rebased and the large deep-copy part proper has been split into several pieces for ease of review. Tested with

[Ada] Wrong error on hidden must-override primitive

2019-12-17 Thread Pierre-Marie de Rodat
The compiler gave a wrong error about "must override" in the following case. A private type is completed with a derived type that inherits a must-override function. Outside that package, a type extension of the private type is declared. The function on that type extension is not visible, and is

[Ada] AI12-0282: shared variable control aspects on formal types

2019-12-17 Thread Pierre-Marie de Rodat
Ada202X allows some aspects related to shared variable control to appear on formal type declarations. These aspects represent new enforceable parts of the contract between generic units and instantiations. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-12-18 Ed Schonberg gcc/ada/

[Ada] Missing accessibility check on access discriminants

2019-12-17 Thread Pierre-Marie de Rodat
This patch fixes an issue whereby compile-time checks on return aggregates with anonymous access discriminants were not performed when multiple of such discriminants were present, the aggregate was within an extended return statement, or the aggregate was within a qualified expression. Tested on

[Ada] Fix three-letter typos like "sss" in comments and docs

2019-12-17 Thread Pierre-Marie de Rodat
Fix three-letter typos like "alllowed" or "corrresponding". They can be detected with this command: $ grep "[[:alpha:]]\([[:lower:]]\+\)\1\1" ... but need to be manually filtered for things like "ieee", "dd-mm-" or hexadecimal literals. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] Missing accessibility actuals on calls to interface conversion functions

2019-12-17 Thread Pierre-Marie de Rodat
In certain cases of conversions to interface types, the compiler generates a special function to handle the conversion. In cases where such a function has an extra accessibility-level formal and the target type of the conversion has a designated type that comes from a limited view (via

[Ada] Document the introduction of the Object_Size attribute in Ada 2020

2019-12-17 Thread Pierre-Marie de Rodat
This adds references to Ada 2020 in the section documenting the two size attributes used by GNAT, namely Object_Size and Value_Size, as well as in the head comment of Subtypes_Statically_Match. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-12-18 Eric Botcazou gcc/ada/ *

[Ada] Bad "already use-visible" warning re: use in private part

2019-12-17 Thread Pierre-Marie de Rodat
This patch fixes a bug in which if a parent package has a use clause in its private part, and a child of that parent has a use clause for the same thing in its context clause, the compiler incorrectly warns that the one in the child is redundant. Tested on x86_64-pc-linux-gnu, committed on trunk

  1   2   >