[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] 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] Do not propagate Object_Size onto Size for composite types

2019-12-17 Thread Pierre-Marie de Rodat
This gets rid of an old bypass used in the compiler, which would copy the value set in an Object_Size clause for record types onto Size. This means that a confirming Object_Size clause can prevent packing, which is counter-intuitive given that Object_Size is not supposed to pertain to packing at

[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

[Ada] Reserving switch d_K for known problem isssues detection

2019-12-17 Thread Pierre-Marie de Rodat
This patch documents that switch -gnatd_K is reserved to enable machinery that detects known problem issues of previous releases. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-12-18 Javier Miranda gcc/ada/ * debug.adb: Document -gnatd_K as a reserved switch for the

[Bug c++/79592] incomplete diagnostic "is not usable as a constexpr function because:"

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79592 Jason Merrill changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[C++ PATCH] PR c++/12333 - X::~X() with implicit this->.

2019-12-17 Thread Jason Merrill
Well, this one has been around for a while. this->X::~X() is handled by finish_class_member_access_expr and its lookup_destructor subroutine; let's use it in cp_parser_lookup_name for the case where this-> is implicit. Tested x86_64-pc-linux-gnu, applying to trunk. * parser.c

[Bug c++/66139] destructor not called for members of partially constructed anonymous struct/array

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66139 Jason Merrill changed: What|Removed |Added Status|NEW |ASSIGNED CC|

[Bug c++/5458] address of overloaded template function as argument for template

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=5458 Jason Merrill changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug other/16996] [meta-bug] code size improvements

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16996 Bug 16996 depends on bug 3187, which changed state. Bug 3187 Summary: gcc lays down two copies of constructors https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3187 What|Removed |Added

[Bug c++/3187] gcc lays down two copies of constructors

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3187 Jason Merrill changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug c++/41090] [4.7/4.8/4.9 Regression] Using static label reference in c++ class constructor produces wrong code

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41090 Bug 41090 depends on bug 3187, which changed state. Bug 3187 Summary: gcc lays down two copies of constructors https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3187 What|Removed |Added

[PATCH 13/13] Fortran polymorphic class-type support for OpenACC

2019-12-17 Thread Julian Brown
This patch builds on the Fortran front-end support posted earlier in this series to enable polymorphic class pointers to be used in OpenACC directives as well. It was last posted here: https://gcc.gnu.org/ml/gcc-patches/2019-10/msg00541.html This version is largely the same as the previous

[PATCH 12/13] OpenACC 2.6 deep copy: Fortran 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 Fortran execution tests to libgomp. Tested alongside other patches in this series with offloading to NVPTX. OK?

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

[PATCH] [RFC] ipa: duplicate ipa_size_summary for cloned nodes

2019-12-17 Thread Xiong Hu Luo
The size_info of ipa_size_summary are created by r277424. It should be duplicated for cloned nodes, otherwise self_size and estimated_self_stack_size would be 0, causing param large-function-insns and large-function-growth working inaccurate when ipa-inline. gcc/ChangeLog: 2019-12-18

Re: Test GCC conversion with reposurgeon available

2019-12-17 Thread Joseph Myers
On Wed, 18 Dec 2019, Joseph Myers wrote: > On Wed, 18 Dec 2019, Bernd Schmidt wrote: > > > On 12/17/19 10:32 PM, Joseph Myers wrote: > > > git+ssh://gcc.gnu.org/home/gccadmin/gcc-reposurgeon-1a.git > > > > It seems that permission bits are not reproduced entirely correctly. For > > example,

[Bug tree-optimization/92980] [miss optimization]redundant load missed by fre.

2019-12-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92980 Andrew Pinski changed: What|Removed |Added Keywords||missed-optimization

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

2019-12-17 Thread Hongtao Liu
On Wed, Dec 18, 2019 at 10:50 AM Andrew Pinski wrote: > > 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

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

*Ping* Re: [PATCH v6] Missed function specialization + partial devirtualization

