Re: [C++ Patch] Fix location of grokdeclarator error message about static data member definition

2018-12-12 Thread Jason Merrill
On 12/12/18 9:56 AM, Paolo Carlini wrote: Hi, it seems we can easily improve the location of this - not so uncommon in novice code - error to point to the 'static' keyword. OK. Jason

Re: [PATCH, rs6000] Allow libitm to use HTM on newer hw and kernels

2018-12-12 Thread Segher Boessenkool
On Wed, Dec 12, 2018 at 01:47:02PM -0600, Peter Bergner wrote: > Libitm on POWER hardware looks for the "htm" bit in AT_HWCAP2 to determine > whether it can use HTM when executing code within __transaction_atomic > code blocks. However, on newer hardware and kernels, the "htm" bit is no > longer s

Re: [doc PATCH] update attribute docs for C++

2018-12-12 Thread Martin Sebor
On 12/11/18 9:41 PM, Sandra Loosemore wrote: On 12/5/18 10:14 AM, Martin Sebor wrote: On 12/4/18 8:49 PM, Sandra Loosemore wrote: What is the "it" referenced in the user's questions you quoted?  The const/pure attributes?  Those are function attributes.  The text you are adding is in the type

[committed/doc] fix typos in attribute copy

2018-12-12 Thread Martin Sebor
The attached patch committed in r267065 corrects a few minor typos in the description of attribute copy in the manual. Martin gcc/ChangeLog: * doc/extend.texi (attribute copy): Fix typos. Index: gcc/doc/extend.texi === --- gcc/doc

Fix random_sample_n and random_shuffle when RAND_MAX is small

2018-12-12 Thread Giovanni Bajo
Hello, we hit a bug today while cross-compiling a C++ program with mingw32: if random_shuffle or random_sample_n are called with a sequence of elements whose length is higher than RAND_MAX, the functions don't behave as expected because they ignore elements beyond RAND_MAX. This does not happen of

Re: [PATCH] C++: better locations for bogus initializations (PR c++/88375)

