Re: patch to fix PR88157

2018-11-23 Thread Jeff Law
On 11/23/18 3:04 PM, Vladimir Makarov wrote: >   The following patch fixes > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88157 > >   The patch was successfully bootstrapped on x86 and x86-64 with GO and D. > >   Committed as rev. 266422. > > > pr88157.patch > > Index: ChangeLog > =

[committed][PR rtl-optimization/87053.c] Keep EDGE_IGNORE from leading out of jump threader

2018-11-23 Thread Jeff Law
As mentioned in the BZ, EDGE_IGNORE is leaking out of the threader. If we have a jump threading path through a block with one or more EDGE_IGNORE outgoing edges, then the duplicate block's outgoing edges will have the EDGE_IGNORE flag set. I looked at doing the switch statement and edge cleanups

Re: [RFC] Fix recent popcount change is breaking

2018-11-23 Thread Bin.Cheng
On Sat, Jul 28, 2018 at 7:36 AM Kugan Vivekanandarajah wrote: > > Hi, > > On 28 July 2018 at 01:13, Richard Biener wrote: > > On July 27, 2018 3:33:59 PM GMT+02:00, "Martin Liška" > > wrote: > >>On 07/11/2018 02:31 PM, Richard Biener wrote: > >>> Why not simply make popcountdi available in the

Re: [PATCH] add simple attribute introspection

2018-11-23 Thread Martin Sebor
On 11/22/18 6:09 AM, Rainer Orth wrote: Hi Christophe, On Sat, 10 Nov 2018 at 00:43, Martin Sebor wrote: On 11/09/2018 12:59 PM, Jeff Law wrote: On 10/31/18 10:27 AM, Martin Sebor wrote: Ping: https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01473.html With the C++ bits approved I'm still lo

Re: [PATCH] add simple attribute introspection

2018-11-23 Thread Martin Sebor
On 11/22/18 5:28 AM, Christophe Lyon wrote: On Sat, 10 Nov 2018 at 00:43, Martin Sebor wrote: On 11/09/2018 12:59 PM, Jeff Law wrote: On 10/31/18 10:27 AM, Martin Sebor wrote: Ping: https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01473.html With the C++ bits approved I'm still looking for a r

Re: [PATCH] x86: Add -march=cascadelake

2018-11-23 Thread Andi Kleen
Uros Bizjak writes: > On Thu, Nov 22, 2018 at 12:48 PM Martin Liška wrote: >> >> On 11/22/18 8:07 AM, Wei Xiao wrote: >> > Jakub, >> > >> > Thanks for the comments! >> > I have addressed them as attached. >> >> Hi. >> >> Can you please add the new march into: >> >> - gcc/doc/extend.texi:20530 >>

Re: C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-23 Thread Ville Voutilainen
On Fri, 23 Nov 2018 at 23:12, Marek Polacek wrote: > > >A nested namespace definition cannot be inline. This is supposed to handle > > >cases such as > > >namespace A::B::inline C { ... } > > >because after 'C' we don't see :: so it breaks and we call push_namespace > > >outside the for loop. So

patch to fix PR88157