2019-12-17 Thread luoxhu
Ping :) Patch is here: https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00099.html On 2019/12/3 10:31, luoxhu wrote: Hi Martin and Honza, On 2019/11/18 21:02, Martin Liška wrote: On 11/16/19 10:59 AM, luoxhu wrote: Sorry that I don't quite understand your meanning here.  I didn't grep the

[Bug ipa/92981] New: [10 Regression] ICE in get_partitioning_class, at symtab.c:1966

2019-12-17 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92981 Bug ID: 92981 Summary: [10 Regression] ICE in get_partitioning_class, at symtab.c:1966 Product: gcc Version: 10.0 Status: UNCONFIRMED Keywords: ice-checking,

[Bug tree-optimization/92980] [miss optimization]redundant load missed by fre.

2019-12-17 Thread crazylht at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92980 --- Comment #1 from Hongtao.liu --- test.c.033.fre1 foo (unsigned int * restrict src1, int i, int k, int n) { int sum; int j; long unsigned int _1; long unsigned int _2; unsigned int * _3; unsigned int _4; sizetype _7; unsigned

[Bug tree-optimization/92980] New: [miss optimization]redundant load missed by fre.

2019-12-17 Thread crazylht at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92980 Bug ID: 92980 Summary: [miss optimization]redundant load missed by fre. Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[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

Re: Test GCC conversion with reposurgeon available

2019-12-17 Thread Joseph Myers
On Wed, 18 Dec 2019, Bernd Schmidt wrote: > On 12/17/19 10:32 PM, Joseph Myers wrote: > > git+ssh://gcc.gnu.org/home/gccadmin/gcc-reposurgeon-1a.git > > It seems that permission bits are not reproduced entirely correctly. For > example, contrib/check_GNU_style_lib.py went from -rwxr-xr-x in svn

Re: Test GCC conversion with reposurgeon available

2019-12-17 Thread Eric S. Raymond
Bernd Schmidt : > I vote for including .cvsignore files. Their absence makes diff comparisons > of "git ls-tree" on specific revisions needlessly noisy. A few minutes ago I implmemted and pushed a --cvsignores read option for Subversion dumps. That should do what you eant. --

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

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

[Bug c++/61339] add mismatch between struct and class [-Wmismatched-tags] to non-bugs

2019-12-17 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61339 --- Comment #16 from Martin Sebor --- Author: msebor Date: Tue Dec 17 23:53:07 2019 New Revision: 279480 URL: https://gcc.gnu.org/viewcvs?rev=279480=gcc=rev Log: PR c++/61339 - add warning for mismatch between struct and class

[Bug c++/61339] add mismatch between struct and class [-Wmismatched-tags]

2019-12-17 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61339 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

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: Test GCC conversion with reposurgeon available

2019-12-17 Thread Bernd Schmidt
On 12/17/19 10:32 PM, Joseph Myers wrote: git+ssh://gcc.gnu.org/home/gccadmin/gcc-reposurgeon-1a.git It seems that permission bits are not reproduced entirely correctly. For example, contrib/check_GNU_style_lib.py went from -rwxr-xr-x in svn (and the git-svn repository) to -rw-r--r-- in this

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

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") > > +

[Bug fortran/92977] ICE in gfc_trans_omp_atomic, at fortran/trans-openmp.c:3526

2019-12-17 Thread anlauf at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92977 anlauf at gcc dot gnu.org changed: What|Removed |Added Keywords||openmp Priority|P3

[Bug fortran/92976] [8/9/10 Regression][OOP] ICE in trans_associate_var, at fortran/trans-stmt.c:1963

2019-12-17 Thread anlauf at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92976 anlauf at gcc dot gnu.org changed: What|Removed |Added Priority|P3 |P4

[Bug tree-optimization/92765] [10 Regression] Wrong code caused by folding of -Wstring-compare since r276773

2019-12-17 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92765 --- Comment #16 from Martin Sebor --- The warning doesn't affect code generation. It's issued independent of it. We'll have to agree to disagree about the validity of the test case in comment #0, but I do agree that at least some of your test

[Bug c++/79592] incomplete diagnostic "is not usable as a constexpr function because:"

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79592 --- Comment #5 from Jason Merrill --- Author: jason Date: Tue Dec 17 21:46:40 2019 New Revision: 279473 URL: https://gcc.gnu.org/viewcvs?rev=279473=gcc=rev Log: PR c++/79592 - missing explanation of invalid constexpr. We changed months back to

[Bug c++/92576] Definition of variable template without initializer is treated as declaration

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92576 --- Comment #5 from Jason Merrill --- Author: jason Date: Tue Dec 17 21:46:11 2019 New Revision: 279472 URL: https://gcc.gnu.org/viewcvs?rev=279472=gcc=rev Log: PR c++/92576 - redeclaration of variable template. The variable templates

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

[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

[Bug c++/80635] std::optional and bogus -Wmaybe-uninitialized warning

2019-12-17 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635 --- Comment #35 from Manuel López-Ibáñez --- In any case, looking at the uninit dump with -fdump-tree-all-all-lineno it appears that GCC knows the block where the warning is triggered is never executed: ;; basic block 13, loop depth 0, count

[Bug tree-optimization/92949] bswap/store merging does not handle BIT_INSERT_EXPR/BIT_FIELD_REF

2019-12-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92949 --- Comment #7 from Andrew Pinski --- (In reply to Andrew Pinski from comment #5) > Note bswap pass is very fragile. In fact if we increase the limit by 1, > things dont work any more. There needs to be a better way of handling this. PR 92979

[Bug c++/80635] std::optional and bogus -Wmaybe-uninitialized warning

2019-12-17 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635 --- Comment #34 from Manuel López-Ibáñez --- (In reply to Martin Sebor from comment #15) > I think the following smaller test case independent of libstdc++ captures > the same issue as the bigger test case in comment #4. Again, declaring f() >

[Bug c++/59655] incorrect diagnostic on templatized function with lambda parameter

2019-12-17 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59655 --- Comment #9 from Jakub Jelinek --- Author: jakub Date: Tue Dec 17 21:40:14 2019 New Revision: 279470 URL: https://gcc.gnu.org/viewcvs?rev=279470=gcc=rev Log: PR c++/59655 * pt.c (push_tinst_level_loc): If

[Bug c++/12333] [DR 272] Explicit call to MyClass::~MyClass() not allowed

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=12333 Jason Merrill changed: What|Removed |Added Status|NEW |ASSIGNED CC|

[Bug fortran/92956] [10 Regression] 'libgomp.fortran/examples-4/async_target-2.f90' fails with offloading due to bogus -Wstringop-overflow warning

2019-12-17 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92956 --- Comment #14 from Martin Sebor --- (In reply to Tobias Burnus from comment #12) The warnings have been enabled by default since _FORTIFY_SOURCE (and Builtin Size Checking) was introduced. Given their severity I don't think we want consider

[Bug tree-optimization/92949] bswap/store merging does not handle BIT_INSERT_EXPR/BIT_FIELD_REF

2019-12-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92949 Andrew Pinski changed: What|Removed |Added Depends on||92979 --- Comment #6 from Andrew Pinski

Test GCC conversion with reposurgeon available

2019-12-17 Thread Joseph Myers
I've made test conversions of the GCC repository with reposurgeon available (gcc.gnu.org / sourceware.org account required to access these git+ssh repositories, it doesn't need to be one in the gcc group or to have shell access). More information about the repositories, conversion choices made

[Bug tree-optimization/92979] New: bswap not finding a bswap with a memory load at the beginging of the instruction stream

2019-12-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92979 Bug ID: 92979 Summary: bswap not finding a bswap with a memory load at the beginging of the instruction stream Product: gcc Version: 10.0 Status: UNCONFIRMED

[Bug c++/92236] [concepts] Explain non-satisfaction in static_assert

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92236 Jason Merrill changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug c++/67491] [meta-bug] concepts issues

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491 Bug 67491 depends on bug 92236, which changed state. Bug 92236 Summary: [concepts] Explain non-satisfaction in static_assert https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92236 What|Removed |Added

