Re: [PATCH][PR debug/65549] Restore DW_AT_abstract_origin for cross-unit call sites

2015-06-11 Thread Richard Biener
On Thu, 11 Jun 2015, Pierre-Marie de Rodat wrote: On 06/11/2015 11:06 AM, Richard Biener wrote: FYI, I decided to backport the fix causing this regression to the 4.8 branch today, guarded with in_lto_p, thus eliminating the effect on non-LTO links. The adjusted patch looks like the

Re: [PATCH][ARM] Restrict MAX_CONDITIONAL_EXECUTE when -mrestrict-it is in place

2015-06-11 Thread Kyrill Tkachov
Ping. Thanks, Kyrill On 04/06/15 16:59, Kyrill Tkachov wrote: Ping. https://gcc.gnu.org/ml/gcc-patches/2015-05/msg02405.html Thanks, Kyrill On 27/05/15 11:25, Kyrill Tkachov wrote: Ping. Here is the rebased (and retested) patch after Christian's series. Thanks, Kyrill On 18/05/15 11:26,

[PINGv10][PATCH] ASan on unaligned accesses

2015-06-11 Thread Marat Zakirov
On 06/02/2015 04:11 PM, Marat Zakirov wrote: On 05/26/2015 05:03 PM, Marat Zakirov wrote: On 05/20/2015 10:01 AM, Marat Zakirov wrote: On 05/12/2015 02:16 PM, Marat Zakirov wrote: On 04/07/2015 03:22 PM, Jakub Jelinek wrote: How are the automatic misaligned variables different from say

Re: [PATCH, AArch64] [4.9] Backport

2015-06-11 Thread Marcus Shawcroft
On 10 June 2015 at 11:06, weixiangyu weixian...@huawei.com wrote: Another backport patch which fixes a csmith ICE problem. Rebased on the latest 4.9 branch. Tested ok on aarch64-linux with qemu. Hi, The attached patch contains a ChangeLog diff but no code diff. The patch r210497 on mainline

match.pd: Use single_use more

2015-06-11 Thread Marek Polacek
A cleanup patch to make the code more readable. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2015-06-11 Marek Polacek pola...@redhat.com * match.pd: Use single_use throughout. diff --git gcc/match.pd gcc/match.pd index 48358a8..33fa717 100644 --- gcc/match.pd +++

RE: [RFC] Sanitize rtx_addr_can_trap_p_1

2015-06-11 Thread Bernd Edlinger
Hi, On Thu, 11 Jun 2015 10:02:03, Jakub Jelinek wrote: IMHO the #if 0 #endif stuff doesn't belong to the patch. I just wanted to leave a hint, how I debugged this function, and how to assess the performance of the decision that is taken here. I mean, the boot-strap would certainly pass,

Re: [RFC] Sanitize rtx_addr_can_trap_p_1

2015-06-11 Thread Jakub Jelinek
On Thu, Jun 11, 2015 at 01:17:47PM +0200, Eric Botcazou wrote: Other than that, as I said already in the PR, I'm in favor of applying it to the trunk (only, not release branches) and watching for performance and/or wrong-code issues, but Eric is against it. What do others think about it?

Re: [PATCH] [X86_64]: Add support for MONITORX and MWAITX ISA

2015-06-11 Thread Uros Bizjak
On Thu, Jun 11, 2015 at 11:49 AM, Kumar, Venkataramanan venkataramanan.ku...@amd.com wrote: Hi Maintainers, This patch adds support for new MONITORX and MWAITX instructions and also enables them via builtins. The ISA is enabled by new -mmwaitx option and is available for AMD bdver4 target

Re: [PATCH][PR debug/65549] Restore DW_AT_abstract_origin for cross-unit call sites

2015-06-11 Thread Richard Biener
On Wed, 10 Jun 2015, Pierre-Marie de Rodat wrote: On 06/10/2015 03:36 PM, Richard Biener wrote: Hmm, yes. It meant to break after the first ;) (without LTO there usually is only one TU decl, apart from Java I think). The hunk isn't in mainline because it was part of an experimental patch

[PATCH *2][AArch64] Fix ICEs with +nofp/-mgeneral-regs-only and improve error messages; clarify docs.

2015-06-11 Thread Alan Lawrence
Hi, This is a follow-up to Jim Wilson's patch fixing ICE's with -march=armv8-a+nofp, and the discussion here: https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00177.html The first patch improves the error messages to describe what kind of code caused the problem, and to error rather than sorry

[gomp4.1] Rename *schedule modifier argument to chunk_size

2015-06-11 Thread Jakub Jelinek
Hi! The latest spec renamed modifier argument to chunk_size. Only for Fortran this is actually a user visible change, but for consistency I've renamed it everywhere. 2015-06-11 Jakub Jelinek ja...@redhat.com * libgomp.h (struct gomp_task_icv): Rename run_sched_modifier field

Re: [PATCH][ARM] Restrict MAX_CONDITIONAL_EXECUTE when -mrestrict-it is in place

