C++ PATCH for c++/67631, list-init and explicit

2016-11-18 Thread Jason Merrill
Just need to pass the flags down. Tested x86_64-pc-linux-gnu, applying to trunk. commit 6aee56eb70ff04c9c1fbcbef388144d4a0338154 Author: Jason Merrill Date: Fri Nov 18 10:04:49 2016 -0500 PR c++/67631 - list-init and explicit conversions * semantics.c (finish_compo

documenting command-line options (was Re: PING [PATCH] enable -fprintf-return-value by default)

2016-11-18 Thread Sandra Loosemore
On 11/18/2016 11:52 AM, Martin Sebor wrote: [snip] I think it would be be ideal if all the options were sorted the same way in all sections. Is there some command to have texinfo sort them for us? If not, can we write a script to sort them, either each time just before generating the docs or m

Re: [PATCH] avoid calling alloca(0)

2016-11-18 Thread Martin Sebor
On 11/18/2016 11:46 AM, Jeff Law wrote: On 11/18/2016 12:58 AM, Jakub Jelinek wrote: On Thu, Nov 17, 2016 at 05:32:31PM -0700, Martin Sebor wrote: The point is warning on an alloca (0) may not be as clear cut as it might seem. It's probably a reasonable thing to do on the host, but on a target

Re: [PATCH] Enable Intel AVX512_4FMAPS and AVX512_4VNNIW instructions

2016-11-18 Thread Jakub Jelinek
On Fri, Nov 18, 2016 at 08:41:01PM +0100, Jakub Jelinek wrote: > I'm seeing lots of ICEs with this. Here is untested fix for that, will bootstrap/regtest it soon (after my current set of bootstraps finishes). 2016-11-18 Jakub Jelinek * config/i386/i386.c (ix86_expand_builtin): Remove

[PATCH], Tweak PowerPC movdi constraints

2016-11-18 Thread Michael Meissner
This patch tweaks the movdi constraints for the PowerPC to use "^" or "$" constraints instead of "?*". This allows the register allocator to more often allocate DImode to a floating point/vector register when it is desirable to do so. I did a full Spec 2006 run with this patch installed, and most

[PATCH] Introduce emit_status::ensure_regno_capacity (v5)

2016-11-18 Thread David Malcolm
On Wed, 2016-10-05 at 17:55 +0200, Bernd Schmidt wrote: > On 10/05/2016 06:15 PM, David Malcolm wrote: > > - /* Make sure regno_pointer_align, and regno_reg_rtx are large > > - enough to have an element for this pseudo reg number. */ > > + int cur_size = crtl->emit.regno_pointer_align_length

[PATCH] Add "__RTL" to cc1 (v5)

2016-11-18 Thread David Malcolm
On Wed, 2016-11-16 at 14:24 +0100, Richard Biener wrote: > On Tue, Nov 15, 2016 at 10:07 PM, David Malcolm > wrote: > > On Mon, 2016-11-14 at 16:14 +0100, Richard Biener wrote: > > > On Fri, Nov 11, 2016 at 10:15 PM, David Malcolm < > > > dmalc...@redhat.com> > > > wrote: > > > > Changed in this v

Re: [Patch, Fortran] PR 78392: ICE in gfc_trans_auto_array_allocation, at fortran/trans-array.c:5979

2016-11-18 Thread Janus Weil
Hi Dominique, >> the attached patch fixes an ice-on-valid problem, simply by removing an >> assert. ... > > I have several instances in my test suite showing that the proposed patch > removes the ICE but generates wrong code: > > pr42359, second test, => ICE on another place > pr54613, sixth and

Re: [C++ PATCH, ABI] Fix mangling of TLS init and wrapper fns (PR c++/77285)

2016-11-18 Thread Jason Merrill
On Fri, Nov 11, 2016 at 7:23 AM, Jakub Jelinek wrote: > Not really sure if we want to call just check_abi_tags (based on the idea > that likely any uses of the TLS var from other TUs will be broken), I think that's fine. OK. Jason

Re: [PATCH] Fix dwarf2out related bootstrap failure on Solaris (PR debug/78191)

2016-11-18 Thread Jason Merrill
OK. On Thu, Nov 3, 2016 at 12:42 PM, Jakub Jelinek wrote: > Hi! > > My recent optimize_abbrev_table optimization apparently broke Solaris > bootstrap. > The bug is specific I think just to -gdwarf-{2,3} -gno-strict-dwarf, where > DW_FORM_exprloc can't be used for location expressions and some loc

Re: [PATCH, C++] Warn on redefinition of builtin functions (PR c++/71973)

2016-11-18 Thread Jason Merrill
On 11/05/2016 12:44 PM, Bernd Edlinger wrote: + warning_at (DECL_SOURCE_LOCATION (newdecl), 0, + "declaration of %q+#D conflicts with built-in " + "declaration %q#D", newdecl, olddecl); There needs to be a way to disable this warning,

[PATCH] Fix target_clones attribute handling (PR middle-end/78419)

2016-11-18 Thread Jakub Jelinek
Hi! The following testcase ICEs because of buffer overflow in the expand_target_clones function. The main bug is that get_attr_str doesn't count the commas in the strings, so while it handles __attribute__((target_clones ("avx", "foo", "avx2", "avx512f", "default"))) it doesn't handle __attribute

[PATCH] Fix divmod expansion (PR middle-end/78416)

2016-11-18 Thread Jakub Jelinek
Hi! As the testcase shows, expand_divmod doesn't handle properly division/remainder in modes larger than HOST_BITS_PER_WIDE_INT like TImode - if op1 is "negative" CONST_INT, it means it has 65 most significant bits set, but EXACT_POWER_OF_2_OR_ZERO_P will happily return true on that and optimize t

[PR target/25512] Optimize certain equality tests on m68k

2016-11-18 Thread Jeff Law
The yearly m68k day or two of bugfixing for the retro-computing folks is under way. It's earlier than last year, so I can do more than just fix regressions. This BZ is a simple request to optimize sequences like: moveq #1,%d1 cmp.l %d0, %d1 beq/bne into subq.l #1, %d0 beq/bne When d0/d1 ar

Re: [PATCH] avoid calling alloca(0)

2016-11-18 Thread Martin Sebor
On 11/18/2016 10:25 AM, Jakub Jelinek wrote: On Fri, Nov 18, 2016 at 10:14:09AM -0700, Martin Sebor wrote: Because people make mistakes and warnings help us avoid them (isn't that obvious?) Just because we get it right most of the time doesn't mean we get right all of the time. The papers and

Re: [PATCH] Fix target_clones attribute handling (PR middle-end/78419)

2016-11-18 Thread Richard Biener
On November 18, 2016 10:41:06 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >The following testcase ICEs because of buffer overflow in the >expand_target_clones function. The main bug is that get_attr_str >doesn't count the commas in the strings, so while it handles >__attribute__((target_clones ("a

Re: [PATCH] Fix divmod expansion (PR middle-end/78416)

2016-11-18 Thread Richard Biener
On November 18, 2016 10:45:10 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >As the testcase shows, expand_divmod doesn't handle properly >division/remainder in modes larger than HOST_BITS_PER_WIDE_INT like >TImode - if op1 is "negative" CONST_INT, it means it has 65 most >significant >bits set, but

Re: [PATCH] Add "__RTL" to cc1 (v5)

2016-11-18 Thread Joseph Myers
On Fri, 18 Nov 2016, David Malcolm wrote: > + /* Consume all tokens, up to the closing brace, handling > + matching pairs of braces in the rtl dump. */ > + int num_open_braces = 1; > + while (1) > +{ > + switch (c_parser_peek_token (parser)->type) > + { > + case CPP_OPEN_B

Re: [PATCH, C++] Warn on redefinition of builtin functions (PR c++/71973)

2016-11-18 Thread Bernd Edlinger
On 11/18/16 22:19, Jason Merrill wrote: > On 11/05/2016 12:44 PM, Bernd Edlinger wrote: >> + warning_at (DECL_SOURCE_LOCATION (newdecl), 0, >> + "declaration of %q+#D conflicts with built-in " >> + "declaration %q#D", newdecl, olddecl); > > There needs to be a way

Re: [PATCH] substring_loc info needs default track-macro-expansion (PR preprocessor/78324)

2016-11-18 Thread David Malcolm
On Fri, 2016-11-18 at 09:51 -0700, Martin Sebor wrote: > > Martin: are the changes to your test cases OK by you, or is there > > a better way to rewrite them? > > Thanks for looking into it! > > Since the purpose of the test_sprintf_note function in the test is > to verify the location of the car

Re: [PATCH], Tweak PowerPC movdi constraints

2016-11-18 Thread Segher Boessenkool
On Fri, Nov 18, 2016 at 03:38:38PM -0500, Michael Meissner wrote: > This patch tweaks the movdi constraints for the PowerPC to use "^" or "$" > constraints instead of "?*". This allows the register allocator to more often > allocate DImode to a floating point/vector register when it is desirable t

[PATCH] Handle EOF in c_parser_parse_rtl_body

2016-11-18 Thread David Malcolm
On Fri, 2016-11-18 at 22:13 +, Joseph Myers wrote: > On Fri, 18 Nov 2016, David Malcolm wrote: > > > + /* Consume all tokens, up to the closing brace, handling > > + matching pairs of braces in the rtl dump. */ > > + int num_open_braces = 1; > > + while (1) > > +{ > > + switch

Re: [PATCH] substring_loc info needs default track-macro-expansion (PR preprocessor/78324)

2016-11-18 Thread Martin Sebor
On 11/18/2016 03:57 PM, David Malcolm wrote: On Fri, 2016-11-18 at 09:51 -0700, Martin Sebor wrote: Martin: are the changes to your test cases OK by you, or is there a better way to rewrite them? Thanks for looking into it! Since the purpose of the test_sprintf_note function in the test is to

Re: [PATCH] avoid calling alloca(0)

2016-11-18 Thread Bernd Edlinger
> of the builtin (the function is not declared without attribute > alloc_size, at least in Glibc, but GCC still expands it inline). > This is as simple as enclosing alloca in parentheses: > > void *p = (alloca)(n); > > Ugly? Perhaps. One might say that code that does tricky or No. I dou

Re: [PATCH], Tweak PowerPC movdi constraints

2016-11-18 Thread Michael Meissner
On Fri, Nov 18, 2016 at 04:43:40PM -0600, Segher Boessenkool wrote: > On Fri, Nov 18, 2016 at 03:38:38PM -0500, Michael Meissner wrote: > > This patch tweaks the movdi constraints for the PowerPC to use "^" or "$" > > constraints instead of "?*". This allows the register allocator to more > > oft

Re: [PATCH], Tweak PowerPC movdi constraints

2016-11-18 Thread Segher Boessenkool
On Fri, Nov 18, 2016 at 05:52:12PM -0500, Michael Meissner wrote: > On Fri, Nov 18, 2016 at 04:43:40PM -0600, Segher Boessenkool wrote: > > On Fri, Nov 18, 2016 at 03:38:38PM -0500, Michael Meissner wrote: > > > This patch tweaks the movdi constraints for the PowerPC to use "^" or "$" > > > constra

Re: [PATCH] libiberty: Fix -Wimplicit-fallthrough warnings.

2016-11-18 Thread Allan Sandfeld Jensen
On Wednesday 02 November 2016, Mark Wielaard wrote: > -case 11: c+=((hashval_t)k[10]<<24); > -case 10: c+=((hashval_t)k[9]<<16); > -case 9 : c+=((hashval_t)k[8]<<8); > +case 11: c+=((hashval_t)k[10]<<24); /* fall through */ > +case 10: c+=((hashval_t)k[9]<<16); /* f

Re: [PATCH] avoid calling alloca(0)

2016-11-18 Thread Martin Sebor
On 11/18/2016 03:51 PM, Bernd Edlinger wrote: > of the builtin (the function is not declared without attribute > alloc_size, at least in Glibc, but GCC still expands it inline). > This is as simple as enclosing alloca in parentheses: > > void *p = (alloca)(n); > > Ugly? Perhaps. One mi

[committed] Fix g++.dg/cpp1y/pr68180.C on i686-linux

2016-11-18 Thread Jakub Jelinek
Hi! I've noticed in i686-linux bootstrap: FAIL: g++.dg/cpp1y/pr68180.C -std=c++14 (test for excess errors) This is due to using of vector argument in a function, without corresponding vector ISA enabled (SSE). Fixed thusly, committed to trunk as obvious. 2016-11-18 Jakub Jelinek PR

[gomp4] remove use of CUDA unified memory in libgomp

2016-11-18 Thread Cesar Philippidis
This patch eliminates the use of CUDA unified shared memory via cuMemcpy inside nvptx_exec. The major problem with unified memory is that the CUDA driver needs to copy all of the host addresses to a special data region prior to transferring the data to and from the accelerator. I'm not sure why the

Re: [PATCH, C++] Warn on redefinition of builtin functions (PR c++/71973)

2016-11-18 Thread Bernd Edlinger
On 11/18/16 23:15, Bernd Edlinger wrote: >>> - TREE_NOTHROW (olddecl) = 0; >>> + TREE_NOTHROW (olddecl) = TREE_NOTHROW (newdecl); >> >> I still think a better fix would be to add a copy of TREE_NOTHROW to the >> else block of the if (types_match), to go with the existing copies of >> TREE

[PATCH, committed] TILE-Gx: fix clzsi2 for big-endian

2016-11-18 Thread Walter Lee
This patch fixes the clzsi2 pattern, which was broken for big-endian. Bootstrapped and tested on tilegx hardware, also backported to GCC 6. 2016-11-18 Walter Lee * config/tilegx/tilegx.md (clzsi2): Fix for big-endian. --- a/gcc/config/tilegx/tilegx.md +++ b/gcc/config/tilegx/tilegx.m

[PATCH, committed] TILE-Gx: fix barrier bundling

2016-11-18 Thread Walter Lee
This patch fixes a bundling bug. When there are consecutive barriers, the end-of-bundle marker of the last barrier is getting dropped. Bootstrapped and tested on tilegx hardware, also backported to GCC 6. 2016-11-18 Walter Lee * config/tilegx/tilegx.c (tilegx_gen_bundles): Preserve

[PATCH, committed] TILEPro: link against libgcc.a when creating shared libraries

2016-11-18 Thread Walter Lee
This patch forces gcc to link against libgcc.a when creating shared libraries, needed for 64-bit multiplies. Bootstrapped and tested on tilepro hardware, also backported to GCC 6. 2016-11-18 Walter Lee * config.host (tilepro*-*-linux*): Add t-slibgcc-libgcc. diff --git a/libgcc/confi

Re: [PATCH] [AArch64] Fix PR78382

2016-11-18 Thread kugan
Hi Naveen, On 18/11/16 16:30, Hurugalawadi, Naveen wrote: @@ -1374,10 +1374,17 @@ aarch64_load_symref_appropriately (rtx dest, rtx imm, case SYMBOL_SMALL_TLSGD: { rtx_insn *insns; - rtx result = gen_rtx_REG (Pmode, R0_REGNUM); + rtx result; + if (TARGET_ILP3

Re: [PATCH] avoid calling alloca(0)

2016-11-18 Thread Bernd Edlinger
On 11/19/16 00:52, Martin Sebor wrote: > On 11/18/2016 03:51 PM, Bernd Edlinger wrote: >> > of the builtin (the function is not declared without attribute >> > alloc_size, at least in Glibc, but GCC still expands it inline). >> > This is as simple as enclosing alloca in parentheses: >> > >> >

Re: [PATCH] avoid calling alloca(0)

2016-11-18 Thread Bernd Edlinger
On 11/19/16 00:52, Martin Sebor wrote: > If you or others are concerned about the rate of false positives > of this warning please point me at a code base that might be a good > test bed to to try it on. Besides GCC I've built Binutils and the > Linux kernel with just the 5 instances in GCC. > yo

<    1   2