[C++ PATCH] Fix concepts vs. PCH (PR c++/92458)

2019-11-11 Thread Jakub Jelinek
Hi! PCH remaps object addresses, so hash tables that use pointer hashing don't work well across PCH, because the hash values can change and without rehashing the hash tbales values might not be found. The following patch fixes it by using DECL_UID as hash function instead, which is stable across

[PATCH] Avoid *ORDERED_EXPRs in the IL if !HONOR_NANS (PR target/92449)

2019-11-11 Thread Jakub Jelinek
Hi! The testcase from the PR ICEs on rs6000. For __builtin_isunordered etc. the folding makes sure that there is no *ORDERED_EXPR etc. in the IL if !HONOR_NANS, but the complex multiplication can emit it when mixing -Ofast with -fno-cx-limited-range. The following patch makes sure we don't emit i

C++ PATCH for c++/88337 - P1327R1: Allow polymorphic typeid in constexpr

2019-11-11 Thread Marek Polacek
Part of P1327R1 is to allow typeid with an operand of polymorphic type in constexpr. I found that we pretty much support it already, the only tweak was to allow TYPEID_EXPR (only created in a template) in constexpr in C++20. I also noticed this in build_typeid: /* FIXME when integrating with c_

Re: [patch, fortran] PR92123 - [F2018/array-descriptor] Scalar allocatable/pointer with array descriptor (via bind(C)): ICE with select rank or error scalar variable with POINTER or ALLOCATABLE in pro

2019-11-11 Thread Vipul Parekh
On Sun, Nov 3, 2019 at 1:37 PM Paul Richard Thomas wrote: > > The attached patch is verging on the obvious. Thanks to Tobias for > spotting Vipul's messages on the J3 list. > > Regtests on FC30/x86_64 - OK for trunk and 9-branch? > > Paul Paul, Thanks for your follow-up on this issue. Would you

[PATCH] track dynamic allocation in strlen (PR 91582)

2019-11-11 Thread Martin Sebor
The attached patch extends the strlen pass to detect out-of-bounds accesses to memory allocated by calls to other allocation functions besides calloc and malloc, as well as VLAs, and user-defined functions declared with attribute alloc_size. There is some overlap with the _FORTIFY_SOURCE detectio

[C++ PATCH] Sorry about <=> on VECTOR_TYPE.

2019-11-11 Thread Jason Merrill
I'm not sure what semantics we might eventually want for vector <=>, but let's give a sorry for now. Tested x86_64-pc-linux-gnu, applying to trunk. --- gcc/cp/typeck.c | 7 +++ gcc/testsuite/g++.dg/cpp2a/spaceship-vec1.C | 11 +++ 2 files changed, 18 inse

Re: [C++ PATCH] Implement P1946R0 - Allow defaulting comparisons by value

2019-11-11 Thread Jason Merrill
On 11/11/19 8:07 AM, Jakub Jelinek wrote: Hi! From https://www.reddit.com/r/cpp/comments/dtuov8/201911_belfast_iso_c_committee_trip_report/ I understood P1946R0 made it into C++20, so here is my attempt at implementing it, you had most of it implemented anyway because in system headers fr

Re: [PATCH] Bump minimum MPFR version to 3.1.0

2019-11-11 Thread Jeff Law
On 11/10/19 4:05 AM, Janne Blomqvist wrote: > On Sun, Nov 10, 2019 at 11:43 AM Thomas Koenig wrote: >> >> Hi Janne, >> >>> Bump the minimum MPFR version to 3.1.0, released 2011-10-03. With this >>> requirement one can still build GCC with the operating system provided >>> MPFR on old but still sup

Re: [PATCH] include size and offset in -Wstringop-overflow

2019-11-11 Thread Jeff Law
On 11/6/19 2:06 PM, Martin Sebor wrote: > On 11/6/19 1:39 PM, Jeff Law wrote: >> On 11/6/19 1:27 PM, Martin Sebor wrote: >>> On 11/6/19 11:55 AM, Jeff Law wrote: On 11/6/19 11:00 AM, Martin Sebor wrote: > The -Wstringop-overflow warnings for single-byte and multi-byte > stores mention 

Re: [PATCH] Enable libsanitizer build on riscv64

2019-11-11 Thread Jim Wilson
On Mon, Nov 11, 2019 at 3:45 AM Andreas Schwab wrote: > Only ubsan is supported so far. This has been tested on openSUSE > Tumbleweed, there are no testsuite failures. > > * configure.tgt (riscv64-*-linux*): Enable build. I tried this on my riscv64 Fedora system, and I get a build error.

Re: [PATCH] include size and offset in -Wstringop-overflow

2019-11-11 Thread Jeff Law
On 11/6/19 3:34 PM, Martin Sebor wrote: > On 11/6/19 2:06 PM, Martin Sebor wrote: >> On 11/6/19 1:39 PM, Jeff Law wrote: >>> On 11/6/19 1:27 PM, Martin Sebor wrote: On 11/6/19 11:55 AM, Jeff Law wrote: > On 11/6/19 11:00 AM, Martin Sebor wrote: >> The -Wstringop-overflow warnings for s

[PATCH] Set AVX128_OPTIMAL for all avx targets.

2019-11-11 Thread Hongtao Liu
Hi: This patch is about to set X86_TUNE_AVX128_OPTIMAL as default for all AVX target because we found there's still performance gap between 128-bit auto-vectorization and 256-bit auto-vectorization even with epilog vectorized. The performance influence of setting avx128_optimal as default on SP

Re: [PATCH] Bump minimum MPFR version to 3.1.0

2019-11-11 Thread Janne Blomqvist
On Tue, Nov 12, 2019 at 6:59 AM Jeff Law wrote: > > On 11/10/19 4:05 AM, Janne Blomqvist wrote: > > On Sun, Nov 10, 2019 at 11:43 AM Thomas Koenig > > wrote: > >> > >> Hi Janne, > >> > >>> Bump the minimum MPFR version to 3.1.0, released 2011-10-03. With this > >>> requirement one can still buil

Re: [PATCH] Fix ICE in vrp on aarch64 (PR tree-optimization/92452)

2019-11-11 Thread Richard Biener
On Mon, 11 Nov 2019, Jakub Jelinek wrote: > Hi! > > The following testcase ICEs on aarch64-linux. The problem is that maxbound > is POLY_INT_CST, eltsize is INTEGER_CST, but int_const_binop for > TRUNC_DIV_EXPR returns NULL_TREE as it can't simplify it to something > usable and we later try to M

Re: [patch, fortran] Load scalar intent-in variables at the beginning of procedures

2019-11-11 Thread Janne Blomqvist
On Tue, Nov 12, 2019 at 12:53 AM Thomas König wrote: > > Hi Janne, > > > Wouldn't it be even better to pass scalar intent(in) variables by > > value? The obvious objection of course is ABI, but for procedures with > > an explicit interface we're not following any particular ABI anyways? > > The pr

Re: [PATCH] Avoid *ORDERED_EXPRs in the IL if !HONOR_NANS (PR target/92449)

2019-11-11 Thread Richard Biener
On Tue, 12 Nov 2019, Jakub Jelinek wrote: > Hi! > > The testcase from the PR ICEs on rs6000. For __builtin_isunordered etc. > the folding makes sure that there is no *ORDERED_EXPR etc. in the IL > if !HONOR_NANS, but the complex multiplication can emit it when mixing > -Ofast with -fno-cx-limite

Re: [PATCH] Enhance syntax of -fdbg-cnt.

2019-11-11 Thread Martin Liška
On 11/11/19 4:25 PM, Martin Liška wrote: I'm going to test the patch. Martin There's one more version where I use more references to mitigate indirection of 'counter' vectors. Martin >From e3b8b3edfed1b5ba320d0fe85686908c5c37c22a Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Fri, 8 Nov 2

Re: [PATCH] Sort debug counter names.

2019-11-11 Thread Martin Liška
On 11/11/19 3:20 PM, Richard Biener wrote: On Mon, Nov 11, 2019 at 9:23 AM Martin Liška wrote: Hi. The small patch is about sorting of debug counter values. Ready to be installed? OK Thanks, Martin Hi. There's a small follow up where I enforce the sorting via a selftest. Ready for tr

Re: [PATCH][vect]PR92347: Don't overwrite safelen for epilogues

2019-11-11 Thread Richard Biener
On Mon, 11 Nov 2019, Andre Vieira (lists) wrote: > Hi, > > After during my investigation into the first testcase in PR92347 I noticed > that the ICE was arising because the vectorizer was under the assumption it > knew how to vectorize the zp call for both the main and epilogues. By the > time i

<    1   2