2015-06-11 Thread Ramana Radhakrishnan
On 27/05/15 11:25, Kyrill Tkachov wrote: Ping. Here is the rebased (and retested) patch after Christian's series. Thanks, Kyrill On 18/05/15 11:26, Kyrill Tkachov wrote: Hi all, When using the short Thumb2 IT blocks we want to also restrict ifcvt so that it will not end up generating a

Re: [PATCH][ARM] Restrict MAX_CONDITIONAL_EXECUTE when -mrestrict-it is in place

2015-06-11 Thread Ramana Radhakrishnan
On 18/05/15 11:26, Kyrill Tkachov wrote: Hi all, When using the short Thumb2 IT blocks we want to also restrict ifcvt so that it will not end up generating a number of back-to-back cond_execs that will later end up being back to back single-instruction IT blocks. Branching over them should

Re: [RFC] Sanitize rtx_addr_can_trap_p_1

2015-06-11 Thread Richard Biener
On Thu, Jun 11, 2015 at 12:38 PM, Bernd Edlinger bernd.edlin...@hotmail.de wrote: Hi, On Thu, 11 Jun 2015 10:02:03, Jakub Jelinek wrote: IMHO the #if 0 #endif stuff doesn't belong to the patch. I just wanted to leave a hint, how I debugged this function, and how to assess the

Re: [RFC] Sanitize rtx_addr_can_trap_p_1

2015-06-11 Thread Eric Botcazou
Other than that, as I said already in the PR, I'm in favor of applying it to the trunk (only, not release branches) and watching for performance and/or wrong-code issues, but Eric is against it. What do others think about it? Yes, I'm against it, I think that the patch will introduce more

Re: [PATCH] [PING] [PR libitm/61164] Remove redefinition of glibc internal macro __always_inline

2015-06-11 Thread Gleb Fotengauer-Malinovskiy
On Fri, May 15, 2015 at 03:04:27PM +0200, Torvald Riegel wrote: On Wed, 2015-05-06 at 17:54 +0300, Gleb Fotengauer-Malinovskiy wrote: 2015-05-06 Gleb Fotengauer-Malinovskiy gle...@altlinux.org PR libitm/61164 * local_atomic (__always_inline): Rename to...

[PATCH] [X86_64]: Add support for MONITORX and MWAITX ISA

2015-06-11 Thread Kumar, Venkataramanan
Hi Maintainers, This patch adds support for new MONITORX and MWAITX instructions and also enables them via builtins. The ISA is enabled by new -mmwaitx option and is available for AMD bdver4 target (-march=bdver4). MONITORX and MWAITX implements same functionality as old MONITOR and MWAIT.

Re: match.pd: Optimize (x y) ^ (x | y)

2015-06-11 Thread Jakub Jelinek
On Thu, Jun 11, 2015 at 01:04:32PM +0200, Marek Polacek wrote: This patch introduces a new pattern for the match-and-simplify machinery. I have verified this transformation on a toy testcase (tried x and y in the range [-1000,1000]) and it does a correct thing for all integers. The asm

Re: match.pd: Optimize (x y) ^ (x | y)

2015-06-11 Thread Richard Biener
On Thu, 11 Jun 2015, Marek Polacek wrote: This patch introduces a new pattern for the match-and-simplify machinery. I have verified this transformation on a toy testcase (tried x and y in the range [-1000,1000]) and it does a correct thing for all integers. The asm diff for fn1 is -

Re: match.pd: Use single_use more

2015-06-11 Thread Richard Biener
On Thu, 11 Jun 2015, Marek Polacek wrote: A cleanup patch to make the code more readable. Bootstrapped/regtested on x86_64-linux, ok for trunk? Ok. Thanks, Richard. 2015-06-11 Marek Polacek pola...@redhat.com * match.pd: Use single_use throughout. diff --git gcc/match.pd

Re: [RFC] Sanitize rtx_addr_can_trap_p_1

2015-06-11 Thread Jakub Jelinek
On Thu, Jun 11, 2015 at 12:38:40PM +0200, Bernd Edlinger wrote: On Thu, 11 Jun 2015 10:02:03, Jakub Jelinek wrote: IMHO the #if 0 #endif stuff doesn't belong to the patch. I just wanted to leave a hint, how I debugged this function, and how to assess the performance of the

RE: backport the fixes of PR target/64011 and /61749 to 4.9 gcc

2015-06-11 Thread weixiangyu
Hi Patch modified. Use %wu instead of HOST_WIDE_INT_PRINT_UNSIGNED. Tested ok on aarch64-linux(big-endian and little-endian) with qemu. Index: gcc/ChangeLog === --- gcc/ChangeLog (revision 223867) +++ gcc/ChangeLog

[PATCH 4.8] PR66306 Fix reload problem with commutative operands