2018-12-12 Thread Jason Merrill
On 12/11/18 5:55 PM, David Malcolm wrote: PR c++/88375 reports that errors relating to invalid conversions in initializations are reported at unhelpfully vague locations, as in e.g.: enum struct a : int { one, two }; struct foo { int e1, e2; a e3; } arr[] = { { 1, 2, a::one }, {

[patch][aarch64-*-*freebsd*] Enable TARGET_DEFAULT_ASYNC_UNWIND_TABLES

2018-12-12 Thread Andreas Tobler
Hi all, I have this patch since a longer time in my tree. No obvious fallout visible. I'm going to commit this patch in the next days if no one objects. TIA, Andreas 2018-12-12 Andreas Tobler * config.gcc: Enable TARGET_DEFAULT_ASYNC_UNWIND_TABLES on aarch64*-*-freebsd*.

Re: [ping] Change static chain to r11 on aarch64

2018-12-12 Thread Wilco Dijkstra
Hi Martin, > Does a non-executable stack actually improve security? Absolutely, it's like closing your front door rather than just leave it open for anyone. > For the alternative implementation using (custom) function > descriptors (-fno-trampolines) the static chain becomes > part of the ABI or

Re: [ping] Change static chain to r11 on aarch64

2018-12-12 Thread Uecker, Martin
Hi Wilco, Am Mittwoch, den 12.12.2018, 22:04 + schrieb Wilco Dijkstra: > Hi Martin, > > > Does a non-executable stack actually improve security? > > Absolutely, it's like closing your front door rather than just leave it open > for anyone. The question is whether it is like closing the fro

[C++ PATCH] Fix __builtin_{is_constant_evaluated,constant_p} handling in static_assert (PR c++/86524, PR c++/88446)

2018-12-12 Thread Jakub Jelinek
Hi! The following patch fixes __builtin_is_constant_evaluated and __builtin_constant_p handling during static_assert evaluation. finish_static_assert calls fold_non_dependent_expr and complains if the result is not a constant expression, instead of requiring a constant expression, which causes __b

[PATCH] Add =*k, *km alternatives to zero_extend?i?i2 patterns (PR target/88461)

2018-12-12 Thread Jakub Jelinek
Hi! The following patch adds =*k, *km alternatives to the various zero_extend?i?i2 patterns, because kmov* instructions actually zero extend the destination to 64-bits. I've kept * for the alternatives because that is what is used e.g. in *mov[sd]i_internal patterns (probably to make it less like

[PATCH] Add zero extending patterns to vptest{,n}m instructions (PR target/88461)

2018-12-12 Thread Jakub Jelinek
Hi! The following patch uses a new mode iterator to avoid 2 almost same vptestm and 2 almost same vptestnm patterns, and adds patterns that zero extend those results to wider k registers, because that is what the instructions actually do. Bootstrapped/regtested on x86_64-linux and i686-linux, ok

[PATCH] Allow direct 0 and -1 moves to mask registers (PR target/88465)

2018-12-12 Thread Jakub Jelinek
Hi! As mentioned in the PR, we can use kxor? %kN, %kN, %kN or kxnor? %kN, %kN, %kN to set %kN to 0 or -1, instead of setting a GPR to that and moving to the mask register. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2018-12-12 Jakub Jelinek PR target/88465

[PATCH] Support AVX512F masked gather loads (PR tree-optimization/88464)

2018-12-12 Thread Jakub Jelinek
Hi! We support either the AVX2 gather loads (128-bit or 256-bit, using masks in vector registers), both conditional and unconditional, but AVX512F gather loads only unconditional. The problem was that tree-vect-stmts.c didn't have code to deal with the integral masktype argument the builtins have

libgo patch committed: Increase wait time for os/signal test

2018-12-12 Thread Ian Lance Taylor
This patch by Lynn Boger increases the time to wait for signals to be delivered in the TestAtomicStop test in the os/signal package. When running gccgo tests on ppc64 or ppc64le, there are intermittent failures in this test because the wait time is too small. Bootstrapped and ran os/signal test on

[committed] Fix OpenMP default(none) handling of module array/derived type parameters from other TUs (PR fortran/88463)

2018-12-12 Thread Jakub Jelinek
Hi! The following patch makes array or derived type module parameters from other TUs predetermined shared, so that they aren't rejected with default(none) or copied with default(firstprivate). I went through all the spots in the Fortran FE that set TREE_READONLY, most of them are on PARM_DECLs (t

[PATCH] avoid folding snprintf calls with bounds > INT_MAX (PR 87096)

2018-12-12 Thread Martin Sebor
POSIX requires snprintf to fail with EOVERFLOW when the specified bound exceeds INT_MAX. This requirement conflicts with the C requirements on valid calls to the function and isn't universally implemented (e.g., Glibc doesn't seem to follow it, and GCC has historically not paid heed to it either)

Re: [PATCH 2/4] c/c++, asm: Use nicer error for duplicate asm qualifiers

2018-12-12 Thread David Malcolm
On Wed, 2018-12-12 at 11:40 -0600, Segher Boessenkool wrote: > On Tue, Dec 11, 2018 at 10:35:00AM -0500, David Malcolm wrote: > > On Mon, 2018-12-10 at 22:47 +, Segher Boessenkool wrote: > > > > [...] > > > > > diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c > > > index 121a91c..652e53c 1006

Re: [gofrontend-dev] Re: libgo patch committed: Add precise stack scan support

2018-12-12 Thread Ian Lance Taylor
On Wed, Dec 12, 2018 at 8:10 AM Cherry Zhang wrote: > > Thank you, Matthias! > > From the log, essentially all the tests aborted. The only place the new code > can cause abort on all programs that I can think of is in the runtime startup > code, probestackmaps, which calls value_size, which abor

Re: [PATCH 2/4] c/c++, asm: Use nicer error for duplicate asm qualifiers

2018-12-12 Thread Segher Boessenkool
On Wed, Dec 12, 2018 at 06:23:08PM -0500, David Malcolm wrote: > On Wed, 2018-12-12 at 11:40 -0600, Segher Boessenkool wrote: > > > Is there test coverage for these errors and notes? > > > > Yes, in this same patch. The error, that is; I have no idea how to > > test > > the note, and that belongs

Re: [PATCH, rs6000] Allow libitm to use HTM on newer hw and kernels

2018-12-12 Thread Peter Bergner
On 12/12/18 2:52 PM, Segher Boessenkool wrote: >> +/* This is a fairly new feature bit, so handle it not being defined. */ >> +#ifndef PPC_FEATURE2_HTM_NO_SUSPEND >> +# define PPC_FEATURE2_HTM_NO_SUSPEND 0 >> +#endif > > Doing it this way can be pretty surprising for users not aware you defined >

Re: [PATCH] libgcc: rs6000: tramp.S: fix placement of .cfi_endproc for __trampoline_setup

2018-12-12 Thread Segher Boessenkool
On Wed, Dec 12, 2018 at 07:30:08PM +1030, Alan Modra wrote: > On Wed, Dec 12, 2018 at 08:43:41AM +0100, Rasmus Villemoes wrote: > > diff --git a/libgcc/config/rs6000/tramp.S b/libgcc/config/rs6000/tramp.S > > index 637f4510146..a9f0f3826dc 100644 > > --- a/libgcc/config/rs6000/tramp.S > > +++ b/lib

Re: [PATCH v3 09/10] Ignore LLVM's blank lines.

2018-12-12 Thread Segher Boessenkool
Hi! On Wed, Dec 12, 2018 at 11:52:56AM +, Andrew Stubbs wrote: > > @@ -9032,9 +9040,16 @@ proc check_effective_target_cet { } { > } "-O2" ] > } > > + > # Return 1 if target supports floating point "infinite" > proc check_effective_target_inf { } { Stray newline? Segher

