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. >

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] [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

[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

[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

[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 +++

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 >>

[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

[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

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

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); /*

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 "$" > > >

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 > >

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

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

[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], 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

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

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

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

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

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

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

[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

[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

[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

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,

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

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, 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

[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: > >

[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 =

[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

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

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

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

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 *

Re: [PATCH] Enable Intel AVX512_4FMAPS and AVX512_4VNNIW instructions

2016-11-18 Thread Jakub Jelinek
Hi! On Thu, Nov 17, 2016 at 02:18:57PM -0800, H.J. Lu wrote: > > Hi HJ, could you please commit it? > > Done. I'm seeing lots of ICEs with this. E.g. reduced: typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__)); typedef unsigned char __mmask8; typedef float __v4sf

Re: [fixincludes] Fix macOS 10.12 and (PR sanitizer/78267)

2016-11-18 Thread Bruce Korb
On Fri, Nov 18, 2016 at 9:42 AM, Mike Stump wrote: > On Nov 18, 2016, at 2:45 AM, Rainer Orth > wrote: >> So the current suggestion is to combine my fixincludes patch and Jack's >> patch to disable use if !__BLOCKS__. > >> I guess this is

Re: PING [PATCH] enable -fprintf-return-value by default

2016-11-18 Thread Jeff Law
On 11/18/2016 11:52 AM, Martin Sebor wrote: 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

Re: PING [PATCH] enable -fprintf-return-value by default

2016-11-18 Thread Martin Sebor
On 11/18/2016 10:38 AM, Sandra Loosemore wrote: On 11/18/2016 09:01 AM, Martin Sebor wrote: On 11/17/2016 10:34 PM, Sandra Loosemore wrote: On 11/16/2016 09:49 AM, Martin Sebor wrote: I'm looking for an approval of the attached patch. I've adjusted the documentation based on Sandra's input

Re: [PATCH] avoid calling alloca(0)

2016-11-18 Thread Jeff Law
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, which might be embedded and explicitly

Re: [PATCH] avoid calling alloca(0)

2016-11-18 Thread Jeff Law
On 11/17/2016 05:32 PM, Martin Sebor wrote: I confess I haven't heard of such an implementation before but after some searching I have managed to find a few examples of it online, such as in QNX or in the BlackBerry SDK, or in the GCC shipped by Texas Instruments. For instance: I have the

Re: [PATCH] enable -fprintf-return-value by default

2016-11-18 Thread Jeff Law
On 11/08/2016 08:13 PM, Martin Sebor wrote: The -fprintf-return-value optimization has been disabled since the last time it caused a bootstrap failure on powerpc64le. With the underlying problems fixed GCC has bootstrapped fine on all of powerpc64, powerpc64le and x86_64 and tested with no

Re: [Patch v4 0/17] Add support for _Float16 to AArch64 and ARM

2016-11-18 Thread James Greenhalgh
On Fri, Nov 11, 2016 at 03:37:17PM +, James Greenhalgh wrote: > > Hi, > > This patch set enables the _Float16 type specified in ISO/IEC TS 18661-3 > for AArch64 and ARM. The patch set has been posted over the past two months, > with many of the target-independent changes approved. I'm

libgo patch committed: Move sched variable from C to Go

2016-11-18 Thread Ian Lance Taylor
This patch simply moves the schedt (aka Sched) type and the sched variable from C to Go. This is a step toward further changes. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE

Re: [fixincludes] Fix macOS 10.12 and (PR sanitizer/78267)

2016-11-18 Thread Mike Stump
On Nov 18, 2016, at 2:45 AM, Rainer Orth wrote: > So the current suggestion is to combine my fixincludes patch and Jack's > patch to disable use if !__BLOCKS__. > I guess this is ok for mainline now to restore bootstrap? I think we are down to everyone likes

Re: PING [PATCH] enable -fprintf-return-value by default

2016-11-18 Thread Sandra Loosemore
On 11/18/2016 09:01 AM, Martin Sebor wrote: On 11/17/2016 10:34 PM, Sandra Loosemore wrote: On 11/16/2016 09:49 AM, Martin Sebor wrote: I'm looking for an approval of the attached patch. I've adjusted the documentation based on Sandra's input (i.e., documented the negative of the option

Re: Import libcilkrts Build 4467 (PR target/68945)

2016-11-18 Thread Ilya Verbin
2016-11-17 20:01 GMT+03:00 Jeff Law : > On 11/17/2016 09:56 AM, Ilya Verbin wrote: >> >> 2016-11-17 18:50 GMT+03:00 Rainer Orth : >>> >>> Rainer Orth writes: >>> I happened to notice that my libcilkrts SPARC port

Re: [PATCH, Darwin] Fix PR57438 by avoiding empty function bodies and trailing labels.

2016-11-18 Thread Segher Boessenkool
On Fri, Nov 18, 2016 at 05:19:31PM +, Iain Sandoe wrote: > I’d like to do that; is there a way to force a jump table for a limited set > of cases? > (the example was about the smallest I could get where GCC elected to produce > a jump table instead of branches) --param

Re: [PATCH] avoid calling alloca(0)

2016-11-18 Thread Jakub Jelinek
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 exploits I pointed > to should provide

Re: [PATCH] debug/PR78112: remove recent duplicates for DW_TAG_subprogram attributes

2016-11-18 Thread Pierre-Marie de Rodat
Hi Christophe, On 11/18/2016 03:03 PM, Christophe Lyon wrote: Hi, Part of the new testcase added with this commit fails on arm* targets: g++.dg/pr78112.C scan-assembler-times DW_AT_object_pointer 37 Thank you for the report. As I said on the bugzilla

Re: [fixincludes] Fix macOS 10.12 and (PR sanitizer/78267)

2016-11-18 Thread Bruce Korb
I think restoring bootstrap is likely a good thing. On Fri, Nov 18, 2016 at 2:45 AM, Rainer Orth wrote: > > I guess this is ok for mainline now to restore bootstrap?

Re: [PATCH] DWARF: make signedness explicit for enumerator const values

2016-11-18 Thread Pierre-Marie de Rodat
On 11/14/2016 01:05 PM, Mark Wielaard wrote: You can either choose a signed/unsigned form not giving the consumer a hint about the size of the underlying constant value or one of the sized data forms that don't give a hint about the value representation/signedness. So in both cases the consumer

Re: [PATCH v2][PR libgfortran/78314] Fix ieee_support_halting

2016-11-18 Thread Szabolcs Nagy
On 16/11/16 16:53, Szabolcs Nagy wrote: > ieee_support_halting only checked the availability of status > flags, not trapping support. On some targets the later can > only be checked at runtime: feenableexcept reports if > enabling traps failed. > > So check trapping support by enabling/disabling

Re: [PATCH, Darwin] Fix PR57438 by avoiding empty function bodies and trailing labels.

2016-11-18 Thread Iain Sandoe
Hi Mike, > On 18 Nov 2016, at 17:16, Mike Stump wrote: > > On Nov 18, 2016, at 4:33 AM, Iain Sandoe wrote: >> >> As discussed on IRC, I was under the impression that it is desired to move >> away from #ifdef towards if() and I have been adding

Re: [PATCH, Darwin] Fix PR57438 by avoiding empty function bodies and trailing labels.

2016-11-18 Thread Mike Stump
On Nov 18, 2016, at 4:33 AM, Iain Sandoe wrote: > > As discussed on IRC, I was under the impression that it is desired to move > away from #ifdef towards if() and I have been adding those where locally > things have been touched - in this case it was only partially

Re: [PATCH] avoid calling alloca(0)

2016-11-18 Thread Martin Sebor
On 11/18/2016 09:29 AM, Jakub Jelinek wrote: On Fri, Nov 18, 2016 at 09:21:38AM -0700, Martin Sebor wrote: In the libiberty/alloca.c, I don't see anything special about alloca (0). Yes, alloca (0) reclaims garbage, but so does alloca (1) and alloca (4035). alloca (0) just returns NULL after it.

Patch ping

2016-11-18 Thread Jakub Jelinek
Hi! I'd like to ping 2 patches: http://gcc.gnu.org/ml/gcc-patches/2016-11/msg01074.html - C++ ABI - mangling of TLS aux symbols; either the posted patch or one with if (abi_version_at_least (11)) http://gcc.gnu.org/ml/gcc-patches/2016-11/msg00351.html - DWARF Solaris bootstrap fix

Re: [PATCH] Fix combine's make_extraction (PR rtl-optimization/78378)

2016-11-18 Thread Michael Matz
Hi, On Wed, 16 Nov 2016, Jakub Jelinek wrote: > If inner is a MEM, make_extraction requires that pos is a multiple of > bytes and deals with offsetting it. Or otherwise requires that pos is a > multiple of BITS_PER_WORD and for REG inner it handles that too. But if > inner is something

Re: [PATCH, Fortran, pr78395, v1] [OOP] error on polymorphic assignment

2016-11-18 Thread Thomas Koenig
Hi Andre, Btw, when using the in gcc-7 available polymorphic assign, then v6 is actually auto-allocated and the program runs fine. So what are your opinions on the auto-allocation issue? It is my experience that such questions can speedily and correctly be answered by the regulars on

[PATCH, Fortran, pr78395, v1] [OOP] error on polymorphic assignment

2016-11-18 Thread Andre Vehreschild
Hi all, attached patch fixes the issue which was given by nesting calls to typebound procedures. The expression of the inner typebound procedure call was resolved correctly, but in the case of it's having a class type the ref-list was discarded. Leaving the list of references untouched, resolves

Re: [PATCH PR78114]Refine gfortran.dg/vect/fast-math-mgrid-resid.f

2016-11-18 Thread Bin.Cheng
On Fri, Nov 18, 2016 at 4:52 PM, Michael Matz wrote: > Hi, > > On Thu, 17 Nov 2016, Bin.Cheng wrote: > >> B) Depending on ilp, I think below test strings fail for long time with >> haswell: >> ! { dg-final { scan-tree-dump-times "Executing predictive commoning >> without unrolling"

Re: [PATCH fix PR71767 2/4 : Darwin configury] Arrange for ld64 to be detected as Darwin's linker

2016-11-18 Thread Mike Stump
On Nov 18, 2016, at 3:13 AM, Iain Sandoe wrote: > > Thanks, at least I’m not going completely crazy ;-) I'll just note for completeness that Jeff also couldn't explain a failure of your latest patch. If you run into one, let me know. > OK now for trunk? Ok. > open

[PATCH GCC]Simplify (cond (cmp (convert? x) c1) (op x c2) c3) -> (op (minmax x c1) c2)

2016-11-18 Thread Bin Cheng
Hi, This is a rework of https://gcc.gnu.org/ml/gcc-patches/2016-10/msg02007.html. Though review comments suggested it could be merged with last kind simplification of fold_cond_expr_with_comparison, it's not really applicable. As a matter of fact, the suggestion stands for patch

[PATCH GCC]Move simplification of (A == C1) ? A : C2 to match.pd

2016-11-18 Thread Bin Cheng
Hi, This is a follow up patch for https://gcc.gnu.org/ml/gcc-patches/2016-11/msg01898.html It moves remaining simplification for (A == C1) ? A : C2 in fold_cond_expr_with_comparison to match.pd. Bootstrap and test on x86_64 and AArch64, is it OK? Thanks, bin 2016-11-17 Bin Cheng

Re: [PATCH PR78114]Refine gfortran.dg/vect/fast-math-mgrid-resid.f

2016-11-18 Thread Michael Matz
Hi, On Thu, 17 Nov 2016, Bin.Cheng wrote: > B) Depending on ilp, I think below test strings fail for long time with > haswell: > ! { dg-final { scan-tree-dump-times "Executing predictive commoning > without unrolling" 1 "pcom" { target lp64 } } } > ! { dg-final { scan-tree-dump-times "Executing

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

2016-11-18 Thread Martin Sebor
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 caret within the warnings I think we should keep it if it's possible.

Re: [PATCH] avoid calling alloca(0)

2016-11-18 Thread Eric Gallager
On 11/18/16, Jakub Jelinek wrote: > On Fri, Nov 18, 2016 at 09:21:38AM -0700, Martin Sebor wrote: >> >In the libiberty/alloca.c, I don't see anything special about alloca >> > (0). >> >Yes, alloca (0) reclaims garbage, but so does alloca (1) and alloca >> > (4035). >> >alloca

Re: [PATCH, GCC/ARM, ping] Optional -mthumb for Thumb only targets

2016-11-18 Thread Thomas Preudhomme
On 11/11/16 14:35, Kyrill Tkachov wrote: On 08/11/16 13:36, Thomas Preudhomme wrote: Ping? Best regards, Thomas On 25/10/16 18:07, Thomas Preudhomme wrote: Hi, Currently when a user compiles for a thumb-only target (such as Cortex-M processors) without specifying the -mthumb option GCC

Re: [PATCH] Fix PR78413

2016-11-18 Thread Bill Schmidt
> On Nov 18, 2016, at 10:33 AM, Markus Trippelsdorf > wrote: > > On 2016.11.18 at 10:27 -0600, Bill Schmidt wrote: >> === >> --- gcc/testsuite/gcc.dg/tree-ssa/pr78413.c (revision 0) >> +++

[COMMITTED] Add myself to MAINTAINERS (Write After Approval).

2016-11-18 Thread Toma Tabacu
Committed as r242595. Thanks, Toma Tabacu Index: ChangeLog === --- ChangeLog (revision 242594) +++ ChangeLog (working copy) @@ -1,3 +1,7 @@ +2016-11-18 Toma Tabacu + + * MAINTAINERS (Write After

Re: [PATCH] Fix PR78413

2016-11-18 Thread Markus Trippelsdorf
On 2016.11.18 at 10:27 -0600, Bill Schmidt wrote: > === > --- gcc/testsuite/gcc.dg/tree-ssa/pr78413.c (revision 0) > +++ gcc/testsuite/gcc.dg/tree-ssa/pr78413.c (working copy) > @@ -0,0 +1,35 @@ > +/* PR78413. These previously

Re: [PATCH] avoid calling alloca(0)

2016-11-18 Thread Jakub Jelinek
On Fri, Nov 18, 2016 at 09:21:38AM -0700, Martin Sebor wrote: > >In the libiberty/alloca.c, I don't see anything special about alloca (0). > >Yes, alloca (0) reclaims garbage, but so does alloca (1) and alloca (4035). > >alloca (0) just returns NULL after it. The diffutils link is the same >

[PATCH] Fix PR78413

2016-11-18 Thread Bill Schmidt
Hi, The if-conversion patch for PR77848 missed a case where an outer loop should not be versioned for vectorization; this was caught by an assert in tests recorded in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78413. This patch fixes the problem by ensuring that both inner and outer loop

Re: [PATCH] avoid calling alloca(0)

2016-11-18 Thread Martin Sebor
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, which might be embedded and explicitly

libgo patch committed: Don't call __go_alloc/__go_free from environment routines

2016-11-18 Thread Ian Lance Taylor
This patch to libgo changes the environment support routines to not call __go_alloc/__go_free, but to instead use malloc/free. This code just needs temporary buffers, it is natural to write it in C because it calls setenv/unsetenv, and C code can safely call malloc/free but with the future GC can

Re: PING [PATCH] enable -fprintf-return-value by default

2016-11-18 Thread Martin Sebor
On 11/17/2016 10:34 PM, Sandra Loosemore wrote: On 11/16/2016 09:49 AM, Martin Sebor wrote: I'm looking for an approval of the attached patch. I've adjusted the documentation based on Sandra's input (i.e., documented the negative of the option rather than the positive; thank you for the

Re: Fix PR77881: combine improvement

2016-11-18 Thread Michael Matz
Hi, On Fri, 18 Nov 2016, Bin.Cheng wrote: > On Wed, Nov 16, 2016 at 3:05 PM, Andreas Schwab wrote: > > On Nov 14 2016, Michael Matz wrote: > > > >> PR missed-optimization/77881 > >> * combine.c (simplify_comparison): Remove useless subregs > >>

Re: [PATCH, vec-tails] Support loop epilogue vectorization

2016-11-18 Thread Christophe Lyon
On 18 November 2016 at 16:46, Yuri Rumyantsev wrote: > It is very strange that this test failed on arm, since it requires > target avx2 to check vectorizer dumps: > > /* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" { > target avx2_runtime } } } */ > /* {

Re: [PATCH, ARM] Enable ldrd/strd peephole rules unconditionally

2016-11-18 Thread Bernd Edlinger
On 11/18/16 12:58, Christophe Lyon wrote: > On 17 November 2016 at 10:23, Kyrill Tkachov > wrote: >> >> On 09/11/16 12:58, Bernd Edlinger wrote: >>> >>> Hi! >>> >>> >>> This patch enables the ldrd/strd peephole rules unconditionally. >>> >>> It is meant to fix cases,

Re: [PATCH, vec-tails] Support loop epilogue vectorization

2016-11-18 Thread Yuri Rumyantsev
It is very strange that this test failed on arm, since it requires target avx2 to check vectorizer dumps: /* { dg-final { scan-tree-dump-times "LOOP VECTORIZED" 2 "vect" { target avx2_runtime } } } */ /* { dg-final { scan-tree-dump-times "LOOP EPILOGUE VECTORIZED \\(VS=16\\)" 2 "vect" { target

Re: Fix PR77881: combine improvement

2016-11-18 Thread Bin.Cheng
On Wed, Nov 16, 2016 at 3:05 PM, Andreas Schwab wrote: > On Nov 14 2016, Michael Matz wrote: > >> PR missed-optimization/77881 >> * combine.c (simplify_comparison): Remove useless subregs >> also inside the loop, not just after it. >>

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

2016-11-18 Thread David Malcolm
gcc.dg/tree-ssa/builtin-sprintf-2.c is showing intermittent failures, which valgrind shows to be a read past the end of a buffer. The root cause is that the on-demand substring loc code isn't set up to cope with -ftrack-macro-expansion != 2 (the default). In the failing case, it attempts to use

Re: [PATCH 1/2] PR77822

2016-11-18 Thread Dominik Vogt
On Fri, Nov 18, 2016 at 08:02:08AM -0600, Segher Boessenkool wrote: > On Fri, Nov 18, 2016 at 01:09:24PM +0100, Dominik Vogt wrote: > > IN_RANGE(POS...) makes sure that POS is a non-negative number > > smaller than UPPER, so (UPPER) - (POS) does not wrap. Or is there > > some case that the new

libgo patch committed: Remove long-obsolete "old" directories

2016-11-18 Thread Ian Lance Taylor
The directories old/regexp and old/template were removed from the master Go library in 2012 (https://golang.org/cl/5979046) but somehow that was not reflected in libgo. This patch removes them from libgo. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian

Re: [PATCH] S390: Lower requirements for successful htm tests.

2016-11-18 Thread Andreas Krebbel
On Fri, Nov 18, 2016 at 02:48:30PM +0100, Dominik Vogt wrote: > gcc/testsuite/ChangeLog > > * gcc.target/s390/htm-builtins-1.c (DEFAULT_MAX_REPETITIONS) > (DEFAULT_REQUIRED_QUORUM, NUM_WARMUP_RUNS): Lower requirements for > successful test. > *

Re: [PATCH v3] PR77359: Properly align local variables in functions calling alloca.

2016-11-18 Thread Andreas Krebbel
On Fri, Nov 11, 2016 at 10:33:16AM +0100, Dominik Vogt wrote: > gcc/ChangeLog > > * config/rs6000/rs6000.c (rs6000_stack_info): PR/77359: Properly align > local variables in functions calling alloca. Also update the ASCII > drawings > * config/rs6000/rs6000.h

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

2016-11-18 Thread Dominique d'Humières
Hi Janus, > 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 eighth tests,

Re: [PATCH] debug/PR78112: remove recent duplicates for DW_TAG_subprogram attributes

2016-11-18 Thread Christophe Lyon
On 10 November 2016 at 12:06, Pierre-Marie de Rodat wrote: > On 11/09/2016 10:02 AM, Richard Biener wrote: >> >> Using scan-assembler-times on the dwarf? > > > I always have a bad feeling about this kind of check as I imagine it can > break very easily with legit changes. But

Re: [PATCH 1/2] PR77822

2016-11-18 Thread Segher Boessenkool
On Fri, Nov 18, 2016 at 01:09:24PM +0100, Dominik Vogt wrote: > How about this: > > -- > /* A convenience macro to determine whether a SIZE lies inclusively >within [1, UPPER], POS lies inclusively within between >[0, UPPER - 1] and the sum lies inclusively within [1, UPPER]. >UPPER

Re: [v3 PATCH] LWG 2766, LWG 2749

2016-11-18 Thread Ville Voutilainen
On 18 November 2016 at 15:54, Jonathan Wakely wrote: > I agree, but if we'd just refused to support such undefined behaviour > in stage 1 we wouldn't now be in a position of saying we can't change > it in stage 3. I want to support the code that the previous attempt breaks. I

Re: [v3 PATCH] LWG 2766, LWG 2749

2016-11-18 Thread Jonathan Wakely
On 17/11/16 23:38 +0200, Ville Voutilainen wrote: The first patch does everything but the container adaptor parts (which are wrong in the p/r) and the tuple part (which is icky). The second part does the tuple parts, and needs some serious RFC. I know it's ugly as sin, but it works. I don't

Re: Rework subreg_get_info

2016-11-18 Thread Richard Sandiford
Joseph Myers writes: > On Tue, 15 Nov 2016, Richard Sandiford wrote: >> Richard Sandiford writes: >> > This isn't intended to change the behaviour, just rewrite the >> > existing logic in a different (and hopefully clearer) way. >> > The new

[PATCH] S390: Lower requirements for successful htm tests.

2016-11-18 Thread Dominik Vogt
The attached patch makes the htm tests on s390 less sensitive to spurious abort. Please check the commit comment for details. The modified tests have been run once on a zEC12. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany gcc/testsuite/ChangeLog *

[patch,avr] Disallow LDS / STS for .rodata on AVR_TINY.

2016-11-18 Thread Georg-Johann Lay
Currently, Binutils still comes with an AVR_TINY linker description file which puts .rodata into RAM so that LDS is applicable for reading such objects. However, as these devices come with a linearised address model, linker descriptions which put .rodata into flash are much more reasonable.

Re: [PATCH, vec-tails] Support loop epilogue vectorization

2016-11-18 Thread Christophe Lyon
On 15 November 2016 at 15:41, Yuri Rumyantsev wrote: > Hi All, > > Here is patch for non-masked epilogue vectoriziation. > > Bootstrap and regression testing did not show any new failures. > > Is it OK for trunk? > > Thanks. > Changelog: > > 2016-11-15 Yuri Rumyantsev

Re: [PATCH] Fix PR78189

2016-11-18 Thread Christophe Lyon
On 11 November 2016 at 09:56, Richard Biener wrote: > On Thu, 10 Nov 2016, Christophe Lyon wrote: > >> On 10 November 2016 at 09:34, Richard Biener wrote: >> > On Wed, 9 Nov 2016, Christophe Lyon wrote: >> > >> >> On 9 November 2016 at 09:36, Bin.Cheng

Re: Fix PR78154

2016-11-18 Thread Prathamesh Kulkarni
On 17 November 2016 at 15:24, Richard Biener wrote: > On Thu, 17 Nov 2016, Prathamesh Kulkarni wrote: > >> On 17 November 2016 at 14:21, Richard Biener wrote: >> > On Thu, 17 Nov 2016, Prathamesh Kulkarni wrote: >> > >> >> Hi Richard, >> >> Following your

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

2016-11-18 Thread Janus Weil
Hi all, the attached patch fixes an ice-on-valid problem, simply by removing an assert. The generated code works as expected and the patch regtests cleanly on x86_64-linux-gnu. Ok for trunk? Cheers, Janus 2016-11-18 Janus Weil PR fortran/78392 * trans-array.c

  1   2   >