2018-11-23 Thread Vladimir Makarov
  The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88157   The patch was successfully bootstrapped on x86 and x86-64 with GO and D.   Committed as rev. 266422. Index: ChangeLog === --- ChangeLog (revision 266

Re: [PATCH] detect missing nuls in address of const char (PR 87756)

2018-11-23 Thread Jakub Jelinek
On Fri, Nov 23, 2018 at 11:46:18AM -0700, Martin Sebor wrote: > I have now committed this patch as r266418. Two of the tests fail everywhere. Fixed thusly, committed as obvious: 2018-11-23 Jakub Jelinek PR tree-optimization/87756 * gcc.dg/builtin-memchr-2.c: Scan the gimple d

Re: RFA: patch for test PR70669 test

2018-11-23 Thread Vladimir Makarov
On 11/22/2018 07:30 PM, Segher Boessenkool wrote: Hi! On Thu, Nov 22, 2018 at 02:47:10PM -0500, Vladimir Makarov wrote:  To generate the expected code with r in a general reg, I just decrease the number of getting r value into vsx reg by changing r + r onto -r. Is the following patch ok f

[PATCH] -fdump-go-spec mishandles typedefs that precede the definition of their underlying type

2018-11-23 Thread Nikhil Benesch
I'm submitting a patch for an issue that doesn't appear to have been reported yet. The -fdump-go-spec flag currently mishandles the following C code: typedef struct s *sp; struct s {}; These are the Go declarations that are generated: type sp *struct{} type s s Whereas these are

[C++ PATCH] Fix wrong-code with generic lambda (PR c++/86943)

2018-11-23 Thread Jakub Jelinek
Hi! On the following testcase, the call to operator () is marked as CALL_FROM_THUNK_P and therefore genericization ignores all subtrees thereof. Unfortunately, one of the arguments is a move ctor call which is not itself CALL_FROM_THUNK_P and thus we need to genericize its arguments, otherwise we

Re: Stream TREE_TYPE of TYPE_DECLs again

2018-11-23 Thread Bernhard Reutner-Fischer
Honza, One nit. On 21 November 2018 19:08:43 CET, Jan Hubicka wrote: >> >Index: ipa-devirt.c >=== >--- ipa-devirt.c (revision 266334) >+++ ipa-devirt.c (working copy) >@@ -2289,27 +2291,43 @@ dump_type_inheritance_gr

Re: C++ PATCH to implement P1094R2, Nested inline namespaces

2018-11-23 Thread Marek Polacek
On Thu, Nov 22, 2018 at 10:04:26AM +0200, Ville Voutilainen wrote: > On Tue, Nov 20, 2018 at 04:59:46PM -0500, Jason Merrill wrote: > > On 11/19/18 5:12 PM, Marek Polacek wrote: > >> > + /* Don't forget that the innermost namespace might have been > >> > + marked as inline. */ > >> > + is_in

[PATCH 4/4][libbacktrace] Add tests for unused formats

2018-11-23 Thread Tom de Vries
Hi, When building libbacktrace, we typically use elf.c, and don't build pecoff.c, xcoff.c or unknown.c Add testcases that use unused format to ensure that we also build and test those on a typical development setup. Bootstrapped and reg-tested on x86_64. OK for trunk? Thanks, - Tom [libbacktr

[PATCH 3/4][libbacktrace] Don't point to released memory in backtrace_vector_release

2018-11-23 Thread Tom de Vries
[ was: Re: [PATCH 2/2][libbacktrace] Don't point to released memory in backtrace_vector_release ] On Thu, Nov 22, 2018 at 01:36:49PM +0100, Tom de Vries wrote: > Hi, > > When backtrace_vector_release is called with vec.size == 0, it releases the > memory pointed at by vec.base. > > In case of th

[PATCH 2/4][libbacktrace] Avoid realloc with size == 0 in backtrace_vector_release

2018-11-23 Thread Tom de Vries
[ was: Re: [PATCH 1/2][libbacktrace] Handle realloc returning NULL if size == 0 ] On Thu, Nov 22, 2018 at 06:16:20PM +, Joseph Myers wrote: > On Thu, 22 Nov 2018, Tom de Vries wrote: > > > Hi, > > > > If realloc is called with size 0, realloc can return NULL. > > Note that, as of C17, real

[PATCH 1/4][libbacktrace] Test check_PROGRAMS without mmap

2018-11-23 Thread Tom de Vries
[ was: [PATCH 1/2][libbacktrace] Handle realloc returning NULL if size == 0 ] On Thu, Nov 22, 2018 at 01:35:43PM +0100, Tom de Vries wrote: > Hi, > > Build and tested on x86_64, with mmap.c replaced by alloc.c to ensure that > backtrace_vector_release in alloc.c is tested. Hi, I came up with a

Re: [PATCH,fortran] Make recursion_check work for multiple threads

2018-11-23 Thread Janne Blomqvist
On Fri, Nov 23, 2018 at 10:24 PM Jerry DeLisle wrote: > On 11/23/18 11:58 AM, Janne Blomqvist wrote: > > With multiple threads, using an unprotected static variable to check > > whether recursion has occured isn't valid, as one thread might have > > modified the variable, thus causing another thr

[PATCH,fortran] Make recursion_check work for multiple threads

2018-11-23 Thread Janne Blomqvist
With multiple threads, using an unprotected static variable to check whether recursion has occured isn't valid, as one thread might have modified the variable, thus causing another thread to incorrectly conclude that recursion has occured. This patch avoids this problem by using a thread-specific

Re: [PATCH] detect missing nuls in address of const char (PR 87756)

2018-11-23 Thread Martin Sebor
I have now committed this patch as r266418. Martin On 11/6/18 5:05 PM, Martin Sebor wrote: Jeff, I'd like to go ahead and commit the patch as is.  I believe the use of the default argument is appropriate and in line with GCC practice.  Please let me know if you have strong objections. If I don'

Re: [PATCH] handle unusual targets in -Wbuiltin-declaration-mismatch (PR 88098)

2018-11-23 Thread Martin Sebor
I have committed this in r266417. Martin On 11/21/18 10:04 AM, Martin Sebor wrote: On 11/21/18 6:08 AM, Rainer Orth wrote: Hi Martin, By calling builtin_decl_explicit rather than builtin_decl_implicit the updated patch in the attachment avoids test failures due to missing warnings on targets

Re: [PATCH][RFC] Extend locations where to seach for Fortran pre-include.

2018-11-23 Thread Joseph Myers
On Fri, 23 Nov 2018, Martin Liška wrote: > Looks the problematic is quite complex as I can understand. I prepared a patch > that should hopefully follow advises provided. I don't see how this version ensures that NATIVE_SYSTEM_HEADER_DIR is properly sysrooted. Note there's add_sysrooted_prefix

Re: [PATCH, GCC, AArch64] Branch Dilution Pass

2018-11-23 Thread Carey Williams
Hi all, Thank you for the comments. For the same reasons as stated by Kyrill and Richard E., I do believe it has to be the compiler that implements this. I will look to split the patch and address the points made by Andrew. From: Richard Earnshaw (lists) Sent:

Re: [PATCH][GCC][DOC] Remove obsolete arm and aarch64 CPU names from invoke.texi

2018-11-23 Thread Sandra Loosemore
On 11/23/18 9:55 AM, Sam Tebbs wrote: Hi all, The mtune= documentation in doc/invoke.texi contains some obsolete CPU names that have been removed from the Arm and AArch64 backends. This patch removes them. All removed CPU names: * arm2 * arm250 * arm3 * arm60

Re: [PATCH][RFC] Come up with memop_ret enum instead of int endp for memory operations.

2018-11-23 Thread Martin Sebor
On 11/23/18 8:06 AM, Martin Liška wrote: Hi. It's patch proposal that suggests to use an enum instead of 'int endp' for functions that expand memory move builtins. I've touch the code multiple times and it always take me time to realize what the magic numbers 0, 1, 2 mean. Does the suggestion m

[PATCH][GCC][ARM] Ensure dotproduct is only enabled on armv8 neon

2018-11-23 Thread Sam Tebbs
Hi all, Currently on AArch32, invoking with -march=armv8.2-a+dotprod -mfpu=neon incorrectly enables armv7 dotproduct. This patch restricts dotproduct to armv8 to correct the issue. When using a float ABI different from that of the host platform, including /usr/include/gnu/stubs.h errors due to a

[PATCH][GCC][DOC] Remove obsolete arm and aarch64 CPU names from invoke.texi

2018-11-23 Thread Sam Tebbs
Hi all, The mtune= documentation in doc/invoke.texi contains some obsolete CPU names that have been removed from the Arm and AArch64 backends. This patch removes them. All removed CPU names: * arm2 * arm250 * arm3 * arm60 * arm600 * arm610 *

[PATCH] PR libstdc++/65229 fix pretty printer for std::bitset<0>

2018-11-23 Thread Jonathan Wakely
Martin provided this fix years ago in the PR, but I've overlooked it until now. 2018-11-23 Martin Sebor Jonathan Wakely PR libstdc++/65229 * python/libstdcxx/v6/printers.py (StdBitsetPrinter): Handle exception thrown for std::bitset<0>. * testsuit

[PATCH] PR libstdc++/87308 adjust regex used in std::any pretty printer

2018-11-23 Thread Jonathan Wakely
The pretty printer for std::any fails when the contained value is a locally-defined type, because the name in the debuginfo has cv-qualifiers and ptr-declarators in different positions. The unexpected format confuses the printer. This makes the printer's regex handle either format. This isn't a c

[PATCH][RFC] Come up with memop_ret enum instead of int endp for memory operations.

2018-11-23 Thread Martin Liška
Hi. It's patch proposal that suggests to use an enum instead of 'int endp' for functions that expand memory move builtins. I've touch the code multiple times and it always take me time to realize what the magic numbers 0, 1, 2 mean. Does the suggestion make sense? Do you like enum values? Can it

Re: [PATCH] Fix tree-ssa/phi-opt-11.c on s390x (PR testsuite/85368)

2018-11-23 Thread Andreas Krebbel
On 22.11.18 20:56, Jakub Jelinek wrote: > Hi! > > This test apparently FAILs on s390x-linux, which is an effective target of > both logical_op_short_circuit and branch_cost. > The test has > /* { dg-additional-options "-mbranch-cost=2" { target branch_cost } } */ > and that option effectively make

[PATCH][GCC][AARCH64] Replace calls to strtok with strtok_r in aarch64 attribute handling code

2018-11-23 Thread Sam Tebbs
Hi all, They AArch64 general attribute handling code uses the strtok function to separate comma-delimited attributes in a string. This causes problems for and interfers with attribute-specific handling code that also uses strtok to separate attribute arguments, since strtok isn't re-entrant. This

Patch ping (Re: [C++ PATCH] Don't incorrectly reject {un,}signed char constexpr array initialization in templates (PR c++/87476))

2018-11-23 Thread Jakub Jelinek
Hi! On Fri, Nov 16, 2018 at 10:00:29AM +0100, Jakub Jelinek wrote: > 2018-11-16 Jakub Jelinek > > PR c++/87476 > * typeck2.c (digest_init_r): Re-add handing of signed/unsigned char > strings and add it to the initialization of wide array from non-wide > string diagnosti

Re: [RFC] Tweak libgomp env vars in parallel make check

2018-11-23 Thread Jakub Jelinek
On Fri, Nov 23, 2018 at 02:57:44PM +0100, Martin Liška wrote: > > Unfortunately, haven't figured out how to convince automake that I want to > > write my own check-am goal, so had to drop dejagnu automake option and > > add all the dejagnu stuff manually. > > Do it (at least partially) address >

Re: [PATCH][RFC] Extend locations where to seach for Fortran pre-include.

2018-11-23 Thread Martin Liška
On 11/22/18 3:35 PM, Joseph Myers wrote: > On Thu, 22 Nov 2018, Martin Liška wrote: > >>> (Multilib suffixes on include directories for C are more or less an >>> implementation detail of how fixed headers are arranged in the case where >>> sysroot headers suffixes are used; they aren't really ex

Re: [RFC] Tweak libgomp env vars in parallel make check

2018-11-23 Thread Martin Liška
On 11/23/18 2:49 PM, Jakub Jelinek wrote: > Hi! > > When running parallel make check on hosts with large amounts of CPUs (cores > and/or threads), some libgomp tests take a long time to complete. The > problem is that the libgomp runtime generally by default assumes (unless > omp_set_dynamic whic

[RFC] Tweak libgomp env vars in parallel make check

2018-11-23 Thread Jakub Jelinek
Hi! When running parallel make check on hosts with large amounts of CPUs (cores and/or threads), some libgomp tests take a long time to complete. The problem is that the libgomp runtime generally by default assumes (unless omp_set_dynamic which checks /proc/loadavg) that it has the given cpu reso

[PATCH] Fix PR88149

2018-11-23 Thread Richard Biener
The following fixes an old issue with BB vectorization demoting some SLP nodes to external (built up from scalars). If we have the same operand in a stmt but with different such state we get confused. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. >From b1b52fc997b8229

Re: [PATCH v3] Add sinh(atanh(x)) and cosh(atanh(x)) optimizations

2018-11-23 Thread Wilco Dijkstra
Hi, > I checked it. They are all the same on x86_64: > https://pastebin.com/e63FxDAy > I even forced to call the glibc sinh and atanh, but use the sqrtsd > instruction. > But I do agree that there may be an arch that sets an errno for sinh > or cosh but not for sqrt, implying in a unexpected beha

Re: [PATCH, ARM] Clean up arm backend using the @ construct for MD patterns

2018-11-23 Thread Kyrill Tkachov
Hi Mihail, On 07/11/18 17:46, Mihail Ionescu wrote: On 10/09/2018 09:52 AM, Ramana Radhakrishnan wrote: > On 09/10/2018 09:27, Mihail Ionescu wrote: >> Hi all, >> >> This patch removes some of the machine mode checks from the arm backend when >> emitting instructions by using the '@' construct

Re: [PATCH, ARM, ping] Clean up arm backend using the @ construct for MD patterns

2018-11-23 Thread Mihail Ionescu
Ping? Best regards, Mihail On 11/07/2018 05:46 PM, Mihail Ionescu wrote: On 10/09/2018 09:52 AM, Ramana Radhakrishnan wrote: On 09/10/2018 09:27, Mihail Ionescu wrote: Hi all, This patch removes some of the machine mode checks from the arm backend when emitting instructions by using the

Re: LRA patch for PR87718

2018-11-23 Thread Uros Bizjak
Hello! > The following patch fixes > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87718 > > The patch adds a special treatment for moves with a hard register in > register cost and class > calculation. > > The patch was bootstrapped and tested on x86-64 and ppc64. > > I found two testsuite