2015-06-11 Thread Andreas Krebbel
Hi, this fixes a reload problem with match_dup's on commutative operands. Bootstrapped and regtested on x86-64, ppc64, and s390x. Ok? Bye, -Andreas- 2015-06-11 Andreas Krebbel kreb...@linux.vnet.ibm.com PR rtl-optimization/66306 * reload.c (find_reloads): Swap the

Re: backport the fixes of PR target/64011 and /61749 to 4.9 gcc

2015-06-11 Thread Marcus Shawcroft
On 10 June 2015 at 03:46, weixiangyu weixian...@huawei.com wrote: Updated patches were attached. Rebased on the latest 4.9 branch. Tested on aarch64-linux (big-endian and little-endian) with qemu. OK for 4.9? Hi, And the second one: The original r215046 mainline commit contains a test case

[PATCH, RTL-optimization]: Optimize need_atomic_barrier_p a bit

2015-06-11 Thread Uros Bizjak
Hello! We can use MEMMODEL_BASE_MASK here to avoid a couple of similar cases. 2015-06-11 Uros Bizjak ubiz...@gmail.com * emit-rtl.c (need_atomic_barrier_p): Mask model with MEMMODEL_BASE_MASK. Remove MEMMODEL_SYNC_* cases. Tested on x86_64-linux-gnu {,-m32}. OK for mainline? Uros.

[C++ Patch/RFC] PR 65091

2015-06-11 Thread Paolo Carlini
Hi, I have been looking into this issue, which should be rather easy to solve: the problem seems that in a template we are mishandling ~ as a bitwise complement operator (vs destructor introducer). We end up here in cp_parser_unqualified_id: type_decl =

Re: Re: [PATCH][AARCH64]Add ACLE 2.0 predefined macros: __ARM_ALIGN_MAX_PWR and __ARM_ALIGN_MAX_STACK_PWR

2015-06-11 Thread Marcus Shawcroft
On 4 June 2015 at 14:36, Renlin Li renlin...@arm.com wrote: Hi Marcus, Sorry for the delay. I have come up with an updated patch. Two test cases are added to check against the limit. __ARM_ALIGN_MAX_STACK_PWR is hard coded into 16. __ARM_ALIGN_MAX_PWR is hard coded into 28 which is the

match.pd: Optimize (x y) ^ (x | y)

2015-06-11 Thread Marek Polacek
This patch introduces a new pattern for the match-and-simplify machinery. I have verified this transformation on a toy testcase (tried x and y in the range [-1000,1000]) and it does a correct thing for all integers. The asm diff for fn1 is - andl%esi, %eax - orl %edi, %esi so

Re: [PATCH][PR debug/65549] Restore DW_AT_abstract_origin for cross-unit call sites

2015-06-11 Thread Pierre-Marie de Rodat
On 06/11/2015 11:06 AM, Richard Biener wrote: FYI, I decided to backport the fix causing this regression to the 4.8 branch today, guarded with in_lto_p, thus eliminating the effect on non-LTO links. The adjusted patch looks like the following and I'll also adjust the 4.9 branch accordingly,

Re: [PATCH] Lift restrictions on SLP permutation for loop vect

2015-06-11 Thread Richard Biener
On Thu, 11 Jun 2015, James Greenhalgh wrote: On Thu, Jun 11, 2015 at 03:08:59PM +0100, Richard Biener wrote: On Thu, 11 Jun 2015, Uros Bizjak wrote: So this turned up other issues thus the following is what I have committed after bootstrapping and testing on

C++ PATCH for c++/66445 (ICE with type definition in statement-expression)

2015-06-11 Thread Jason Merrill
The testcase in the PR uses a lambda, but the issue affects local classes as well. A simple case of a missing 'case'. Tested x86_64-pc-linux-gnu, applying to trunk and 5. commit 65488b9842de11454371c9d75652f58cab3465d4 Author: Jason Merrill ja...@redhat.com Date: Thu Jun 11 09:51:19 2015

Re: [PATCH] Lift restrictions on SLP permutation for loop vect

2015-06-11 Thread James Greenhalgh
On Thu, Jun 11, 2015 at 03:08:59PM +0100, Richard Biener wrote: On Thu, 11 Jun 2015, Uros Bizjak wrote: So this turned up other issues thus the following is what I have committed after bootstrapping and testing on x86_64-unknown-linux-gnu. Richard. 2015-06-08 Richard Biener

Re: [PATCH 00/17] RFC: Addding a unit testing framework to gcc

2015-06-11 Thread Martin Liška
On 06/10/2015 05:24 PM, David Malcolm wrote: Our current test suite is rather coarse-grained, acting at the level of running gcc subprocesses, and verifying externally-visible properties: - Did the compile succeed? - Was a particular dumpfile emitted, containing something matching

Re: [PATCH] Lift restrictions on SLP permutation for loop vect

2015-06-11 Thread Uros Bizjak
So this turned up other issues thus the following is what I have committed after bootstrapping and testing on x86_64-unknown-linux-gnu. Richard. 2015-06-08 Richard Biener rguent...@suse.de * tree-vect-stmts.c (vectorizable_load): Compute the pointer adjustment for gaps at the end of a

