[PATCH 4/7] Fix int overflow

2015-07-06 Thread Mikhail Maltsev
--- libiberty/cp-demangle.c | 3 ++- libiberty/testsuite/demangle-expected | 4 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 44a0a9b..befa6b6 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle

[PATCH 5/7] Fix braced-init-list demangling

2015-07-06 Thread Mikhail Maltsev
--- libiberty/cp-demangle.c | 2 ++ libiberty/testsuite/demangle-expected | 4 2 files changed, 6 insertions(+) diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index befa6b6..424b1c5 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -3167,6 +3

[PATCH 6/7] Fix DEMANGLE_COMPONENT_LOCAL_NAME

2015-07-06 Thread Mikhail Maltsev
--- libiberty/cp-demangle.c | 7 +++ libiberty/testsuite/demangle-expected | 4 2 files changed, 11 insertions(+) diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 424b1c5..289a704 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -324

[PATCH 7/7] Fix several crashes in d_find_pack

2015-07-06 Thread Mikhail Maltsev
--- libiberty/cp-demangle.c | 3 +++ libiberty/testsuite/demangle-expected | 12 2 files changed, 15 insertions(+) diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 289a704..4ca285e 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @

Re: [gomp] Move openacc vector& worker single handling to RTL

2015-07-06 Thread Nathan Sidwell
On 07/04/15 16:41, Nathan Sidwell wrote: On 07/03/15 19:11, Jakub Jelinek wrote: If the builtins are not meant to be used by users directly (I assume they aren't) nor have a 1-1 correspondence to a library routine, it is much better to emit them as internal calls (see internal-fn.{c,def}) inst

Re: [Patch, fortran, pr66578, v1] [F2008] Invalid free on allocate(...,source=a(:)) in block

2015-07-06 Thread Paul Richard Thomas
Dear Andre, Whilst it is probably OK in most circumstances, I would change: s/rank_remap = ss->dimen < ndim/rank_remap = ss->dimen < ndim != 0 Apart from that, it is indeed OK for trunk, in spite of your expectations :-) Thanks for the patch Paul On 6 July 2015 at 14:58, Andre Vehreschild wro

Re: [patch] [fixincludes] Ignore .DS_Store junk files when running make check

2015-07-06 Thread Jeff Law
On 07/05/2015 04:58 PM, Eric Gallager wrote: I was just matching the code that was already used there... should the lines to ignore the CVS and .svn folders be re-written into the style you propose, too? Might as well have a consistent style. Embedding them into the "find" ought to be marginall

Re: [Patch, fortran, pr66578, v1] [F2008] Invalid free on allocate(...,source=a(:)) in block

2015-07-06 Thread Andre Vehreschild
Hi Paul, Thanks for the review, but I don't understand the regexp. rank_remap = ss->dimen < ndim != 0 in my eyes is not a legal expression. Did you mean something like rank_remap = ss->dimen < ndim && ndim != 0, or the like? Regards, Andre Am 6. Juli 2015 21:36:18 MESZ, schrieb Paul Richard Th

Re: [Patch, fortran, pr66578, v1] [F2008] Invalid free on allocate(...,source=a(:)) in block

2015-07-06 Thread Paul Richard Thomas
Andre, Forget my comment. I was seeing arrows all pointing in one direction ! Cheers Paul On 6 July 2015 at 21:42, Andre Vehreschild wrote: > Hi Paul, > > Thanks for the review, but I don't understand the regexp. rank_remap = > ss->dimen < ndim != 0 in my eyes is not a legal expression. Did y

Re: [Patch,tree-optimization]: Add new path Splitting pass on tree ssa representation

2015-07-06 Thread Jeff Law
On 07/01/2015 09:51 PM, Ajit Kumar Agarwal wrote: -Original Message- From: Joseph Myers [mailto:jos...@codesourcery.com] Sent: Wednesday, July 01, 2015 3:48 AM To: Ajit Kumar Agarwal Cc: l...@redhat.com; GCC Patches; Vinod Kathail; Shail Aditya Gupta; Vidhumouli Hunsigida; Nagaraju Mek

Re: [PATCH PR66702]Skip pr48052 on targets not support vect_int_mult

2015-07-06 Thread Jeff Law
On 07/03/2015 02:02 AM, Bin Cheng wrote: Hi, The test failed on sparc because sparc doesn't support vect_int_mult. This patch adds the prerequisite condition thus skips test on such platforms. An obvious change, will apply it in 24h. Thanks, bin gcc/testsuite/ChangeLog 2015-07-02 Bin Cheng

Re: [V850] Hookize GO_IF_LEGITIMATE_ADDRESS