[Bug c++/79592] incomplete diagnostic "is not usable as a constexpr function because:"

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79592 Jason Merrill changed: What|Removed |Added Status|NEW |ASSIGNED CC|

[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

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

[Bug fortran/92956] [10 Regression] 'libgomp.fortran/examples-4/async_target-2.f90' fails with offloading due to bogus -Wstringop-overflow warning

2019-12-17 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92956 --- Comment #13 from Martin Sebor --- (In reply to Jakub Jelinek from comment #9) Thanks for the nice test case! The assumptions the warning makes aren't accidental: it tries to detect bugs that would otherwise go undetected, and it relies on

[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

[Bug c++/68012] g++ incorrectly accepts forward declaration of constexpr variable template

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68012 Jason Merrill changed: What|Removed |Added Keywords||diagnostic CC|

[Bug target/92841] Optimize -fstack-protector-strong code generation a bit

2019-12-17 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92841 --- Comment #11 from Jakub Jelinek --- Author: jakub Date: Tue Dec 17 20:40:01 2019 New Revision: 279468 URL: https://gcc.gnu.org/viewcvs?rev=279468=gcc=rev Log: PR target/92841 * config/i386/i386.md (@stack_protect_set_1_,

[Bug c++/92576] Definition of variable template without initializer is treated as declaration

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92576 Jason Merrill changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned

[Bug c++/84255] accepts redefinition of template variable

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84255 Jason Merrill changed: What|Removed |Added Status|NEW |ASSIGNED CC|

[Bug c++/92560] ICE using decltype(x < y) when that operator uses operator<=>

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92560 Jason Merrill changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug c++/57082] brace initialization requires public destructor

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57082 Jason Merrill changed: What|Removed |Added Known to work||10.0, 9.2.1 Known to fail|10.0

[Bug c++/80635] std::optional and bogus -Wmaybe-uninitialized warning

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635 --- Comment #33 from Jason Merrill --- (In reply to Pedro Alves from comment #32) > Usually maybe-uninit warnings point to false positives involving scalars, > and initializing them is practically free. But here the size of T may be >

[Bug rtl-optimization/90040] [meta-bug] modulo-scheduler and partitioning issues

2019-12-17 Thread zhroma at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90040 Roman Zhuykov changed: What|Removed |Added CC||hubicka at gcc dot gnu.org,

[Bug libstdc++/92978] New: std::gcd mishandles mixed-signedness

2019-12-17 Thread rs2740 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92978 Bug ID: 92978 Summary: std::gcd mishandles mixed-signedness Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++

[Bug rtl-optimization/92591] ICE in optimize_sc, at modulo-sched.c:1063

2019-12-17 Thread zhroma at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92591 --- Comment #9 from Roman Zhuykov --- Started discussion in mailing list: https://gcc.gnu.org/ml/gcc-patches/2019-12/msg01223.html

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

[Bug c++/80635] std::optional and bogus -Wmaybe-uninitialized warning

2019-12-17 Thread palves at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635 --- Comment #32 from Pedro Alves --- Right, the potentially-sensitive aspect is what I mean to stress here. Usually maybe-uninit warnings point to false positives involving scalars, and initializing them is practically free. But here the size

Struct declaration and initialization in TREES

2019-12-17 Thread Erick Ochoa
Hi, I'm interested in printing VAR_DECL trees that are of type RECORD_TYPE. I am using the function print_generic_decl for debugging and found this interesting behaviour. When I do initialization of structs using the following syntax: ``` struct aStruct { _Bool e; int a; char b; float c; double

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

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

[Bug c++/92774] ICE with defaulted three-way comparison function

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92774 Jason Merrill changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c++/91165] [10 Regression] error: location references block not in block tree

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91165 Jason Merrill changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c++/80635] std::optional and bogus -Wmaybe-uninitialized warning

2019-12-17 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80635 --- Comment #31 from Jason Merrill --- (In reply to Pedro Alves from comment #30) > I assume so, but do we really want to zero-initialize the buffer? T might > be large, and I'd think that pessimization to quiet a warning isn't the > right way

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,

  1   2   3   >