Re: [PATCH] Lift restrictions on SLP permutation for loop vect

2015-06-11 Thread James Greenhalgh
On Thu, Jun 11, 2015 at 03:23:21PM +0100, Richard Biener wrote: I will have a look next week - mind opening a bugreport for this so I dont' forget? Of course, I've opened https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66510 . Cheers, James

RE: [RFC] Sanitize rtx_addr_can_trap_p_1

2015-06-11 Thread Bernd Edlinger
Hi, On Thu, 11 Jun 2015 12:57:34 +0200, Jakub Jelinek wrote: On Thu, Jun 11, 2015 at 12:38:40PM +0200, Bernd Edlinger wrote: On Thu, 11 Jun 2015 10:02:03, Jakub Jelinek wrote: IMHO the #if 0 #endif stuff doesn't belong to the patch. I just wanted to leave a hint, how I debugged this

[patch] fix darwin bootstrap by avoiding duplicate DIE attributes

2015-06-11 Thread Aldy Hernandez
Hi. As explained in the PR, this patch fixes all the duplicate DIE attribute issues seen in Darwin. This patch fixes real problems on Linux as well, but they're silently ignored by Linux's more permissive linker. I have enhanced check_die() to check for these duplicate attributes in the

Re: [PATCH] Lift restrictions on SLP permutation for loop vect

2015-06-11 Thread Richard Biener
On Thu, 11 Jun 2015, Uros Bizjak wrote: So this turned up other issues thus the following is what I have committed after bootstrapping and testing on x86_64-unknown-linux-gnu. Richard. 2015-06-08 Richard Biener rguent...@suse.de * tree-vect-stmts.c (vectorizable_load): Compute

Re: [PATCH] PR33661 Fix problem with register asm in templates

2015-06-11 Thread Jakub Jelinek
Hi! Just nits, I'll defer the review to a C++ maintainer. On Thu, Jun 11, 2015 at 03:49:48PM +0200, Andreas Krebbel wrote: 2015-06-11 Andreas Krebbel kreb...@linux.vnet.ibm.com PR C++/33661 * gcc/cp/decl.c (cp_finish_decl): Set assembler name for register asm

[gomp4] OpenACC gang clause static argument

2015-06-11 Thread Cesar Philippidis
This patch teaches omp-expand how to utilize the optional static argument in the gang clause. In OpenACC this corresponds to setting the static chunk_size for acc loop. The idea here is that the user requests 'n' adjacent loop iterations to be executed by the same gang. And if two loops inside the

Re: [RFC] Sanitize rtx_addr_can_trap_p_1

2015-06-11 Thread Richard Biener
On Thu, Jun 11, 2015 at 4:34 PM, Bernd Edlinger bernd.edlin...@hotmail.de wrote: Hi, On Thu, 11 Jun 2015 12:57:34 +0200, Jakub Jelinek wrote: On Thu, Jun 11, 2015 at 12:38:40PM +0200, Bernd Edlinger wrote: On Thu, 11 Jun 2015 10:02:03, Jakub Jelinek wrote: IMHO the #if 0 #endif stuff

[PATCH] Fix wrong-code with permuted strided group loads

2015-06-11 Thread Richard Biener
Just noticed this when playing with some testcases. Bootstrap and regtest running on x86_64-unknown-linux-gnu. Richard. 2015-06-11 Richard Biener rguent...@suse.de * tree-vect-stmts.c (vectorizable_load): Properly start loads with the first element if this is grouped loads.

Re: match.pd: Optimize (x y) ^ (x | y)

2015-06-11 Thread Marek Polacek
On Thu, Jun 11, 2015 at 01:09:05PM +0200, Jakub Jelinek wrote: What about some nop type conversions in between? int fn1 (unsigned int x, unsigned int y) { int a = x; int b = y; unsigned int c = x y; int d = a | b; return (int) (c ^ d); } ? Also wonder, if some testcases for

Re: match.pd: Optimize (x y) ^ (x | y)

