Re: libgo patch committed: Fixes for sparc64

2016-10-12 Thread Andrew Pinski
On Wed, Oct 12, 2016 at 9:20 PM, Ian Lance Taylor wrote: > On Wed, Oct 12, 2016 at 8:03 PM, Andrew Pinski wrote: >> On Wed, Oct 12, 2016 at 10:43 AM, Ian Lance Taylor wrote: >>> On Wed, Oct 12, 2016 at 7:28 AM, Ian Lance Taylor

Re: [PATCH] Fix PR77937

2016-10-12 Thread Markus Trippelsdorf
On 2016.10.12 at 20:14 -0500, Bill Schmidt wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77937 reports an ICE in SLSR > where a POINTER_PLUS_EXPR occurs with a candidate increment of -1. This > is supposed to be prevented by code in analyze_increments, since replacement > of such a

Re: Set nonnull attribute to ptr_info_def based on VRP

2016-10-12 Thread kugan
Hi Richard, what does this try to do? Preserve info VRP computed across PTA? I think we didn't yet sort out the nonlocal/escaped vs. null handling properly (or how PTA should handle get_ptr_nonnull). The way you are using it asks for pt.null to be orthogonal to nonlocal/escaped and thus

Re: [vrp] use get_ptr_nonnull in tree-vrp

2016-10-12 Thread kugan
Hi Richard, On 13/10/16 05:53, kugan wrote: Hi Richard, On 12/10/16 23:24, Richard Biener wrote: On Wed, Oct 12, 2016 at 8:56 AM, kugan wrote: Hi, This patch uses get_ptr_nonnull in tree-vrp. Bootstrapped and regression tested this with other patched

Re: libgo patch committed: Fixes for sparc64

2016-10-12 Thread Ian Lance Taylor
On Wed, Oct 12, 2016 at 8:03 PM, Andrew Pinski wrote: > On Wed, Oct 12, 2016 at 10:43 AM, Ian Lance Taylor wrote: >> On Wed, Oct 12, 2016 at 7:28 AM, Ian Lance Taylor wrote: >>> This patch to libgo by James Clarke fixes libgo for sparc64.

Re: libgo patch committed: Fixes for sparc64

2016-10-12 Thread Andrew Pinski
On Wed, Oct 12, 2016 at 10:43 AM, Ian Lance Taylor wrote: > On Wed, Oct 12, 2016 at 7:28 AM, Ian Lance Taylor wrote: >> This patch to libgo by James Clarke fixes libgo for sparc64. The >> getrandom syscall was being ignored because the file was named >>

[PATCH] Fix PR77937

2016-10-12 Thread Bill Schmidt
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77937 reports an ICE in SLSR where a POINTER_PLUS_EXPR occurs with a candidate increment of -1. This is supposed to be prevented by code in analyze_increments, since replacement of such a candidate is not guaranteed to be profitable. The test for this

[PATCH] Don't unnecessarily create stack protector guard decls and MEMs (PR target/77957)

2016-10-12 Thread Jakub Jelinek
Hi! PR77957 is likely a rs6000 backend bug where a useless memory load causes .LCTOC0 undefined reference in the end at -O0 and as such should be fixed, but I think it is completely unnecessary to create those loads at all if we know we are going to ignore it in the stack_protect_{set,test}

[PATCH] Fix -Wimplicit-fallthrough ICE (PR c/77946)

2016-10-12 Thread Jakub Jelinek
Hi! Seems 2 functions in varasm.c just use TREE_PUBLIC on LABEL_DECLs together with other kinds of decls, but as TREE_PUBLIC on LABEL_DECLs means now something different, it breaks badly. While I could change those 2 functions in varasm.c, I'm afraid other functions might be doing something

Re: [PATCH 01/16] read-md.c: Add various cleanups to ~rtx_reader

2016-10-12 Thread Richard Sandiford
Sorry, haven't had time to read the full series yet, but: David Malcolm writes: > On Wed, 2016-10-05 at 17:51 +0200, Bernd Schmidt wrote: >> On 10/05/2016 06:14 PM, David Malcolm wrote: >> > The selftests for the RTL frontend require supporting multiple >> > reader instances

Re: [PATCH] 77864 Fix noexcept conditions for map/set default constructors

2016-10-12 Thread Tim Song
On Wed, Oct 12, 2016 at 4:36 PM, François Dumont wrote: > On 10/10/2016 23:01, Tim Song wrote: >> >> Trying again...with a few edits. >> >>> On Mon, Oct 10, 2016 at 3:24 PM, François Dumont >>> wrote: >>> >>> @@ -602,24 +612,32 @@

[Visium] Fix gcc.dg/compat/scalar-by-value-4/scalar-return-4

2016-10-12 Thread Eric Botcazou
There is a missing big-endian correction when types smaller than a word are passed through va_arg without promotion like _Complex char. Tested on visium-elf, applied on the mainline. 2016-10-12 Eric Botcazou * config/visium/visium.c (visium_gimplify_va_arg):

[PATCH 3/3] Extend -falign-FOO=N to N[,M[,N2[,M2]]]

