[patch] Fix exception-safety issue in std::forward_list

2015-06-17 Thread Jonathan Wakely
There's a potential memory leak in the allocator-extended move constructor of forward_list, if the allocator parameter is not equal to the rvalue list's allocator then new list nodes must be allocated, but if doing so throws then the already-allocated nodes are not freed. Rather than adding a

Re: [C++17] Implement N3928 - Extending static_assert

2015-06-17 Thread Jason Merrill
On 06/17/2015 01:53 PM, Ed Smith-Rowland wrote: I tried the obvious: an error message with %qE and got 'false'. constexpr values are evaluated early on. Is there a possibility that late folding could help or is that completely different? Late folding could help, but I think handling it in

Re: [Patch, MIPS] Enable fp-contract on MIPS and update -mfused-madd

2015-06-17 Thread Steve Ellcey
On Wed, 2015-06-17 at 19:17 +0100, Maciej W. Rozycki wrote: On Wed, 17 Jun 2015, Steve Ellcey wrote: FAOD I meant to remove the checks globally throughout MIPS target code only. Is there any reason why my patch (minus the HONOR_NAN checks) would have to wait for the other changes?

[PATCH/RFC]: unittesting v2: as a plugin (was Re: [PATCH 00/17] RFC: Addding a unit testing framework to gcc)

2015-06-17 Thread David Malcolm
On Thu, 2015-06-11 at 00:18 +0200, Jakub Jelinek wrote: On Wed, Jun 10, 2015 at 01:16:20PM -0400, David Malcolm wrote: On Wed, 2015-06-10 at 17:34 +0200, Jakub Jelinek wrote: On Wed, Jun 10, 2015 at 11:24:41AM -0400, David Malcolm wrote: I picked the Google Test framework:

Re: [C++17] Implement N3928 - Extending static_assert

2015-06-17 Thread Ed Smith-Rowland
On 06/17/2015 10:23 AM, Jason Merrill wrote: On 06/15/2015 07:14 PM, Ed Smith-Rowland wrote: I wanted to fix it up as per your suggestion. If someone wants it now I can retest and commit. Otherwise give me a bit more time. Someone in LWG was asking about it, and I figured it wouldn't hurt

Re: [patch] fix regrename pass to ensure renamings produce valid insns