2015-06-11 Thread Marek Polacek
On Thu, Jun 11, 2015 at 01:08:41PM +0200, Richard Biener wrote: If the pattern doesn't exist in fold-const.c (obviously it doesn't) then I think it makes sense to only add testcases to match this on GIMPLE (because in the long run we'd like to _not_ transform things in GENERIC, at least not

[PATCH] PR33661 Fix problem with register asm in templates

2015-06-11 Thread Andreas Krebbel
Hi, register asm declarations currently don't work when being expanded as part of a function template. There appeared to be two problems: 1. When parsing a template function cp_finish_decl returns before the asmspec is set in the var decl. 2. When expanding the template function the

Re: [PATCH][PR debug/65549] Restore DW_AT_abstract_origin for cross-unit call sites

2015-06-11 Thread Pierre-Marie de Rodat
On 06/11/2015 11:21 AM, Richard Biener wrote: That sounds perfect: thank you Richard! I am about to commit the original fix on mainline: should I still open a bugreport before commiting it to the GCC 5 branch? Yes please. For the record, as you already noticed, I opened PR debug/66503.

[gomp4.1] map clause parsing improvements

2015-06-11 Thread Jakub Jelinek
On Tue, Jun 09, 2015 at 09:36:08PM +0300, Ilya Verbin wrote: On Wed, Apr 29, 2015 at 14:06:44 +0200, Jakub Jelinek wrote: [...] The draft requires only alloc or to (or always, variants) for enter data and only from or delete (or always, variants) for exit data, so in theory it is possible

Re: match.pd: Optimize (x y) ^ (x | y)

2015-06-11 Thread Marc Glisse
On Thu, 11 Jun 2015, Marek Polacek wrote: On Thu, Jun 11, 2015 at 01:09:05PM +0200, Jakub Jelinek wrote: What about some nop type conversions in between? int fn1 (unsigned int x, unsigned int y) { int a = x; int b = y; unsigned int c = x y; int d = a | b; return (int) (c ^ d); } ?

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

2015-06-11 Thread Joseph Myers
On Thu, 11 Jun 2015, Steve Ellcey wrote: loongson and r8000 have the most changes, they no longer generate msub instructions with -mfused-madd because that instruction does not generate the correct NAN in some cases (the sign may be wrong). If HONOR_NANS is not set then they will generate

Re: [patch] fix darwin bootstrap by avoiding duplicate DIE attributes

2015-06-11 Thread Jason Merrill
OK. Jason

Re: [PATCH] Emit -Waddress warnings for comparing address of reference against NULL

2015-06-11 Thread Jason Merrill
Let's use explicit location for the C++ front end warnings, too. OK with that change. Jason

Fix verify_type ICE with -fshort-enum

2015-06-11 Thread Jan Hubicka
Hi, gcc.c-torture/execute/930408-1.c currently ICE on -fshort-enum target(s) because TYPE_PACKED is not consistently set among type variants. Bootstrapped/regtested ppc64le-linux, OK? Honza PR middle-end/66325 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type

Re: [patch] fix darwin bootstrap by avoiding duplicate DIE attributes

2015-06-11 Thread Aldy Hernandez
Hi Jason. Attached is a new patch with the off-list corrections. Tested on x86_64 Linux. Aldy commit 1775f74c2b78b1601c89befa724114d89fc2e8be Author: Aldy Hernandez al...@redhat.com Date: Tue Jun 9 18:07:44 2015 -0400 PR bootstrap/66448 * dwarf2out.c (check_die): Check for

[committed] Fix ICE compiling gcc.dg/torture/pr66123.c on hppa

2015-06-11 Thread John David Anglin
The attached change adds support for LABEL_REF plus CONST_INT in pa_output_global_address and fixes ICE compiling gcc.dg/torture/pr66123.c. Tested on hppa2.0w-hp-hpux11.11, hppa64-hp-hpux11.11 and hppa-unknown-linux-gnu. Committed to active branches. Dave -- John David Anglin

Re: [Patch libstdc++] Rewrite cpu/generic/atomic_word.h

2015-06-11 Thread Torvald Riegel
On Tue, 2015-06-09 at 10:50 +0100, Ramana Radhakrishnan wrote: On 22/05/15 17:56, Torvald Riegel wrote: On Fri, 2015-05-22 at 12:37 +0100, Ramana Radhakrishnan wrote: Hi, While writing atomic_word.h for the ARM backend to fix PR target/66200 I thought it would make more sense to

[Patch, MIPS, testsuite] Fix bug in gcc.dg/tree-prof/stringop-2.c

2015-06-11 Thread Steve Ellcey
I am checking in this change as an obvious fix. When the default int type as added to main on this test it resulted in 'int int main' for mips due to the ifdef for mips that is in the code. This patch fixes the problem. 2015-06-11 Steve Ellcey sell...@imgtec.com *

Re: [Patch, fortran, PR44672, v10] [F08] ALLOCATE with SOURCE and no array-spec

2015-06-11 Thread Thomas Koenig
Hi Andre, please find attached an updated version of the patch. This patch simplifies some cases and ensures more straight line code. Furthermore was a bug in the interfacing routine for the _vptr-_copy() routine removed, where not the third and fourth arguments translated to be passed be

Re: [PATCH] warn for unsafe calls to __builtin_return_address

2015-06-11 Thread Martin Sebor
Attached is an updated patch for both GCC and the manual. The patch implements the suggested warning, -Wbuiltin-address, that issues diagnostics for unsafe calls of the builtin address functions. Safe calls are those with arguments 0 or 1 anywhere in a program and argument 2 outside of the main

[patch] Fix two libstdc++ test failures with -std=gnu++14

2015-06-11 Thread Jonathan Wakely
This fixes two test failures when the default compiler mode is -std=gnu++14 FAIL: 25_algorithms/headers/algorithm/synopsis.cc (test for excess errors) FAIL: ext/profile/mutex_extensions_neg.cc (test for excess errors) I don't really like the change to the synopsis.cc test, but I don't think

Re: match.pd: Optimize (x y) ^ (x | y)

2015-06-11 Thread Richard Biener
On June 11, 2015 10:09:11 PM GMT+02:00, Marc Glisse marc.gli...@inria.fr wrote: On Thu, 11 Jun 2015, Marek Polacek wrote: On Thu, Jun 11, 2015 at 01:09:05PM +0200, Jakub Jelinek wrote: What about some nop type conversions in between? int fn1 (unsigned int x, unsigned int y) { int a = x;

Re: [PATCH][PR debug/65549] Restore DW_AT_abstract_origin for cross-unit call sites

2015-06-11 Thread Richard Biener
On June 12, 2015 2:30:36 AM GMT+02:00, David Edelsohn dje@gmail.com wrote: This patch broke AIX bootstrap because dbxout.c was not updated for the XCOFF_DEBUGGING_INFO case. OK. Thanks Richard. - David * dbxout.c (xcoff_debug_hooks): Provide a function for register_main_translation_unit

Re: [lto] intN follow-up patch

2015-06-11 Thread Richard Biener
On June 12, 2015 3:28:51 AM GMT+02:00, DJ Delorie d...@redhat.com wrote: This was missed in the big intN patch set I did last year; it only shows up if you have a target with an N-bit type that isn't also used for a pointer type but is used for unwinding (which is a change I also have pending,

Re: [gomp4] filter out unrecognized device_type targets

2015-06-11 Thread Thomas Schwinge
Hi Cesar! On Wed, 10 Jun 2015 14:35:26 -0700, Cesar Philippidis ce...@codesourcery.com wrote: This patch addresses a bug where the c and c++ front ends would ICE [...] Thanks! The following also doesn't look quite appropriate: $ cat ../d.f IMPLICIT NONE INTEGER

[RFC] Sanitize rtx_addr_can_trap_p_1

2015-06-11 Thread Bernd Edlinger
Hi, it was exactly to the day one year ago, when I posted this patch the first time: [PATCH] PR rtl-optimization/61047: https://gcc.gnu.org/ml/gcc-patches/2014-06/msg00996.html The PR was suspended, but the discussion did not stop.  And I personally still see a bug like this as an

Re: [PATCH][PR debug/65549] Restore DW_AT_abstract_origin for cross-unit call sites

2015-06-11 Thread Richard Biener
On Wed, 10 Jun 2015, Pierre-Marie de Rodat wrote: On 06/10/2015 03:36 PM, Richard Biener wrote: Hmm, yes. It meant to break after the first ;) (without LTO there usually is only one TU decl, apart from Java I think). The hunk isn't in mainline because it was part of an experimental patch

Re: [PATCH][PR debug/65549] Restore DW_AT_abstract_origin for cross-unit call sites

2015-06-11 Thread David Edelsohn
This patch broke AIX bootstrap because dbxout.c was not updated for the XCOFF_DEBUGGING_INFO case. - David * dbxout.c (xcoff_debug_hooks): Provide a function for register_main_translation_unit hook. Index: dbxout.c === --- dbxout.c

[lto] intN follow-up patch

2015-06-11 Thread DJ Delorie
This was missed in the big intN patch set I did last year; it only shows up if you have a target with an N-bit type that isn't also used for a pointer type but is used for unwinding (which is a change I also have pending, hence I noticed ;). Tested on x86-64 and msp430 (with the pending patch)

C++ delayed folding branch review

2015-06-11 Thread Jason Merrill
Generally, it seems like most of my comments from April haven't been addressed yet. @@ -3023,13 +3023,14 @@ conversion_warning (location_t loc, tree type, tree expr Instead of adding folds here, let's make sure that the argument we pass (e.g. from cp_convert_and_check to

Re: [PATCH] 65479 - sanitizer stack trace missing frames past #0 on powerpc64

2015-06-11 Thread Martin Sebor
OK. You can go ahead and commit the libbacktrace fix. Committed in r224402. Let's hold off on the testsuite fixes until we've got the sanitizer libbacktrace fixes installed. Okay. Martin

[PATCH] Fix PR c++/30044

2015-06-11 Thread Patrick Palka
The crux of the issue causing PR 30044 is that, in the middle of processing a template parameter list, current_template_parms is not up-to-date. This causes problems particularly when we attempt to instantiate a type that's defined within the very parameter list we are processing. Of course,

Re: [RFC] Sanitize rtx_addr_can_trap_p_1

2015-06-11 Thread Jakub Jelinek
On Thu, Jun 11, 2015 at 09:42:38AM +0200, Bernd Edlinger wrote: it was exactly to the day one year ago, when I posted this patch the first time: [PATCH] PR rtl-optimization/61047: https://gcc.gnu.org/ml/gcc-patches/2014-06/msg00996.html The PR was suspended, but the discussion did not

Re: match.pd: Optimize (x y) ^ (x | y)

2015-06-11 Thread Marc Glisse
On Thu, 11 Jun 2015, Marek Polacek wrote: I have verified this transformation on a toy testcase (tried x and y in the range [-1000,1000]) and it does a correct thing for all integers. Note that for pure bitop (only involving |^), testing the range [0,1] is sufficient. +/* (x y) ^ (x | y)

Fwd: [PATCH][GSoC] Extend shared_ptr to support arrays

2015-06-11 Thread Fan You
Hi, This is my first patch for GSoC project: extend shared_ptr to support arrays. Changes are made in these files: * libstdc++-v3/include/bits/shared_ptr_base.h : Renamed _Sp_counted_deleter to _Sp_counted_array, changed _shared_count construct from _Sp_counted_ptr to _Sp_counted_array. Added

Re: [PATCH][GSoC] Extend shared_ptr to support arrays

2015-06-11 Thread Jonathan Wakely
On 11/06/15 23:32 +0800, Fan You wrote: Any comments? I haven't looked at the patch yet, but please CC all libstdc++ patches to the libstdc++ list as well as gcc-patches, thanks.

C++ PATCH for c++/66450 (wrong code with constexpr forwarding constructor)

2015-06-11 Thread Jason Merrill
The problem here was that cxx_eval_store_expression was storing the value of the target variable in the hash table, but then cxx_eval_call_expression was looking at ctx-ctor to find the value, and it wasn't there. Fixed by handling full-object stores by swapping out CONSTRUCTOR_ELTS. Tested

RE: [RFC] Sanitize rtx_addr_can_trap_p_1

2015-06-11 Thread Bernd Edlinger
Hi, On Thu, 11 Jun 2015 16:38:23, Richard Biener wrote: Sounds like a red-zone is not accounted for? No, I know about the red-zone: +#ifdef RED_ZONE_SIZE + HOST_WIDE_INT red_zone_size = RED_ZONE_SIZE; +#else + HOST_WIDE_INT red_zone_size = 0; +#endif otherwise there would

Re: [Patch, fortran] PR66079 - [6 Regression] memory leak with source allocation in internal subprogram

2015-06-11 Thread Paul Richard Thomas
Dear Andre and Mikael, Thanks for the reviews and the discussion about the name of the temporary. I went for source in the end. The expr3 was merely meant to align with the expression Following Andre's suggestion, I left his additions to another time; especially since the patch was heading

[SPARC] Fix PR bootstrap/66252

2015-06-11 Thread Eric Botcazou
This is the bootstrap comparison failure on the SPARC, triggered by a CCP change at the GIMPLE level exposing a latent issue in the back-end and resulting in the miscompilation of cse.c at -O2. In fact it's just another instance of http://gcc.gnu.org/ml/gcc-patches/2012-07/msg00960.html so I

RE: [RFC] Sanitize rtx_addr_can_trap_p_1

2015-06-11 Thread Bernd Edlinger
Hi, On Thu, 11 Jun 2015 12:56:50, Richard Biener wrote: I also think we need to be conservative. I didn't look at the patch in detail to check whether we are indeed conservative here (what about offsets that are not visibly constant like for if (n m) ... a[m];?). we only handle constant

Re: match.pd: Optimize (x y) ^ (x | y)

2015-06-11 Thread Richard Biener
On June 11, 2015 5:25:30 PM GMT+02:00, Marc Glisse marc.gli...@inria.fr wrote: On Thu, 11 Jun 2015, Marek Polacek wrote: I have verified this transformation on a toy testcase (tried x and y in the range [-1000,1000]) and it does a correct thing for all integers. Note that for pure bitop (only

Re: match.pd: Optimize (x y) ^ (x | y)

2015-06-11 Thread Marek Polacek
On Thu, Jun 11, 2015 at 05:25:30PM +0200, Marc Glisse wrote: On Thu, 11 Jun 2015, Marek Polacek wrote: I have verified this transformation on a toy testcase (tried x and y in the range [-1000,1000]) and it does a correct thing for all integers. Note that for pure bitop (only involving |^),

[ARM] Fix PR middle-end/65958

2015-06-11 Thread Eric Botcazou
Hi, this fixes PR middle-end/65958 on the ARM, the architecture for which it was reported, by implementing stack checking by means of probing in the back-end. Other mainstream back-ends (alpha, i386, ia64, mips, rs6000, sparc) already have such an implementation. The middle-end contains a

Re: [PATCH][GSoC] Extend shared_ptr to support arrays

2015-06-11 Thread Jonathan Wakely
On 11/06/15 23:32 +0800, Fan You wrote: Hi, This is my first patch for GSoC project: extend shared_ptr to support arrays. Changes are made in these files: * libstdc++-v3/include/bits/shared_ptr_base.h : Renamed _Sp_counted_deleter to _Sp_counted_array, changed _shared_count construct from

Re: match.pd: Optimize (x y) ^ (x | y)

2015-06-11 Thread Marc Glisse
On Thu, 11 Jun 2015, Marek Polacek wrote: + (if (single_use (@2) single_use (@3)) + (bit_xor @0 @1))) I don't think we should use single_use here. The result is never more complicated than the original. Sure, it might increase register pressure a bit in some cases, but we have not used

[PATCH] Fix PR 66301

2015-06-11 Thread Martin Jambor
Hi, the following patch is a quick fix for PR 66301. eliminate_dom_walker::before_dom_children in tree-ssa-pre.c calls dump_possible_polymorphic_call_targets when dump_enabled_p returns true, but the function assumes dump_file is not NULL while the predicate also returns true when alt_dump_file

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

2015-06-11 Thread Ulrich Weigand
Hello, since the new type-based pool allocator was merged, the SPU toolchain automated build / regression test has been failing due to crashes of the compiled GCC due to random memory corruption. Debugging this, it seems this is caused by GCC being miscompiled by the host compiler. As one

Re: match.pd: Optimize (x y) ^ (x | y)

2015-06-11 Thread Marek Polacek
On Thu, Jun 11, 2015 at 06:21:11PM +0200, Marc Glisse wrote: On Thu, 11 Jun 2015, Marek Polacek wrote: + (if (single_use (@2) single_use (@3)) + (bit_xor @0 @1))) I don't think we should use single_use here. The result is never more complicated than the original. Sure, it might

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

2015-06-11 Thread pinskia
On Jun 12, 2015, at 12:51 AM, Ulrich Weigand uweig...@de.ibm.com wrote: Hello, since the new type-based pool allocator was merged, the SPU toolchain automated build / regression test has been failing due to crashes of the compiled GCC due to random memory corruption. Debugging

DWARF PATCH to fix g++.dg/debug/localclass1.C ICE

2015-06-11 Thread Jason Merrill
I was seeing crashes on localclass1.C for some testruns. The issue turned out to be that we are doing better at pruning unnecessary debug info, so we end up with 'B' on limbo_die_list and never referred to. Let's deal with that situation. Tested x86_64-pc-linux-gnu, applying to trunk. commit

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

2015-06-11 Thread Jakub Jelinek
On Fri, Jun 12, 2015 at 12:58:12AM +0800, pins...@gmail.com wrote: This is just a bug in the older compiler. There was a change to fix in placement new operator. I can't find the reference right now but this is the same issue as that. I'm not claiming 4.1 is aliasing bug free, there are

Re: Fix more of C/fortran canonical type issues

2015-06-11 Thread Jan Hubicka
On Mon, 8 Jun 2015, Jan Hubicka wrote: I think we should instead work towards eliminating the get_alias_set langhook first. The LTO langhook variant contains the same handling, btw, so just inline that into get_alias_set and see what remains? I see, i completely

Re: Fortran's C_CHAR type

2015-06-11 Thread Jan Hubicka
I have had a look at the table and the text around, and first I should correct myself. C_CHAR is 1, C_SIGNED_CHAR is 1, and the default values for len= and kind= are 1 as well. So, even if CHARACTER(KIND=C_CHAR) is what should be used as it's not dependent on the implementation's default

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

2015-06-11 Thread Richard Biener
On June 11, 2015 7:50:36 PM GMT+02:00, Jakub Jelinek ja...@redhat.com wrote: On Fri, Jun 12, 2015 at 12:58:12AM +0800, pins...@gmail.com wrote: This is just a bug in the older compiler. There was a change to fix in placement new operator. I can't find the reference right now but this is the

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

2015-06-11 Thread Steve Ellcey
This patch updates MIPS to handle fused multiply and add instructions using the standard fp-contract infrastructure. Currently MIPS handles -mfused-madd as a target specific option and it is not affected by the -ffp-contract option. This patch changes -mfused-madd to be an alias for

[gomp4.1] Parse linear clause modifiers

2015-06-11 Thread Jakub Jelinek
Hi! OpenMP 4.1 allows modifiers on the linear clause, like: #ifdef __cplusplus #pragma omp declare simd linear(ref(a):1) linear(val(b)) linear(uval(c)) int foo (int a, int b, int c); #else #pragma omp declare simd linear(a:1) linear(val(b)) linear(uval(c)) int bar (int a, int b, int c); #endif

Re: [Patch libstdc++] Rewrite cpu/generic/atomic_word.h

2015-06-11 Thread David Edelsohn
On Tue, Jun 9, 2015 at 5:50 AM, Ramana Radhakrishnan ramana.radhakrish...@foss.arm.com wrote: On 22/05/15 17:56, Torvald Riegel wrote: On Fri, 2015-05-22 at 12:37 +0100, Ramana Radhakrishnan wrote: Hi, While writing atomic_word.h for the ARM backend to fix PR target/66200 I thought it