2015-07-06 Thread Jeff Law
On 07/02/2015 12:18 PM, Anatoliy Sokolov wrote: Hi. This patch removes obsolete GO_IF_LEGITIMATE_ADDRESS macros from the V850 back end in the GCC and introduces equivalent TARGET_LEGITIMATE_ADDRESS_P target hook. Regression tested on v850-unknown-eabi. 2015-07-02 Anatoly Sokolov * con

move a * (1 << b) -> a << b pattern from fold-const.c to match.pd

2015-07-06 Thread Prathamesh Kulkarni
Hi, The attached patch moves pattern a * (1 << b) -> a << b. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. OK for trunk if testing passes ? Thank you, Prathamesh 2015-07-06 Prathamesh Kulkarni * fold-const.c (fold_binary_loc): Remove pattern a * 1 << b -> a << b.

Re: [MOXIE] Hookize GO_IF_LEGITIMATE_ADDRESS

2015-07-06 Thread Jeff Law
On 07/05/2015 09:58 AM, Anatoliy Sokolov wrote: Hi. This patch removes obsolete GO_IF_LEGITIMATE_ADDRESS macros from the MOXIE back end in the GCC and introduces equivalent TARGET_ADDR_SPACE_LEGITIMATE_ADDRESS_P target hook. Regression tested on moxie-unknown-elf. OK for trunk? 2015-07-05 An

Re: [gomp4.1] Support #pragma omp target {enter,exit} data