2016-10-12 Thread Denys Vlasenko
falign-functions=N is too simplistic. Ingo Molnar ran some tests and it seems that on latest x86 CPUs, 64-byte alignment of functions runs fastest (he tried many other possibilites): this way, after a call CPU can fetch a lot of insns in the first cacheline fill. However, developers are less

[PATCH 0/3] Extend -falign-FOO=N to N[,M[,N2[,M2]]] version 4

2016-10-12 Thread Denys Vlasenko
These patches are for this bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66240 "RFE: extend -falign-xyz syntax" The test program: int g(); int f(int i) { i *= 3; while (--i > 100) { L1:if (g()) goto L1; if (g()) goto L2; } return

[PATCH 2/3] Temporary remove "at least 8 byte alignment" code from x86

2016-10-12 Thread Denys Vlasenko
This change drops forced alignment to 8 if requested alignment is higher than 8: before the patch, -falign-functions=9 was generating .p2align 4,,8 .p2align 3 which means: "align to 16 if the skip is 8 bytes or less; else align to 8". After this change, ".p2align 3" is not

[PATCH 1/3] Remove support for obsolete x86 -malign-foo options

2016-10-12 Thread Denys Vlasenko
2016-09-27 Denys Vlasenko * config/i386/i386-common.c (ix86_handle_option): Remove support for obsolete -malign-loops, -malign-jumps and -malign-functions options. * config/i386/i386.opt: Likewise. Index: gcc/common/config/i386/i386-common.c

Re: [PATCH] 77864 Fix noexcept conditions for map/set default constructors

2016-10-12 Thread François Dumont
On 10/10/2016 23:01, Tim Song wrote: Trying again...with a few edits. On Mon, Oct 10, 2016 at 3:24 PM, François Dumont wrote: @@ -602,24 +612,32 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct _Rb_tree_impl : public _Node_allocator { _Key_compare

[PATCH] Tweaks to print_rtx_function

2016-10-12 Thread David Malcolm
On Wed, 2016-10-12 at 19:31 +0200, Bernd Schmidt wrote: > On 10/12/2016 07:48 PM, David Malcolm wrote: [...snip...] > > I think the only remaining item from our discussion above is what > > to do > > about the numbering of pseudos in the dumps (currently it just > > prints the regno > >

[PATCH] (v2) Add a "compact" mode to print_rtx_function

2016-10-12 Thread David Malcolm
On Wed, 2016-10-12 at 19:31 +0200, Bernd Schmidt wrote: > On 10/12/2016 07:48 PM, David Malcolm wrote: > > This patch implements a "compact" mode for print_rtx_function, > > implementing most of the ideas above. > > > > Example of output can be seen here: > >

Re: [PATCH] [ARC] New option handling, refurbish multilib support.

2016-10-12 Thread Andrew Burgess
* Claudiu Zissulescu [2016-10-10 15:26:47 +0200]: > Hi Andrew, > > This is updated patch of the original sent to mailing list some while ago. > > What is new: > - Do not use MULTILIB_REUSE as its semantic changed, and the old one was > causing issues

Re: [PATCH, GCC] Move MEMMODEL_* and enum memmodel from coretypes.h to memmodel.h

2016-10-12 Thread Joseph Myers
On Wed, 12 Oct 2016, Thomas Preudhomme wrote: > This patch is a follow up of [1] which aims to have all memory model related > declarations in memmodel.h. To achieve that, this patch moves memory model > related declaration from coretypes.h into memmodel.h. Note that since > memmodel.h is now

Re: [PATCH] Implement new hook for max_align_t_align

2016-10-12 Thread Carlos O'Donell
On 10/12/2016 10:17 AM, John David Anglin wrote: > On 2016-10-12 9:48 AM, Jason Merrill wrote: >> On Wed, Oct 12, 2016 at 4:02 AM, Jakub Jelinek wrote: >>> On Wed, Oct 12, 2016 at 09:52:04AM +0200, Florian Weimer wrote: dropping the alignment means that the padding before

Re: [RFC] Possible folding opportunities for string built-ins

2016-10-12 Thread Jim Wilson
On 10/12/2016 08:55 AM, Joseph Myers wrote: On Wed, 12 Oct 2016, Martin Liška wrote: Last question is whether one can aggressively fold strcasecmp in a host compiler? Or are there any situations where results depends on locale? There are the usual issues with Turkish locales having the

Re: [patch] aarch64-*-freebsd* support for gcc.

2016-10-12 Thread Andreas Tobler
Hi Jeff, On 10.10.16 23:10, Jeff Law wrote: On 10/10/2016 03:07 PM, Andreas Tobler wrote: Hi all, the attached patch brings support for the aarch64-*-freebsd* target. Bootstraped and tested, results on the list. Not that many results due to board instabilities I lack a cavium ;) Ok for

Re: New option -flimit-function-alignment

2016-10-12 Thread Denys Vlasenko
On 10/11/2016 10:14 PM, Bernd Schmidt wrote: On 10/11/2016 04:23 PM, Denys Vlasenko wrote: This is better than current behavior, but this is not what I want. 15-byte function does not need to be aligned to 16 bytes on a machine with 128-byte L1I cachelines. It needs to be aligned to 128 bytes

Re: [vrp] use get_ptr_nonnull in tree-vrp

2016-10-12 Thread kugan
Hi Richard, On 12/10/16 23:24, Richard Biener wrote: On Wed, Oct 12, 2016 at 8:56 AM, kugan wrote: Hi, This patch uses get_ptr_nonnull in tree-vrp. Bootstrapped and regression tested this with other patched without any new regressions on x86_64-linux-gnu.

Re: Questionable code in gcov-io.c

2016-10-12 Thread Nathan Sidwell
On 10/12/16 11:04, Andreas Schwab wrote: Do we still need to call fstat? I don't think it can ever fail here. Update removing the fstat. Survived a profiled bootstrap, so I'll commit tomorrow, unless there are further comments. Thanks for spotting this! nathan 2016-10-12 Nathan

Go patch committed: copy string code from Go 1.7 runtime

2016-10-12 Thread Ian Lance Taylor
This patch to the Go frontend and libgo copies the string code from the Go 1.7 runtime. This mainly replaces some C code with Go code. This adds compiler support for turning concatenating strings into a call to a runtime function that takes the appropriate number of arguments. This renames some

Re: [PATCH] Implement new hook for max_align_t_align

2016-10-12 Thread John David Anglin
On 2016-10-12 2:01 PM, Florian Weimer wrote: On 10/12/2016 06:14 PM, Jeff Law wrote: If the issue is strictly limited to 32 bit hpux, then do we really care? Can we just deprecate that platform and thus make the issue go away? Are we talking about HP-XX or Linux on PA-RISC? The patch was

C++ PATCH for c++/77742 (-Waligned-new and placement new)

2016-10-12 Thread Jason Merrill
It doesn't make sense to warn about placement new of over-aligned types; most occurrences are likely to be doing this in order to provide properly aligned memory by allocating it first and then using the standard non-allocating placement new. Also, the discussion of -Waligned-new on HPPA led me

Re: [PATCH] Implement new hook for max_align_t_align

2016-10-12 Thread Florian Weimer
On 10/12/2016 06:14 PM, Jeff Law wrote: If the issue is strictly limited to 32 bit hpux, then do we really care? Can we just deprecate that platform and thus make the issue go away? Are we talking about HP-XX or Linux on PA-RISC? Thanks, Florian

Re: libgo patch committed: Fixes for sparc64

2016-10-12 Thread Ian Lance Taylor
On Wed, Oct 12, 2016 at 7:28 AM, Ian Lance Taylor wrote: > This patch to libgo by James Clarke fixes libgo for sparc64. The > getrandom syscall was being ignored because the file was named > "sparc". The clone syscall apparently needs special attention on > SPARC. Bootstrapped

Re: [PATCH] Add a "compact" mode to print_rtx_function

2016-10-12 Thread Bernd Schmidt
On 10/12/2016 07:48 PM, David Malcolm wrote: This patch implements a "compact" mode for print_rtx_function, implementing most of the ideas above. Example of output can be seen here: https://dmalcolm.fedorapeople.org/gcc/2016-10-12/test-switch-compact.rtl which can be contrasted with the

Re: [PATCH] Implement new hook for max_align_t_align

2016-10-12 Thread John David Anglin
On 2016-10-12 12:14 PM, Jeff Law wrote: On 10/12/2016 02:02 AM, Jakub Jelinek wrote: On Wed, Oct 12, 2016 at 09:52:04AM +0200, Florian Weimer wrote: dropping the alignment means that the padding before the lock member vanishes. Consequently, we have just created a silent ABI change in

[PATCH] Add a "compact" mode to print_rtx_function

2016-10-12 Thread David Malcolm
On Fri, 2016-10-07 at 15:58 +0200, Bernd Schmidt wrote: > On 10/07/2016 03:26 PM, David Malcolm wrote: > > > > We could simply print the INSN_UID for CODE_LABELs; something like > > this > > (see the "(code_label 16" below): > > I think that should work. > > > You appear to have trimmed the

Re: PING! [Fortran, Patch, PR72832, v1] [6/7 Regression] [OOP] ALLOCATE with SOURCE fails to allocate requested dimensions

2016-10-12 Thread Steve Kargl
On Wed, Oct 12, 2016 at 11:50:10AM +0200, Andre Vehreschild wrote: > Ping! > > Updated patch with the comments gotten so far. > > Ok for trunk? > Looks good to me. -- Steve

Re: [PATCH][check_GNU_style.sh] More aggressively ignore dg-xxx directives

2016-10-12 Thread Martin Sebor
On 10/12/2016 06:43 AM, Kyrill Tkachov wrote: On 12/10/16 11:18, Kyrill Tkachov wrote: On 12/10/16 10:57, Kyrill Tkachov wrote: On 11/10/16 20:19, Jakub Jelinek wrote: On Tue, Oct 11, 2016 at 01:11:04PM -0600, Martin Sebor wrote: Also, the pattern that starts with "/\+\+\+" looks like

[Fortran, Patch, cosmetics] Fix some indentation and typos in comments.

2016-10-12 Thread Andre Vehreschild
Hi all, I have committed attached patch as obvious as r241071, because it just corrects some indentation issues and a typo in a comment. Bootstrapped and regtested ok on x86_64-linux/f23. Regards, Andre -- Andre Vehreschild * Email: vehre ad gmx dot de Index: gcc/fortran/ChangeLog

Re: [PATCH] Implement new hook for max_align_t_align

2016-10-12 Thread Jeff Law
On 10/12/2016 02:02 AM, Jakub Jelinek wrote: On Wed, Oct 12, 2016 at 09:52:04AM +0200, Florian Weimer wrote: dropping the alignment means that the padding before the lock member vanishes. Consequently, we have just created a silent ABI change in application code, which is a big no-no. Sure,

[PATCH, GCC] Move MEMMODEL_* and enum memmodel from coretypes.h to memmodel.h

2016-10-12 Thread Thomas Preudhomme
Hi, This patch is a follow up of [1] which aims to have all memory model related declarations in memmodel.h. To achieve that, this patch moves memory model related declaration from coretypes.h into memmodel.h. Note that since memmodel.h is now included from libgcc it needs to have a runtime

Re: [PATCH, GCC/testsuite/ARM] Enable mov?i_movw tests on ARM and big endian

2016-10-12 Thread Thomas Preudhomme
On 12/10/16 17:01, Christophe Lyon wrote: On 12 October 2016 at 17:50, Kyrill Tkachov wrote: On 12/10/16 16:29, Thomas Preudhomme wrote: Sorry :-( Here you are. Cheers, Thomas On 12/10/16 16:25, Kyrill Tkachov wrote: On 12/10/16 16:21, Thomas Preudhomme

Re: [PATCH, GCC/testsuite/ARM] Enable mov?i_movw tests on ARM and big endian

2016-10-12 Thread Christophe Lyon
On 12 October 2016 at 17:50, Kyrill Tkachov wrote: > > On 12/10/16 16:29, Thomas Preudhomme wrote: >> >> Sorry :-( >> >> Here you are. >> >> Cheers, >> >> Thomas >> >> On 12/10/16 16:25, Kyrill Tkachov wrote: >>> >>> >>> On 12/10/16 16:21, Thomas Preudhomme wrote:

Ping^4 Re: [Patch AArch64] Add floatdihf2 and floatunsdihf2 patterns

2016-10-12 Thread James Greenhalgh
On Wed, Sep 28, 2016 at 05:17:14PM +0100, James Greenhalgh wrote: > On Wed, Sep 21, 2016 at 10:42:03AM +0100, James Greenhalgh wrote: > > On Tue, Sep 13, 2016 at 10:31:28AM +0100, James Greenhalgh wrote: > > > On Tue, Sep 06, 2016 at 10:19:50AM +0100, James Greenhalgh wrote: > > > > This patch

Re: [RFC] Possible folding opportunities for string built-ins

2016-10-12 Thread Joseph Myers
On Wed, 12 Oct 2016, Martin Liška wrote: > Last question is whether one can aggressively fold strcasecmp in a host > compiler? Or are there any situations where results depends on locale? There are the usual issues with Turkish locales having the uppercase version of 'i' being 'İ' and the

Re: [PATCH] Implement new hook for max_align_t_align

2016-10-12 Thread Joseph Myers
On Wed, 12 Oct 2016, Richard Biener wrote: > I'd say what applies to PA should apply equally well to the pdp11 and > the alpha port ... > > But usually the question is just whether the port has a maintainer > and/or whether it is > a maintainance burden to keep it (say, last user of obsolete

Re: [PATCH, GCC/testsuite/ARM] Enable mov?i_movw tests on ARM and big endian

2016-10-12 Thread Kyrill Tkachov
On 12/10/16 16:29, Thomas Preudhomme wrote: Sorry :-( Here you are. Cheers, Thomas On 12/10/16 16:25, Kyrill Tkachov wrote: On 12/10/16 16:21, Thomas Preudhomme wrote: Hi, As reported by Christophe Lyon, gcc.target/arm/movdi_movw test fails on big endian targets. This is because on big

Re: [PATCH][store merging][RFA] Re-implement merging code

2016-10-12 Thread Kyrill Tkachov
On 10/10/16 12:15, Richard Biener wrote: On Mon, 10 Oct 2016, Richard Biener wrote: On Mon, 10 Oct 2016, Kyrill Tkachov wrote: On 10/10/16 11:22, Richard Biener wrote: On Mon, 10 Oct 2016, Kyrill Tkachov wrote: Hi Richard, As I mentioned, here is the patch applying to the main store

Re: [PATCH 4/6] shrink-wrap: Shrink-wrapping for separate components

2016-10-12 Thread Segher Boessenkool
On Mon, Oct 03, 2016 at 01:48:21PM +, Segher Boessenkool wrote: > This is the main substance of this patch series. I forgot to update the changelog before, what I committed is: * function.c (thread_prologue_and_epilogue_insns): Call try_shrink_wrapping_separate. Compute the

libgo patch committed: copy Go 1.7 runtime semaphore code

2016-10-12 Thread Ian Lance Taylor
This patch to libgo copies the Go 1.7 runtime semaphore code into libgo, basically replacing sema.goc (written in C) with sema.go (writteh in Go). This triggered a check in releaseSudog that g.param not nil, because libgo uses the param field when starting a goroutine. Fixed by clearing g->param

[PATCH] Define std::sample for C++17

2016-10-12 Thread Jonathan Wakely
I forgot that std::sample() was added to C++17, so it wasn't in our status table. It is now. I changed the testcase to use our iterator wrappers instead of containers, which found some bugs. I intend to go through other tests where I've used std::forward_list to get forward iterators, or stream

Re: [PATCH, GCC/testsuite/ARM] Enable mov?i_movw tests on ARM and big endian

2016-10-12 Thread Thomas Preudhomme
Sorry :-( Here you are. Cheers, Thomas On 12/10/16 16:25, Kyrill Tkachov wrote: On 12/10/16 16:21, Thomas Preudhomme wrote: Hi, As reported by Christophe Lyon, gcc.target/arm/movdi_movw test fails on big endian targets. This is because on big endian targets the low bits of a 64bit value

Re: [PATCH, GCC/testsuite/ARM] Enable mov?i_movw tests on ARM and big endian

2016-10-12 Thread Kyrill Tkachov
On 12/10/16 16:21, Thomas Preudhomme wrote: Hi, As reported by Christophe Lyon, gcc.target/arm/movdi_movw test fails on big endian targets. This is because on big endian targets the low bits of a 64bit value would be in the highest numbered register of a pair rather than the lowest numbered

[PATCH, GCC/testsuite/ARM] Enable mov?i_movw tests on ARM and big endian

2016-10-12 Thread Thomas Preudhomme
Hi, As reported by Christophe Lyon, gcc.target/arm/movdi_movw test fails on big endian targets. This is because on big endian targets the low bits of a 64bit value would be in the highest numbered register of a pair rather than the lowest numbered register as on little endian targets. This

Re: Questionable code in gcov-io.c

2016-10-12 Thread Nathan Sidwell
On 10/12/16 11:04, Andreas Schwab wrote: Do we still need to call fstat? I don't think it can ever fail here. You appear to be correct. nathan

Re: Questionable code in gcov-io.c

2016-10-12 Thread Marek Polacek
On Wed, Oct 12, 2016 at 10:47:07AM -0400, Nathan Sidwell wrote: > On 10/12/16 09:43, Marek Polacek wrote: > > > > ITYM lines 197 -> 203. I.e. remove the entire if that;s inside the 'mode > > > == > > > 0' branch and make line 203 unconditional. > > > > Yes, sorry for sloppy wording. I'm

Re: Questionable code in gcov-io.c

2016-10-12 Thread Andreas Schwab
On Okt 12 2016, Nathan Sidwell wrote: > @@ -182,9 +176,7 @@ gcov_open (const char *name, int mode) >return 0; > } > > - if (mode > 0) > -gcov_var.mode = 1; > - else if (mode == 0) > + if (mode == 0) > { >struct stat st; > > @@ -194,21 +186,20

Re: [tree-optimization/71947] Avoid unwanted propagations

2016-10-12 Thread Georg-Johann Lay
On 10.10.2016 23:06, Jeff Law wrote: So if we have an equality conditional between A & B, we record into our const/copy tables A = B and B = A. This helps us discover some of the more obscure equivalences. But it also creates problems with an expression like A ^ B Where we might cprop the

RE: [PATCH 4/4] [MIPS] Add tests for MSA

2016-10-12 Thread Robert Suchanek
Hi, > -Original Message- > From: Matthew Fortune > Sent: 19 September 2016 15:46 > To: Robert Suchanek; catherine_mo...@mentor.com > Cc: gcc-patches@gcc.gnu.org > Subject: RE: [PATCH 4/4] [MIPS] Add tests for MSA > > Hi Robert, > > Sorry for the long delay. Just a couple of cleanup bits

Re: Questionable code in gcov-io.c

2016-10-12 Thread Nathan Sidwell
On 10/12/16 09:43, Marek Polacek wrote: ITYM lines 197 -> 203. I.e. remove the entire if that;s inside the 'mode == 0' branch and make line 203 unconditional. Yes, sorry for sloppy wording. I'm testing a patch. Here's the patch I've tested (but not bootstrapped). As the incoming mode is

Re: [tree-optimization/71947] Avoid unwanted propagations

2016-10-12 Thread Christophe Lyon
Hi Jeff, On 10 October 2016 at 23:06, Jeff Law wrote: > > > So if we have an equality conditional between A & B, we record into our > const/copy tables A = B and B = A. > > This helps us discover some of the more obscure equivalences. But it also > creates problems with an

[PATCH] Fix PR77947

2016-10-12 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2016-10-12 Richard Biener PR debug/77947 * cgraphunit.c (analyze_functions): Preserve cgraph nodes function context. * g++.dg/torture/pr77947.C: New testcase. Index:

libgo patch committed: Fixes for sparc64

2016-10-12 Thread Ian Lance Taylor
This patch to libgo by James Clarke fixes libgo for sparc64. The getrandom syscall was being ignored because the file was named "sparc". The clone syscall apparently needs special attention on SPARC. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index:

Re: PR35503 - warn for restrict pointer

2016-10-12 Thread Jason Merrill
On Sat, Oct 8, 2016 at 1:07 PM, Prathamesh Kulkarni wrote: > On 7 October 2016 at 17:49, David Malcolm wrote: >> On Fri, 2016-10-07 at 10:33 +0530, Prathamesh Kulkarni wrote: >>> On 22 September 2016 at 23:15, Joseph Myers

Re: [PATCH] Implement new hook for max_align_t_align

2016-10-12 Thread John David Anglin
On 2016-10-12 9:48 AM, Jason Merrill wrote: On Wed, Oct 12, 2016 at 4:02 AM, Jakub Jelinek wrote: On Wed, Oct 12, 2016 at 09:52:04AM +0200, Florian Weimer wrote: dropping the alignment means that the padding before the lock member vanishes. Consequently, we have just

Re: [PATCH] Introduce -Wimplicit-fallthrough={0,1,2,3,4,5}

2016-10-12 Thread Jakub Jelinek
On Wed, Oct 12, 2016 at 04:04:25PM +0200, Bernd Schmidt wrote: > On 10/12/2016 01:04 PM, Markus Trippelsdorf wrote: > >I'm more concerned about the first impression that people will get from > >this warning. If the fist couple of samples they will look at are > >clearly bogus (as with the example

Re: Move OVERRIDE/FINAL from gcc/coretypes.h to include/ansidecl.h

2016-10-12 Thread Bernd Schmidt
On 10/12/2016 04:09 PM, Pedro Alves wrote: Thanks. Here's a follow up patch that I was just testing. Need this if building with "g++ -std=gnu++11", with gcc < 4.7. Lovely. That's ok too if the other one goes in. Bernd

Re: Move OVERRIDE/FINAL from gcc/coretypes.h to include/ansidecl.h

2016-10-12 Thread Pedro Alves
On 10/12/2016 03:01 PM, Bernd Schmidt wrote: > On 10/10/2016 09:32 PM, Pedro Alves wrote: >> From: Pedro Alves >> Date: 2016-10-10 19:25:47 +0100 >> >> Move OVERRIDE/FINAL from gcc/coretypes.h to include/ansidecl.h >> >> So that GDB and other projects that share the top level

Re: [PATCH, RFC] Introduce -fsanitize=use-after-scope (v2)

2016-10-12 Thread Martin Liška
On 10/07/2016 01:13 PM, Jakub Jelinek wrote: > Hi! > Hi Jakub. Again thanks for detailed review, you found many improvements. > Ok, first let me list some needed follow-ups that don't need to be handled > right away: > - r237814-like changes for ASAN_MARK Yes, that's missing. I'm wondering

Re: [PATCH,rs6000] Add built-in function support for Power9 string operations

2016-10-12 Thread Segher Boessenkool
On Tue, Oct 11, 2016 at 03:29:54PM -0600, Martin Sebor wrote: > >+signed int vec_cntlz_lsbb (vector signed char); > >+signed int vec_cntlz_lsbb (vector unsigned char) > >+ > >+signed int vec_cnttz_lsbb (vector signed char); > >+signed int vec_cnttz_lsbb (vector unsigned char); > ... > >+The

Re: [PATCH 2/2] [ARC] Fix mul32x16 patterns.

2016-10-12 Thread Andrew Burgess
* Claudiu Zissulescu [2016-06-30 12:24:12 +0200]: > The mululw instructions are wrongly used in the patterns, fix them. > > Okt to apply? > Claudiu > > gcc/ > 2016-06-28 Claudiu Zissulescu > > * config/arc/arc.md (umul_600):

Re: [PATCH] Introduce -Wimplicit-fallthrough={0,1,2,3,4,5}

2016-10-12 Thread Bernd Schmidt
On 10/12/2016 01:04 PM, Markus Trippelsdorf wrote: I'm more concerned about the first impression that people will get from this warning. If the fist couple of samples they will look at are clearly bogus (as with the example comments above) they will very quickly disable the warning. And if a

Re: [PATCH 1/2] [ARC] Update INSN_LENGTH_ALIGNMENT.

2016-10-12 Thread Andrew Burgess
* Claudiu Zissulescu [2016-06-30 12:24:11 +0200]: > Update the INSN_LENGTH_ALIGNMENT macro to handle jump tables placed in > program memory. > > Ok to apply? > Claudiu This looks good to me. Thanks, Andrew > > > gcc/ > 2016-06-20 Claudiu Zissulescu

Re: Move OVERRIDE/FINAL from gcc/coretypes.h to include/ansidecl.h

2016-10-12 Thread Bernd Schmidt
On 10/10/2016 09:32 PM, Pedro Alves wrote: From: Pedro Alves Date: 2016-10-10 19:25:47 +0100 Move OVERRIDE/FINAL from gcc/coretypes.h to include/ansidecl.h So that GDB and other projects that share the top level can use them. Seems reasonable. OK unless someone objects by

Re: [RFC] Speed-up -fprofile-update=atomic

2016-10-12 Thread Martin Liška
On 10/04/2016 11:45 AM, Richard Biener wrote: > On Thu, Sep 15, 2016 at 12:00 PM, Martin Liška wrote: >> On 09/07/2016 02:09 PM, Richard Biener wrote: >>> On Wed, Sep 7, 2016 at 1:37 PM, Martin Liška wrote: On 08/18/2016 06:06 PM, Richard Biener wrote: >

[Ada] Missing predicate check with explicit policy pragma

2016-10-12 Thread Arnaud Charlet
This patch fixes an omission in the generation of predicate checks, when there is a configuration pragma that sets Assertion_Policy to Ignore and a subsequent configuration pragma that enables predicate checking. Executing: gnatmake -q main main must yield raised

[Ada] Premature finalization of controlled array component

2016-10-12 Thread Arnaud Charlet
This patch modifies the processing of transient array components to properly handle the finalization of the temporary controlled function result when the call initializes a component choice list or an "others" choice. -- Source -- -- aggregates.adb with

[Ada] Spurious error on renaming of type conversion with invariant.

2016-10-12 Thread Arnaud Charlet
This patch fixes a spurious error on a renaming of a conversion of the designated object of a pointer to class-wide type when the target type has an invariant aspect. The following must execute quietly: gnatmake -gnata -q main main --- with System.Assertions; use System.Assertions; with

[Ada] Allow Refined_Global/Depends contracts with partial refinement

2016-10-12 Thread Arnaud Charlet
Pragmas/aspects Refined_Global and Refined_Depends may be applied in a scope where only partial refinement of abstract states is visible, as defined in SPARK RM 7.2.4. In such a case, the partial refinement should be used instead of the full refinement for checking the refined contracts. Tested

Re: [PATCH] Implement new hook for max_align_t_align

2016-10-12 Thread Jason Merrill
On Wed, Oct 12, 2016 at 4:02 AM, Jakub Jelinek wrote: > On Wed, Oct 12, 2016 at 09:52:04AM +0200, Florian Weimer wrote: >> dropping the alignment means that the padding before the lock member >> vanishes. Consequently, we have just created a silent ABI change in >> application

[RFC] Possible folding opportunities for string built-ins

2016-10-12 Thread Martin Liška
Hi. As you probably mentioned, simple folding improvement has grown to multiple patches and multiple iterations. Apart from that, I also noticed that we do not do the best for couple of cases and I would like to have a feedback if it worth to improve or not? $ cat

Re: Questionable code in gcov-io.c

2016-10-12 Thread Nathan Sidwell
On 10/12/16 09:43, Marek Polacek wrote: ITYM lines 197 -> 203. I.e. remove the entire if that;s inside the 'mode == 0' branch and make line 203 unconditional. Yes, sorry for sloppy wording. I'm testing a patch. heh, so am I :) nathan

Re: PING [PATCH] accept flexible arrays in struct in unions (c++/71912 - [6/7 regression])

2016-10-12 Thread Jason Merrill
On Tue, Oct 11, 2016 at 9:45 PM, Martin Sebor wrote: > Are there any other changes you want me to make to the patch? > I leave this weekend for the WG14 meeting and would like to > get this change finalized and hopefully committed before then. > >

Re: Questionable code in gcov-io.c

2016-10-12 Thread Marek Polacek
On Wed, Oct 12, 2016 at 08:14:58AM -0400, Nathan Sidwell wrote: > On 10/12/16 08:10, Marek Polacek wrote: > > While implementing a warning I noticed this in gcov-io.c: > > > > 187 else if (mode == 0) > > 188 { > > 189 struct stat st; > > 190 > > 191 if (fstat (fd, ) < 0) >

Re: Fix LTO_STREAMER_DEBUG build

2016-10-12 Thread Thomas Schwinge
Hi! On Thu, 29 Sep 2016 17:29:29 +0200, Richard Biener wrote: > On September 29, 2016 4:54:36 PM GMT+02:00, Thomas Schwinge > wrote: > >While working on something else, I found LTO_STREAMER_DEBUG broken. > >Enabling (#define)

Re: Compile-time improvement for if conversion.

2016-10-12 Thread Yuri Rumyantsev
Richard, Here is updated patch . I avoided creation of new entry/exit blocks but instead add check to border cases - do not consider also blocks which are out of region. Any comments will be appreciated. 2016-10-11 16:48 GMT+03:00 Richard Biener : > On Tue, Oct 11,

[PATCH] Make test helper work with non-copyable types

2016-10-12 Thread Jonathan Wakely
This test utility does: "T t = T();" to guarantee value-init, and then some std::atomic tests have dg-error directives to handle the errors that happen because atomics are non-copyable. In C++17 there is no error, because of guaranteed elision, so the dg-errors FAIL. For C++11 we can us "T t{};"

Re: [PATCH] Fix PR77826

2016-10-12 Thread Richard Biener
On Wed, 12 Oct 2016, Marc Glisse wrote: > On Wed, 12 Oct 2016, Richard Biener wrote: > > > So with doing the same on GENERIC I hit > > > > FAIL: g++.dg/cpp1y/constexpr-array4.C -std=c++14 (test for excess errors) > > > > with the pattern > > > > /* (T)(P + A) - (T)P -> (T) A */ > > (for

Re: Un-break dwarf2out for DWARF2_LINENO_DEBUGGING_INFO configurations (was: [PATCH] Refactor section/label init for early LTO debug)

2016-10-12 Thread Thomas Schwinge
Hi! On Wed, 28 Sep 2016 11:28:16 +0200 (CEST), Richard Biener wrote: > On Wed, 28 Sep 2016, Thomas Schwinge wrote: > > ([...] got committed in r240545.) For DWARF2_LINENO_DEBUGGING_INFO > > configurations (that is, nvptx; Bernd CCed, who originally authored the > >

Re: [PATCH] Test folding of str{n}{case}cmp and memchr (version 3)

2016-10-12 Thread Martin Liška
On 10/12/2016 10:34 AM, Richard Biener wrote: > On Tue, Oct 11, 2016 at 11:38 AM, Martin Liška wrote: >> Third iteration of tests, where I added both GENERIC and GIMPLE folding >> tests. > > They should work already with -O1? Yes, they work. Sending new version where I also

Re: [PATCH] Fold __builtin_memchr (version 3)

2016-10-12 Thread Martin Liška
On 10/12/2016 10:35 AM, Richard Biener wrote: > On Tue, Oct 11, 2016 at 11:38 AM, Martin Liška wrote: >> One question that comes to my mind is whether there's a possibility >> to fully test gimple folding of all cases if some of them are already >> eaten by generic folding? > >

Re: [PATCH] Fold __builtin_str{n}{case}cmp functions (version 3)

2016-10-12 Thread Martin Liška
On 10/12/2016 10:30 AM, Richard Biener wrote: > On Tue, Oct 11, 2016 at 11:33 AM, Martin Liška wrote: >> Changes from the previous version: >> >> 1) Handle BUILT_IN_STRNCMP with length == -1. >> 2) Direct gimple stmts creation and usage gsi_replace_with_seq_vops. >> (hope using of

Re: [PATCH] Check \0-termination of string in c_getstr

2016-10-12 Thread Martin Liška
On 10/11/2016 12:28 PM, Richard Biener wrote: > On Tue, Oct 11, 2016 at 11:27 AM, Martin Liška wrote: >> As mentioned in the email that I reply to, c_getstr should check >> null termination of string constants. >> >> Tests of the whole series have been running. > > Looks ok to me

Re: [BUILDROBOT] Selftest failed for i686-wrs-vxworks

2016-10-12 Thread Thomas Schwinge
Hi! On Wed, 5 Oct 2016 16:36:01 +0200, Bernd Schmidt wrote: > On 10/05/2016 04:14 PM, David Malcolm wrote: > > Thanks. I'm not able to formally approve these changes, but FWIW these > > patches look good to me (assuming usual testing). > > LGTM too, so OK. Without

Re: [PATCH] More trivial bits from early LTO debug merge

2016-10-12 Thread Thomas Schwinge
Hi! On Mon, 19 Sep 2016 09:53:13 +0200 (CEST), Richard Biener wrote: > * debug.h (gcc_debug_hooks): Add filename parameter to early_finish > hook. > [...] With contrib/config-list.mk testing, I noticed another one that needed to be updated;

[Ada] Spurious use visibility with limited with and child packages

2016-10-12 Thread Arnaud Charlet
This patch corrects a minor issue whereby declarations that occur immediately within package P are erroneously treated as potentially use-visible when a parent package has a limited with clause on P, a child package has a with clause on P, and the child package is a client of another unit.

Re: Questionable code in gcov-io.c

2016-10-12 Thread Jakub Jelinek
On Wed, Oct 12, 2016 at 02:23:36PM +0200, Bernd Schmidt wrote: > >It seems that lines 198 and 200 do the same thing, at line 200 we know that > >mode == 0, so we just assign 1. Should we just remove the condition on line > >197? > > The intention seems to be that a negative gcov_var.mode means

Re: [PATCH] Fix PR77826

2016-10-12 Thread Marc Glisse
On Wed, 12 Oct 2016, Richard Biener wrote: So with doing the same on GENERIC I hit FAIL: g++.dg/cpp1y/constexpr-array4.C -std=c++14 (test for excess errors) with the pattern /* (T)(P + A) - (T)P -> (T) A */ (for add (plus pointer_plus) (simplify (minus (convert (add @0 @1))

Re: [PATCH] Implement new hook for max_align_t_align

2016-10-12 Thread Bernd Schmidt
On 10/12/2016 02:43 PM, Richard Biener wrote: I'd say what applies to PA should apply equally well to the pdp11 and the alpha port ... But usually the question is just whether the port has a maintainer and/or whether it is a maintainance burden to keep it (say, last user of obsolete feature X).

Re: [PATCH] Implement new hook for max_align_t_align

2016-10-12 Thread Richard Biener
On Wed, Oct 12, 2016 at 2:33 PM, Bernd Schmidt wrote: > On 10/12/2016 02:12 PM, John David Anglin wrote: >> >> On 2016-10-12, at 4:02 AM, Jakub Jelinek wrote: >> Since this is PA-RISC, which is essentially dead (neither HPE nor Debian ship it anymore), I stand by my

Re: [PATCH][check_GNU_style.sh] More aggressively ignore dg-xxx directives

2016-10-12 Thread Kyrill Tkachov
On 12/10/16 11:18, Kyrill Tkachov wrote: On 12/10/16 10:57, Kyrill Tkachov wrote: On 11/10/16 20:19, Jakub Jelinek wrote: On Tue, Oct 11, 2016 at 01:11:04PM -0600, Martin Sebor wrote: Also, the pattern that starts with "/\+\+\+" looks like it's missing the ^ anchor. Presumably it should

  1   2   >