Re: [ping] Change static chain to r11 on aarch64

2018-12-12 Thread Paul Koning
> On Dec 12, 2018, at 5:12 PM, Uecker, Martin > wrote: >> ... >> I've not seen such an alternative implementation (-fno-trampolines is >> ignored on all targets I tried), > > It was implemented for Ada. But here is a patch to also > activate it for C: > > https://gcc.gnu.org/ml/gcc-patches/2

Re: [PATCH] [MSP430] Fix gcc.dg/pr85180.c and gcc.dg/pr87985.c timeouts for msp430-elf -mlarge

2018-12-12 Thread Segher Boessenkool
On Wed, Dec 12, 2018 at 12:09:19PM +, Jozef Lawrynowicz wrote: > Compilation of gcc.dg/pr85180.c and gcc.dg/pr87985.c times out after 5 minutes > for msp430 with -mlarge. > > nonzero_bits1 (from rtlanal.c), recurses many times for each reg > because reg_nonzero_bits_for_combine (combine.c) nev

[PATCH AutoFDO]Call update_max_bb_count even if autofdo counts are all zeros

2018-12-12 Thread bin.cheng
Hi, This patch calls update_max_bb_count even if autofdo counts are all zeros, otherwise it would trigger ICE because of mismatch between basic blocks' count (all autofdo::zero) and cfun->cfg->max_count (guessed::non_zero). For functions with all autofdo::zero counts, we should improve by restoring

[PATCH AutoFDO]Skip generating histogram value for internal call

2018-12-12 Thread bin.cheng
Hi, This patch skips generating histogram value for internal function call in autofdo, otherwise it would trigger ICE with following patch re-enabling indirect call value profile transformation. I think this patch is actually needed for GCC-6 on which indirect call value profile is not disabled

[PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-12 Thread bin.cheng
Hi, Due to ICE and mal-functional bugs, indirect call value profile transformation is disabled on GCC-7/8/trunk. This patch restores the transformation. The main issue is AutoFDO should store cgraph_node's profile_id of callee func in the first histogram value's counter, rather than pointer to c

[PATCH] Fix split-path-5.c testcase (PR testsuite/88454)

2018-12-12 Thread Jakub Jelinek
Hi! On Mon, Dec 10, 2018 at 09:56:46PM -0700, Jeff Law wrote: > Note that split-path-5 has the same basic structure. A half-diamond > with a single statement in the middle block that should be trivially > if-convertable if profitable. So I adjusted that testcase. The split-path-5.c testcase now

Re: [PATCH] Add =*k, *km alternatives to zero_extend?i?i2 patterns (PR target/88461)

2018-12-12 Thread Uros Bizjak
On Wed, Dec 12, 2018 at 11:34 PM Jakub Jelinek wrote: > > Hi! > > The following patch adds =*k, *km alternatives to the various > zero_extend?i?i2 patterns, because kmov* instructions actually zero extend > the destination to 64-bits. I've kept * for the alternatives because that > is what is use

Re: [PATCH] Add zero extending patterns to vptest{,n}m instructions (PR target/88461)

2018-12-12 Thread Uros Bizjak
On Wed, Dec 12, 2018 at 11:36 PM Jakub Jelinek wrote: > > Hi! > > The following patch uses a new mode iterator to avoid 2 almost same > vptestm and 2 almost same vptestnm patterns, and adds patterns that zero > extend those results to wider k registers, because that is what the > instructions actu

Re: [PATCH] PR libstdc++/80762 avoid ambiguous __constructible_from

2018-12-12 Thread Christophe Lyon
On Wed, 12 Dec 2018 at 17:13, Jonathan Wakely wrote: > > Ensure we don't try to instantiate __is_constructible_from, > because there are two partial specializations that are equally good > matches. > > PR libstdc++/80762 > * include/bits/fs_path.h (path::_Path): Use remove_cv_t and

<    1   2