2015-07-06 Thread Jakub Jelinek
On Mon, Jul 06, 2015 at 09:45:30PM +0300, Ilya Verbin wrote: > > What exactly do you have in mind here? > > > > void foo (int *p) > > { > > #pragma omp enter data (to:p[10]) > > ... > > #pragma omp exit data (from:p[10]) > > } > > > > where the latter will only deallocate &p[0] ... &p[9], but not

RE: [PATCH] MIPS: Do not generate micromips code for the no-smartmips-lwxs.c testcase

2015-07-06 Thread Moore, Catherine
> -Original Message- > From: Andrew Bennett [mailto:andrew.benn...@imgtec.com] > Sent: Monday, July 06, 2015 9:34 AM > To: gcc-patches@gcc.gnu.org > Cc: Matthew Fortune; Moore, Catherine > Subject: [PATCH] MIPS: Do not generate micromips code for the no- > smartmips-lwxs.c testcase > > H

Re: fix PR46029: reimplement if conversion of loads and stores

2015-07-06 Thread Jeff Law
On 06/25/2015 03:43 AM, Richard Biener wrote: Yes, and if you just look at scalar code then with the rewrite we can enable store if-conversion unconditionally. _But_ when the new scheme triggers vectorization cannot succeed on the result as we get if (cond) *p = val; if-converted to

Re: [PATCH 1/4] Add classname/filename/line metadata to struct pass_data

2015-07-06 Thread Jeff Law
On 06/25/2015 03:36 PM, David Malcolm wrote: gcc/ChangeLog: * tree-pass.h (struct pass_data): Add fields "classname", "filename", "line_num". (PASS_DATA_INIT): New macro. All 4 parts of this patchkit are OK. jeff

Fix some ptx breakage

2015-07-06 Thread Nathan Sidwell
I'd somehow managed to break the ptx build for trunk when merging my reorg cleanup. Fixed thusly (applied as obvious). nathan 2015-07-06 Nathan Sidwell * config/nvptx/nvptx.c (nvptx_reorg): Remove unused vars. Fix call to nvptx_reorg_subreg. Index: config/nvptx/nvptx.c =

Re: move a * (1 << b) -> a << b pattern from fold-const.c to match.pd

2015-07-06 Thread Jeff Law
On 07/06/2015 02:28 PM, Prathamesh Kulkarni wrote: Hi, The attached patch moves pattern a * (1 << b) -> a << b. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. OK for trunk if testing passes ? Thank you, Prathamesh ChangeLog.txt 2015-07-06 Prathamesh Kulkarni * fold-

Re: [Ada] Add DragonFly support to System.OS_Constants template

2015-07-06 Thread Eric Botcazou
> Please consider incorporating the patch into trunk. Applied with ChangeLog sent privately. -- Eric Botcazou

Re: [PATCH 1/2] Allow REG_EQUAL for ZERO_EXTRACT

2015-07-06 Thread Jeff Law
On 07/05/2015 05:16 PM, Kugan wrote: diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fc23abd..5796f16 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ + +2015-06-26 Kugan Vivekanandarajah + + * cse.c (cse_insn): Calculate src_eqv for ZERO_EXTRACT. + * emit-rtl.c (set

[PATCH, i386]: Use insv

2015-07-06 Thread Uros Bizjak
Hello! Similar to my previous patch, attached patch renames obsolete insv to insv. 2015-07-06 Uros Bizjak * config/i386/i386.md (insv): Rename from insv. Use SWI48 modes for operands 0 and 3. Use SImode for operands 2 and 3. Copy operand 0 to a temporary if !ext_register_operand

Re: [PR66726] Factor conversion out of COND_EXPR

2015-07-06 Thread Jeff Law
On 07/04/2015 06:32 AM, Kugan wrote: p.txt diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr66726.c b/gcc/testsuite/gcc.dg/tree-ssa/pr66726.c index e69de29..93f1ace 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr66726.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr66726.c @@ -0,0 +1,13 @@ + +/* { dg-do c

Re: fix segfault in verify_flow_info() with -dx option

2015-07-06 Thread Jeff Law
On 07/05/2015 06:07 AM, Prathamesh Kulkarni wrote: Hi, Passing -dx causes segmentation fault: Test case: void f(void) {} ./test.c: In function 'f': ../test.c:3:1: internal compiler error: Segmentation fault } ^ 0xab6baf crash_signal /home/prathamesh.kulkarni/gnu-toolchain/src/gcc.gi

Re: [PATCH] config/bfin/bfin.c (hwloop_optimize): Use return false instead of gcc_assert for checking jump_insn.

2015-07-06 Thread Chen Gang
On 7/6/15 20:51, Bernd Schmidt wrote: > On 07/03/2015 04:13 AM, Chen Gang wrote: >> On 07/01/2015 11:27 PM, Chen Gang wrote: >>> On 7/1/15 21:52, Bernd Schmidt wrote: Below is a patch. Can you test this with anything you have beyond the testsuite? >>> >>> It can fix this issue (Bug6

C++ PATCH to template template parm partial instantiation

2015-07-06 Thread Jason Merrill
The concepts work ran into a bug whereby the TEMPLATE_PARM_DECL of a TEMPLATE_TEMPLATE_PARM was missing its DECL_TEMPLATE_RESULT. Looking into this more, I see that when instantiating a template template parameter we end up with two TEMPLATE_DECLs: the main one and another in the TEMPLATE_PARM

C++ PATCH to argument_pack_element_is_expansion_p

2015-07-06 Thread Jason Merrill
In tsubst_pack_expansion, when we don't have fully instantiated arguments we try to do a partial instantiation of the pattern if all the arguments we have are of similar form, for instance if all of them are pack expansions. In one case with concepts we were failing to do that and falling back

Re: [PATCH 2/7] Fix build with CP_DEMANGLE_DEBUG

2015-07-06 Thread Jeff Law
On 07/06/2015 01:33 PM, Mikhail Maltsev wrote: --- libiberty/cp-demangle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 2988b6b..12093cc 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -715,7 +

Re: [PATCH] rtx_costs vs. const_int

2015-07-06 Thread Jeff Law
On 06/14/2015 08:33 PM, Alan Modra wrote: This patch changes the targetm.rtx_costs interface to pass a mode parameter, and removes a redundant parameter. The reason for the change is that powerpc and other backends need the mode that a const_int is used in to properly determine the cost. For in

Re: [PATCH 1/7] Add CHECK_DEMANGLER

2015-07-06 Thread Jeff Law
On 07/06/2015 01:31 PM, Mikhail Maltsev wrote: --- libiberty/cp-demangle.h | 33 +++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/libiberty/cp-demangle.h b/libiberty/cp-demangle.h index 6fce025..c37a91f 100644 --- a/libiberty/cp-demangle.h +++ b/

Re: [PATCH 4/7] Fix int overflow

2015-07-06 Thread Jeff Law
On 07/06/2015 01:36 PM, Mikhail Maltsev wrote: --- libiberty/cp-demangle.c | 3 ++- libiberty/testsuite/demangle-expected | 4 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index 44a0a9b..befa6b6 100644 --- a

Re: [PATCH 5/7] Fix braced-init-list demangling

2015-07-06 Thread Jeff Law
On 07/06/2015 01:37 PM, Mikhail Maltsev wrote: --- libiberty/cp-demangle.c | 2 ++ libiberty/testsuite/demangle-expected | 4 2 files changed, 6 insertions(+) diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index befa6b6..424b1c5 100644 --- a/libiberty/cp-de

RE: [PATCH] MIPS: fix failing branch range checks for micromips

2015-07-06 Thread Moore, Catherine
Hi Andrew, > -Original Message- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Andrew Bennett > Sent: Friday, July 03, 2015 7:50 PM > Subject: [PATCH] MIPS: fix failing branch range checks for micromips > > diff --git a/gcc/testsuite/gcc.targe

Re: [PATCH 4/7] Fix int overflow

2015-07-06 Thread Mikhail Maltsev
On 07.07.2015 1:55, Jeff Law wrote: >> len = d_number (di); >> - if (len <= 0) >> + if (len <= 0 || len > INT_MAX) >> return NULL; >> ret = d_identifier (di, len); >> di->last_name = ret; > Isn't this only helpful if sizeof (long) > sizeof (int)? Otherwise the > compiler is go

Re: fix segfault in verify_flow_info() with -dx option

2015-07-06 Thread Prathamesh Kulkarni
On 6 July 2015 at 12:00, Richard Biener wrote: > On Sun, Jul 5, 2015 at 2:07 PM, Prathamesh Kulkarni > wrote: >> Hi, >> Passing -dx causes segmentation fault: >> Test case: void f(void) {} >> >> ./test.c: In function 'f': >> ../test.c:3:1: internal compiler error: Segmentation fault >> } >> ^ >

RE: [Patch,microblaze]: Optimized usage of reserved stack space for function arguments.

2015-07-06 Thread Ajit Kumar Agarwal
-Original Message- From: Oleg Endo [mailto:oleg.e...@t-online.de] Sent: Monday, July 06, 2015 7:07 PM To: Ajit Kumar Agarwal Cc: GCC Patches; Vinod Kathail; Shail Aditya Gupta; Vidhumouli Hunsigida; Nagaraju Mekala Subject: Re: [Patch,microblaze]: Optimized usage of reserved stack space

[PING 3] Re: [PATCH] warn for unsafe calls to __builtin_return_address

2015-07-06 Thread Martin Sebor
This is a small change to diagnose unsafe calls to __builtin_{frame,return}_address (with an argument > 2) than tend to return bogus values or lead to crashes at runtime. A review would be appreciated. Thanks Martin On 06/26/2015 05:49 PM, Martin Sebor wrote: Is this patch okay for trunk? On

[PR23664] Fold (a & C1) + (b & C2) to (a & C1) | (b & C2) iff (C1 & C2) == 0

2015-07-06 Thread Hurugalawadi, Naveen
Hi, Please find attached the patch "PR23664.patch" that converts the pattern:- (a & C1) + (b & C2) into (a & C1) | (b & C2) iff (C1 & C2) == 0. Please review and let me know if its okay. Regression tested on AARH64 and x86_64. Thanks, Naveen gcc/testsuite/ChangeLog: 2015-07-07 Naveen H.S

[PR25529] Convert (unsigned t * 2)/2 into unsigned (t & 0x7FFFFFFF)

2015-07-06 Thread Hurugalawadi, Naveen
Hi, Please find attached the patch "PR25529.patch" that converts the pattern:- (unsigned * 2)/2 is into unsigned &0x7FFF Please review and let me know if its okay. Regression tested on AARH64 and x86_64. Thanks, Naveen gcc/testsuite/ChangeLog: 2015-07-07 Naveen H.S PR middle-e

[PR25530] Convert (unsigned t / 2) * 2 into (unsigned t & ~1)

2015-07-06 Thread Hurugalawadi, Naveen
Hi, Please find attached the patch PR25530.patch that converts the pattern:- (unsigned / 2) * 2 is into (unsigned & ~1). Please review and let me know if its okay. Regression tested on AARH64 and x86_64. Thanks, Naveen gcc/testsuite/ChangeLog: 2015-07-07 Naveen H.S PR middle-end/2

Re: move a * (1 << b) -> a << b pattern from fold-const.c to match.pd

2015-07-06 Thread Marc Glisse
On Tue, 7 Jul 2015, Prathamesh Kulkarni wrote: +/* a * (1 << b) -> a << b */ +(simplify + (mult:c @a (lshift integer_onep @b)) + (if (!FLOAT_TYPE_P (type)) +(lshift @a @b))) The test FLOAT_TYPE_P seems unnecessary, 'type' is (up to a useless conversion) the result of a shift, so integer

Re: [PR23664] Fold (a & C1) + (b & C2) to (a & C1) | (b & C2) iff (C1 & C2) == 0

2015-07-06 Thread Marc Glisse
On Tue, 7 Jul 2015, Hurugalawadi, Naveen wrote: Please find attached the patch "PR23664.patch" that converts the pattern:- (a & C1) + (b & C2) into (a & C1) | (b & C2) iff (C1 & C2) == 0. We already have the following. I believe it would be better to merge them (use a 'for'). (simplify (bi

Re: [PR25529] Convert (unsigned t * 2)/2 into unsigned (t & 0x7FFFFFFF)

2015-07-06 Thread Marc Glisse
On Tue, 7 Jul 2015, Hurugalawadi, Naveen wrote: Please find attached the patch "PR25529.patch" that converts the pattern:- (unsigned * 2)/2 is into unsigned &0x7FFF +/* Simplify (unsigned t * 2)/2 -> unsigned t & 0x7FFF. */ +(for div (trunc_div ceil_div floor_div round_div exact_div)

<    1   2