2015-06-17 Thread Richard Sandiford
Sandra Loosemore san...@codesourcery.com writes: Index: gcc/regrename.c === --- gcc/regrename.c (revision 224532) +++ gcc/regrename.c (working copy) @@ -942,19 +942,22 @@ regrename_do_replace (struct du_head *he int

[PATCH, i386]: A couple of cleanups in i386.c

2015-06-17 Thread Uros Bizjak
No functional changes. 2015-06-17 Uros Bizjak ubiz...@gmail.com * config/i386/i386.c (ix86_function_arg): Nest TARGET_64BIT code. (ix86_function_arg_advance): Ditto. (ix86_pass_by_reference): Ditto. Rewrite MS_ABI part. Tested on x86_64-linux-gnu {,-m32} and committed to mainline

Re: [Patch, MIPS] Enable fp-contract on MIPS and update -mfused-madd

2015-06-17 Thread Maciej W. Rozycki
On Wed, 17 Jun 2015, Steve Ellcey wrote: Well, I don't mind removing the HONOR_NAN checks from the MIPS code in my patch but I am not sure I can do a patch to remove it from the shared code. I see about 80 HONOR_NAN checks in the shared code and I am not sure which ones can and cannot be

Re: [Patch, MIPS] Enable fp-contract on MIPS and update -mfused-madd

2015-06-17 Thread Richard Sandiford
Maciej W. Rozycki ma...@linux-mips.org writes: On Wed, 17 Jun 2015, Steve Ellcey wrote: Well, I don't mind removing the HONOR_NAN checks from the MIPS code in my patch but I am not sure I can do a patch to remove it from the shared code. I see about 80 HONOR_NAN checks in the shared code and

[gomp4] use static_nonchunk loop scheduling for non-static acc gang loops

2015-06-17 Thread Cesar Philippidis
Tom suggested that it would be more efficient to use static_nochunk for loop scheduling for acc gang loops when the static argument isn't present. We also decided that gang(static:*) should be scheduled using static_nochunk too. A chunk_size of 1 is probably too conservative for gangs running on

Re: [C++ Patch/RFC] PR 65091

2015-06-17 Thread Paolo Carlini
Hi again, I'm finishing testing this different idea, a much bigger patch but arguably more neat: add a bool parameter to cp_parser_id_expression and then to cp_parser_unqualified_id and pass down 'true' from cp_parser_decltype_expr (this is also nicely consistent with the 'true' we are

[patch] libstdc++/55409 C++11 allocator support for std::list

2015-06-17 Thread Jonathan Wakely
I didn't get time to finish this for 5.1, but this adds missing C++11 allocator support to std::list. Tested powerpc64le-linux with old and new ABIs, committed to trunk. commit a2f754fff86496f45b1159f5cdd2420578f96817 Author: Jonathan Wakely jwak...@redhat.com Date: Fri Jun 27 18:36:05 2014

[PATCH, Google] Backport trunk patch r220860 to google/4.9 branch

2015-06-17 Thread Carrot Wei
Hi In aarch64 backend of google/4.9 branch, the split pattern for insn aarch64_lshr_sisd_or_int_mode3 destroys one of the source operands, causes the later usage of the operand get a wrong value (google bug 17907351). The bug has been fixed in trunk by r220860. This patch backports it to

RE: [Patch, MIPS] Enable fp-contract on MIPS and update -mfused-madd

2015-06-17 Thread Matthew Fortune
Steve Ellcey steve.ell...@imgtec.com writes: On Wed, 2015-06-17 at 19:44 +0100, Richard Sandiford wrote: FWIW, to be specific, I think we're talking about every check except the last two in mips.md: and the one mips-ps-3d.md: In particular, the two checks in mips.c should go.

Re: [PATCH, Google] Backport trunk patch r220860 to google/4.9 branch

2015-06-17 Thread Xinliang David Li
ok. David On Wed, Jun 17, 2015 at 3:06 PM, Carrot Wei car...@google.com wrote: Hi In aarch64 backend of google/4.9 branch, the split pattern for insn aarch64_lshr_sisd_or_int_mode3 destroys one of the source operands, causes the later usage of the operand get a wrong value (google bug

Re: [Patch, MIPS] Enable fp-contract on MIPS and update -mfused-madd

2015-06-17 Thread Steve Ellcey
On Wed, 2015-06-17 at 11:41 +0100, Richard Sandiford wrote: Maciej W. Rozycki ma...@linux-mips.org writes: In that case I think the HONOR_NANS checks will best be globally removed first (where applicable of course), with a separate preparatory change. With a comment though :-) I.e. say

C++ PATCH for c++/66515 (ICE with initializer_list)

2015-06-17 Thread Jason Merrill
Now that reshape_init can return a non-CONSTRUCTOR, we need to call it earlier in implicit_conversion. Tested x86_64-pc-linux-gnu, applying to trunk. commit 3732672177a2f4893d79279d44b5caed24d6177b Author: Jason Merrill ja...@redhat.com Date: Wed Jun 17 07:45:03 2015 -0400 PR c++/66515

Re: [Patch, MIPS] Enable fp-contract on MIPS and update -mfused-madd

2015-06-17 Thread Steve Ellcey
On Wed, 2015-06-17 at 19:44 +0100, Richard Sandiford wrote: FWIW, to be specific, I think we're talking about every check except the last two in mips.md: and the one mips-ps-3d.md: In particular, the two checks in mips.c should go. OK, here is a patch that does that. But like I say,

[PATCH, testsuite]: Fix target selector in gcc.target/i386/noplt-[1234].c testcases

2015-06-17 Thread Uros Bizjak
To avoid FAIL: gcc.target/i386/noplt-1.c scan-assembler call[ \\t]*.*foo.*@GOTPCREL(%rip) FAIL: gcc.target/i386/noplt-2.c scan-assembler jmp[ \\t]*.*foo.*@GOTPCREL(%rip) FAIL: gcc.target/i386/noplt-3.c scan-assembler call[ \\t]*.*foo.*@GOTPCREL(%rip) FAIL:

Re: [patch 1/5] Move input.h and is-a.h to coretypes.h

2015-06-17 Thread Richard Biener
On Tue, Jun 16, 2015 at 7:16 PM, Andrew MacLeod amacl...@redhat.com wrote: Pretty much everything in the compiler has a need for both is-a.h and input.h, so this patch moves those into coretypes.h (and rtl.h for generators.. :-P still working on a good way around that) is-a.h is required by

Re: New type-based pool allocator code miscompiled due to aliasing issue?

2015-06-17 Thread Richard Biener
On Wed, Jun 17, 2015 at 1:22 PM, Jakub Jelinek ja...@redhat.com wrote: On Wed, Jun 17, 2015 at 11:13:58AM +0200, Martin Jambor wrote: Do you mean Richard following changes: alloc-pool.h (allocate): ... + /* Placement new contructor. */ + inline void *operator new (size_t,

Re: New type-based pool allocator code miscompiled due to aliasing issue?

2015-06-17 Thread Jakub Jelinek
On Wed, Jun 17, 2015 at 11:13:58AM +0200, Martin Jambor wrote: Do you mean Richard following changes: alloc-pool.h (allocate): ... + /* Placement new contructor. */ + inline void *operator new (size_t, elt_loc_list *ptr) + { +return ptr; + } That should

[patch] Make std::forward_list safe against overloaded operator

2015-06-17 Thread Jonathan Wakely
Similar to yesterday's patch for std::list. Also removes some invalid downcasts of the _Node_base sentinel's address to _Node*. The casts aren't needed anyway, as we only access members of the base class through those pointers. Also removes some redundant upcasts using *static_castBase*(x)

Re: [PATCH] Yet another simple fix to enhance outer-loop vectorization.

2015-06-17 Thread Richard Biener
On Tue, Jun 16, 2015 at 4:12 PM, Yuri Rumyantsev ysrum...@gmail.com wrote: Thanks a lot Richard for your review. I presented updated patch which is not gated by force_vectorize. I added test on outer-loop in vect_enhance_data_refs_alignment and it returns false for it because we can not

Re: [patch 2/5] Remove tree.h compilation dependency for tm.h

2015-06-17 Thread Richard Biener
On Tue, Jun 16, 2015 at 7:17 PM, Andrew MacLeod amacl...@redhat.com wrote: There are 2 macros defined in tree.h the depend on the definition of NO_DOT_IN_LABEL and NO_DOLLAR_IN_LABEL. These are ANON_AGGRNAME_FORMAT and ANON_AGGRNAME_P. This means that in order to get the correct values for

Re: [ARM] Fix PR middle-end/65958

2015-06-17 Thread Ramana Radhakrishnan
I am not very familiar with this feature entirely so please bear with me during review and will find some time to do some experiments with the feature during this week, but a couple of things with respect to the patch immediately spring to mind. +(define_insn probe_stack_range + [(set

Re: [Patch, MIPS] Enable fp-contract on MIPS and update -mfused-madd

2015-06-17 Thread Richard Sandiford
Maciej W. Rozycki ma...@linux-mips.org writes: In that case I think the HONOR_NANS checks will best be globally removed first (where applicable of course), with a separate preparatory change. With a comment though :-) I.e. say that although NEG is the IEEE negate operation, we don't need to

Re: New type-based pool allocator code miscompiled due to aliasing issue?

2015-06-17 Thread Martin Jambor
Hi, On Tue, Jun 16, 2015 at 05:31:57PM +0200, Martin Liska wrote: On 06/16/2015 04:02 PM, Richard Biener wrote: On Tue, Jun 16, 2015 at 3:38 PM, Martin Liška mli...@suse.cz wrote: ... Do you mean Richard following changes: alloc-pool.h (allocate): ... + /* Placement new

Re: [PATCH][ARM] PR/66433: Reduce cost of memory instructions with autoincrement

2015-06-17 Thread Kyrill Tkachov
Hi Yury [cc'ing the ARM maintainers] On 16/06/15 15:04, Yury Usishchev wrote: Hello! Following patch fixes PR target/66433. As described in PR, cost of memory operation with autoincrement is considered to be greater than same operation without autoincrement. This causes auto-inc-dec pass not

Re: New type-based pool allocator code miscompiled due to aliasing issue?

2015-06-17 Thread Richard Biener
On Wed, Jun 17, 2015 at 11:13 AM, Martin Jambor mjam...@suse.cz wrote: Hi, On Tue, Jun 16, 2015 at 05:31:57PM +0200, Martin Liska wrote: On 06/16/2015 04:02 PM, Richard Biener wrote: On Tue, Jun 16, 2015 at 3:38 PM, Martin Liška mli...@suse.cz wrote: ... Do you mean Richard following

Re: [C++/58583] ICE instantiating NSDMIs

2015-06-17 Thread James Greenhalgh
On Tue, Jun 16, 2015 at 05:44:49PM +0100, Nathan Sidwell wrote: On 06/16/15 03:47, Andreas Schwab wrote: Nathan Sidwell nat...@acm.org writes: PR c++/58583 * g++.dg/cpp0x/nsdmi-template14.C: New test. spawn -ignore SIGHUP

[PATCH, testsuite]: Cleanup in gcc.target/i386/* directory

2015-06-17 Thread Uros Bizjak
The patch removes unneeded dg-require-effective-target directives for compile-only testcases, adds missing dg-do compile and dg-do run in a couple of cases. 2015-06-17 Uros Bizjak ubiz...@gmail.com * gcc.target/i386/pr54592.c: Remove dg-require-effective-target. *

Re: GCC 4.9.3 Status Report (2015-06-17) - branch frozen for release

2015-06-17 Thread Martin Liška
On 06/17/2015 10:44 AM, Jakub Jelinek wrote: The GCC 4.9 branch is now frozen for preparing of a release candidate for GCC 4.9.3. All changes to the branch require release manager approval from now on until 4.9.3 is released. I'll announce the GCC 4.9.3 release candidate once it is ready.

[v3 patch] Use std::__is_nothrow_swappable in __alloc_traits::_S_nothrow_swap()

2015-06-17 Thread Jonathan Wakely
This fixes a bug in _S_nothrow_swap(), where I assumed that allocator types are always swappable, but they don't need to be if propagate_on_container_swap is false. Thanks to Ville's new trait it's easy to fix. For the branches we don't have __is_nothrow_swappable, but could dispatch on the

RE: [Patch MIPS] Enable TARGET_IRA_CHANGE_PSEUDO_ALLOCNO_CLASS hook

2015-06-17 Thread Robert Suchanek
Hi, Trim the extra trailing newline. OK to commit if you are happy with the comment. Committed as r224549. Regards, Robert

Re: [gomp4] declare directive [3/5]

2015-06-17 Thread Thomas Schwinge
Hi Jim! I had mentioned that the Fortran front end changes cause regressions in a few libgomp execution tests, if configured for Intel MIC (emulation) offloading. I have now located *where* this is coming from, but would you please work on figuring out *why*? Fortunately, you'll be able to work

Re: [PATCH, testsuite]: Fix PR 65944, FAIL: g++.dg/lto/pr65276: undefined reference to std2::exception::~exception()

2015-06-17 Thread Uros Bizjak
On Tue, Jun 16, 2015 at 5:13 PM, Uros Bizjak ubiz...@gmail.com wrote: Hello! Following patch fixes: cp_lto_pr65276_1.o: In function `std2::runtime_error::~runtime_error()':^M pr65276_1.C:(.text._ZN4std213runtime_errorD2Ev[_ZN4std213runtime_errorD5Ev]+0x8): undefined reference to

Re: [PATCH][ARM][stage-1] Initialise cost to COSTS_N_INSNS (1) and increment in arm rtx costs

2015-06-17 Thread Kyrill Tkachov
Ping^5. https://gcc.gnu.org/ml/gcc-patches/2015-04/msg01130.html Thanks, Kyrill On 02/06/15 09:16, Kyrill Tkachov wrote: Ping^4. Thanks, Kyrill On 21/05/15 18:00, Kyrill Tkachov wrote: Ping^3. Thanks, Kyrill On 12/05/15 10:09, Kyrill Tkachov wrote: Ping^2. Thanks, Kyrill On 30/04/15

Re: [PATCH][OpenMP] Fix resolve_device with -foffload=disable

2015-06-17 Thread Thomas Schwinge
Hi! On Mon, 1 Jun 2015 17:04:03 +0300, Ilya Verbin iver...@gmail.com wrote: Is this change ok for OpenACC/PTX? Well, it doesn't cause any visible regressions in libgomp testing for OpenACC, so OK from that point of view. The code that you're changing is not actually used for OpenACC; I first

GCC 4.9.3 Status Report (2015-06-17) - branch frozen for release

2015-06-17 Thread Jakub Jelinek
The GCC 4.9 branch is now frozen for preparing of a release candidate for GCC 4.9.3. All changes to the branch require release manager approval from now on until 4.9.3 is released. I'll announce the GCC 4.9.3 release candidate once it is ready.

Re: Fix verify_type ICE with -fshort-enum

2015-06-17 Thread Richard Biener
On Wed, Jun 17, 2015 at 12:10 AM, Jan Hubicka hubi...@ucw.cz wrote: PR middle-end/66325 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type variants. Index: c-decl.c === --- c-decl.c (revision

Re: [patch 5/5] Remove function.h dependency on hard-reg-set.

2015-06-17 Thread Richard Biener
On Tue, Jun 16, 2015 at 7:21 PM, Andrew MacLeod amacl...@redhat.com wrote: function.h defines struct rtl_data which is used for generating rtl. In particular, it defines an instance 'crtl' which for generating rtl appears analagous to cfun for gimple and trees. That is the only reason

Re: [patch 1/5] Move input.h and is-a.h to coretypes.h

2015-06-17 Thread Andrew MacLeod
On 06/17/2015 08:28 AM, Richard Biener wrote: On Tue, Jun 16, 2015 at 7:16 PM, Andrew MacLeod amacl...@redhat.com wrote: Pretty much everything in the compiler has a need for both is-a.h and input.h, so this patch moves those into coretypes.h (and rtl.h for generators.. :-P still working on a

Re: [PATCH] Fix PR ipa/65908.

2015-06-17 Thread Martin Liška
On 06/10/2015 01:50 PM, Martin Liška wrote: On 05/15/2015 08:52 PM, Jan Hubicka wrote: +/* Return true if DECL_ARGUMENT types are valid to be merged. */ Perhaps bettter as Perform additional check needed to match types function parameters that are used. Unlike for normal parameters it

Re: [PATCH] [AArch64] PR63870 Improve error messages for NEON single lane memory access intrinsics

2015-06-17 Thread Charles Baylis
Ping? On 11 June 2015 at 00:42, Charles Baylis charles.bay...@linaro.org wrote: [resending, as previous version was rejected from the list for html] On 11 June 2015 at 00:38, Charles Baylis charles.bay...@linaro.org wrote: On 8 June 2015 at 10:44, Alan Lawrence alan.lawre...@arm.com wrote:

Re: [patch 3/5] Remove options.h dependency from tree-core.h

2015-06-17 Thread Richard Biener
On Tue, Jun 16, 2015 at 7:20 PM, Andrew MacLeod amacl...@redhat.com wrote: tree-core.h won't compile without seeing options.h (which is usually brought in by tm.h) because a TARGET_OPTION node contains an instance of struct cl_target_option, defined thru options.h. Its fairly straightforward

[hsa] Support for vector immediates

2015-06-17 Thread Martin Jambor
Hi, the patch below adds support for HSA vector immediates and instructions storing them directly to memory, which was hitherto missing on the branch. Committed as r224554. Thanks, Martin 2015-06-16 Martin Jambor mjam...@suse.cz * hsa-brig.c (hsa_get_imm_brig_type_len): New

Re: [patch 1/5] Move input.h and is-a.h to coretypes.h

2015-06-17 Thread Richard Biener
On Wed, Jun 17, 2015 at 3:06 PM, Andrew MacLeod amacl...@redhat.com wrote: On 06/17/2015 08:28 AM, Richard Biener wrote: On Tue, Jun 16, 2015 at 7:16 PM, Andrew MacLeod amacl...@redhat.com wrote: Pretty much everything in the compiler has a need for both is-a.h and input.h, so this patch

[gomp4] Tests for private variables/state propagation

2015-06-17 Thread Julian Brown
Hi, This is a set of tests for OpenACC private variable/state propagation support in GCC. The associated functionality is a work-in-progress: as such, many of these tests do not pass yet (causing incorrect results, ICEs or even bogus assembly output). I believe the tests to be valid OpenACC,

Re: New type-based pool allocator code miscompiled due to aliasing issue?

2015-06-17 Thread Martin Liška
On 06/17/2015 01:29 PM, Richard Biener wrote: On Wed, Jun 17, 2015 at 1:22 PM, Jakub Jelinek ja...@redhat.com wrote: On Wed, Jun 17, 2015 at 11:13:58AM +0200, Martin Jambor wrote: Do you mean Richard following changes: alloc-pool.h (allocate): ... + /* Placement new contructor. */ +

Re: [C++17] Implement N3928 - Extending static_assert

2015-06-17 Thread Jason Merrill
On 06/15/2015 07:14 PM, Ed Smith-Rowland wrote: I wanted to fix it up as per your suggestion. If someone wants it now I can retest and commit. Otherwise give me a bit more time. Someone in LWG was asking about it, and I figured it wouldn't hurt to have this version in now. Glad to hear

Re: [C++/58583] ICE instantiating NSDMIs

2015-06-17 Thread Nathan Sidwell
On 06/17/15 04:57, James Greenhalgh wrote: I'm seeing the same issues on aarch64-none-elf and aarch64_be-none-elf in one of my testing environments, but, interestingly, not on aarch64-none-linux-gnu or in my other aarch64-none-elf testing environment (!!). ugh. What is the behavior on the

[patch] fix regrename pass to ensure renamings produce valid insns

2015-06-17 Thread Sandra Loosemore
We ran across problems with the regrename pass introducing invalid insns while working on support for new load/store multiple instructions on nios2. We're using an implementation similar to what ARM already does, with a match_parallel predicate testing for restrictions on the underlying

Fix PR66253 (GemsFDTD miscompile)

2015-06-17 Thread Michael Matz
Hi, this implements support for strided grouped stores in the non-SLP case (the SLP case existed already). Before we were ignoring all but the last store in a group. That led to a miscompile of GemsFDTD, the testcase reflects that situation. Also since r224511 yesterday grouped strided

Re: [PATCH] Yet another simple fix to enhance outer-loop vectorization.

2015-06-17 Thread Yuri Rumyantsev
Richard, I attached updated patch. You asked me to explain why I did changes for renaming. If we do not change PHI arguments for inner loop header we can get the following IR: source outer loop: bb 5: outer-loop header # i_45 = PHI 0(4), i_18(9) # .MEM_17 = PHI .MEM_4(D)(4), .MEM_44(9)

Re: [PATCH] [AArch64] PR63870 Improve error messages for NEON single lane memory access intrinsics

2015-06-17 Thread Alan Lawrence
Looks good to me, but I can't approve. Thanks, Alan Charles Baylis wrote: Ping? On 11 June 2015 at 00:42, Charles Baylis charles.bay...@linaro.org wrote: [resending, as previous version was rejected from the list for html] On 11 June 2015 at 00:38, Charles Baylis charles.bay...@linaro.org

[PATCH, committed] jit: Add missing type-checking to gcc_jit_{l|r}value_access_field

2015-06-17 Thread David Malcolm
gcc_jit_rvalue_dereference_field has error-checking to ensure that the field is of the correct struct, but it turned out that gcc_jit_lvalue_access_field and gcc_jit_rvalue_access_field were missing this check, and this just bit a user. Add the missing validation, along with testcases. Takes

Re: [RFC][AARCH64] TARGET_ATOMIC_ASSIGN_EXPAND_FENV hook

2015-06-17 Thread James Greenhalgh
On Thu, May 22, 2014 at 03:24:23PM +0100, Marcus Shawcroft wrote: On 2 May 2014 13:27, Kugan kugan.vivekanandara...@linaro.org wrote: +2014-05-02 Kugan Vivekanandarajah kug...@linaro.org + + * config/aarch64/aarch64.c (TARGET_ATOMIC_ASSIGN_EXPAND_FENV): New + define. +