Re: [Patch, vrp] Allow VRP type conversion folding only for widenings upto word mode

2015-11-18 Thread Senthil Kumar Selvaraj
On Wed, Nov 18, 2015 at 09:36:21AM +0100, Richard Biener wrote: > On Wed, 18 Nov 2015, Senthil Kumar Selvaraj wrote: > > > On Mon, Nov 16, 2015 at 10:02:15AM +0100, Richard Biener wrote: > > > On Sat, 14 Nov 2015, Senthil Kumar Selvaraj wrote: > > > > > > > On Sat, Nov 14, 2015 at 09:57:40AM +010

Re: PATCH to shorten_compare -Wtype-limits handling

2015-11-18 Thread David Edelsohn
On Wed, Nov 18, 2015 at 11:26 PM, Jason Merrill wrote: > The rs6000 target was hitting a bootstrap failure due to > -Werror=type-limits. Since warn_tautological_cmp and other warnings avoid > warning if one of the operands comes from a macro, I thought it would make > sense to do that here as wel

PATCH to shorten_compare -Wtype-limits handling

2015-11-18 Thread Jason Merrill
The rs6000 target was hitting a bootstrap failure due to -Werror=type-limits. Since warn_tautological_cmp and other warnings avoid warning if one of the operands comes from a macro, I thought it would make sense to do that here as well. Tested that this allows rs6000 bootstrap to proceed, reg

Re: [C++ PATCH] Issue hard error even with -fpermissive for certain goto violations (PR c++/67409)

2015-11-18 Thread Manuel López-Ibáñez
On 18/11/15 22:55, Jakub Jelinek wrote: static bool -identify_goto (tree decl, const location_t *locus) +identify_goto (tree decl, const location_t *locus, bool harderr) { - bool complained = (decl -? permerror (input_location, "jump to label %qD", decl) -

Re: [PATCH AArch64]Handle REG+REG+CONST and REG+NON_REG+CONST in legitimize address

2015-11-18 Thread Bin.Cheng
On Tue, Nov 17, 2015 at 6:08 PM, James Greenhalgh wrote: > On Tue, Nov 17, 2015 at 05:21:01PM +0800, Bin Cheng wrote: >> Hi, >> GIMPLE IVO needs to call backend interface to calculate costs for addr >> expressions like below: >>FORM1: "r73 + r74 + 16380" >>FORM2: "r73 << 2 + r74 + 16380" >

Re: RFC/RFA: Fix bug with REE optimization corrupting extended registers

2015-11-18 Thread Jeff Law
On 11/18/2015 05:52 PM, Bernd Schmidt wrote: (This is on the RL78 target where HImode values occupy two hard registers and QImode values only one. The bug however is generic, not RL78 specific). The REE pass transforms this into: (insn 44 (set (reg:QI r11) (mem:QI (reg:HI r20

Re: [PATCH] Fix memory leaks in tree-ssa-uninit.c

2015-11-18 Thread Bernd Schmidt
On 11/19/2015 01:50 AM, Joseph Myers wrote: I don't think all the reformattings here are things we want to do globally for most source files. While I do appreciate the sentiment behind the patch, I agree with all of Joseph's points. Especially the clearly incorrect changes should be reverted

Re: [PATCH] Fix libcpp ICE (PR preprocessor/60736)

2015-11-18 Thread Jakub Jelinek
On Thu, Nov 19, 2015 at 01:41:52AM +0100, Bernd Schmidt wrote: > On 11/19/2015 12:02 AM, Jakub Jelinek wrote: > >2015-11-18 Jakub Jelinek > > > > PR preprocessor/60736 > > * include/cpplib.h (cpp_errno_filename): New prototype. > > * errors.c (cpp_errno): Don't handle msgid "" specia

Re: RFC/RFA: Fix bug with REE optimization corrupting extended registers

2015-11-18 Thread Bernd Schmidt
(This is on the RL78 target where HImode values occupy two hard registers and QImode values only one. The bug however is generic, not RL78 specific). The REE pass transforms this into: (insn 44 (set (reg:QI r11) (mem:QI (reg:HI r20))) (insn 45 (set (reg:HI r10) (zero_ext

Re: [PATCH] Fix memory leaks in tree-ssa-uninit.c

2015-11-18 Thread Joseph Myers
I don't think all the reformattings here are things we want to do globally for most source files. E.g. > @@ -75,18 +74,17 @@ get_mask_first_set_bit (unsigned mask) > static bool > has_undefined_value_p (tree t) > { > - return (ssa_undefined_value_p (t) > - || (possibly_undefined_nam

Re: [PATCH] Fix libcpp ICE (PR preprocessor/60736)

2015-11-18 Thread Bernd Schmidt
On 11/19/2015 12:02 AM, Jakub Jelinek wrote: 2015-11-18 Jakub Jelinek PR preprocessor/60736 * include/cpplib.h (cpp_errno_filename): New prototype. * errors.c (cpp_errno): Don't handle msgid "" specially, use _(msgid) instead of msgid as argument to cpp_error.

Re: [PATCH, 10/16] Add pass_oacc_kernels pass group in passes.def

2015-11-18 Thread Tom de Vries
On 17/11/15 15:53, Tom de Vries wrote: And the above LIM example is none for why you need two LIM passes... Indeed. I'm planning a separate reply to explain in more detail the need for the two pass_lims. I. I managed to get rid of the two pass_lims for the motivating example that I used unt

[PATCH][PR tree-optimization/68198] Avoid CFG explosion due to threading

2015-11-18 Thread Jeff Law
Jump threading inherently copies blocks on the jump threading path. In the case of all FSM threads (and in one special case in the old threader), those copies have the same number of outgoing edges as the original block. We don't see explosions in the old threader because it's just too weak

Re: PR 68393: Handle SUBREG_PROMOTED_VAR_P in expand_direct_optab_fn

2015-11-18 Thread Bernd Schmidt
On 11/18/2015 05:32 PM, Richard Sandiford wrote: Do the usual dance when assigning to SUBREG_PROMOTED_VAR_P destinations: first convert to the outer mode, then extend to the inner mode. This fixes the powerpc64le bootstrap failure reported in PR 68393. Ok. Bernd

Re: [PATCH] Disable shrink-wrapping for ix86_static_chain_on_stack functions (PR target/67770)

2015-11-18 Thread Bernd Schmidt
On 11/19/2015 12:18 AM, Jakub Jelinek wrote: As the testcase shows, shrink-wrapping is incompatible with ix86_static_chain_on_stack, where we rely on the very first instruction in the (nested) function to be pushl %esi and use alternate entry point right after that pushl instruction (one byte aft

Re: [PATCH] Fix ifcvt one_cmpl_abs optimization (PR rtl-optimization/68376)

2015-11-18 Thread Bernd Schmidt
On 11/18/2015 11:44 PM, Jakub Jelinek wrote: noce_try_abs optimizes these cases normal abs, which doesn't really care if the original condition is x < 0 ? -x : x or x <= 0 ? -x : x, but also the x < 0 ? ~x : x case. But in this case it is significant whether for x == 0 ~x or x applies; the follo

Re: Combined constructs' clause splitting

2015-11-18 Thread Tom de Vries
On 19/11/15 01:03, Cesar Philippidis wrote: On 11/08/2015 07:45 AM, Tom de Vries wrote: On 07/11/15 12:45, Thomas Schwinge wrote: Hi! On Fri, 6 Nov 2015 15:31:23 -0800, Cesar Philippidis wrote: I've applied this patch to gomp-4_0-branch which backports most of my front end changes from trunk

Re: Combined constructs' clause splitting

2015-11-18 Thread Cesar Philippidis
On 11/08/2015 07:45 AM, Tom de Vries wrote: > On 07/11/15 12:45, Thomas Schwinge wrote: >> Hi! >> >> On Fri, 6 Nov 2015 15:31:23 -0800, Cesar Philippidis >> wrote: >>> I've applied this patch to gomp-4_0-branch which backports most of my >>> front end changes from trunk. Note that I found a regres

Re: [PATCH] PR fortran/59910 -- structure constructor in DATA statement

2015-11-18 Thread Steve Kargl
On Wed, Nov 18, 2015 at 11:23:21AM -0800, Steve Kargl wrote: > On Tue, Nov 17, 2015 at 05:01:42PM -0800, Steve Kargl wrote: > > On Tue, Nov 17, 2015 at 04:36:01PM -0800, Steve Kargl wrote: > > > On Wed, Nov 18, 2015 at 12:24:29AM +0100, Dominique d'Humières wrote: > > > > > ??? but I suspect gfc_re

Re: Remove noce_mem_write_may_trap_or_fault_p in ifcvt

2015-11-18 Thread Jeff Law
On 11/18/2015 12:16 PM, Bernd Schmidt wrote: For the current issue I've come to the conclusion that this kind of analysis is irrelevant here (and that is not subject to the problem I'll describe later), because of the use of noce_can_store_speculate. See below. Hmm Ripping out noce_mem_

[PATCH] Transactional Memory: Support __cxa_free_exception and fix exception handling.

2015-11-18 Thread Torvald Riegel
The EH scheme that we had been using for TM / libitm doesn't work properly. We fail to handle throwing exceptions whose constructors may throw themselves. We also do not clean up properly in all situations when a transactions abort while being in the process of throwing an exception. This patch s

[PATCH] Disable shrink-wrapping for ix86_static_chain_on_stack functions (PR target/67770)

2015-11-18 Thread Jakub Jelinek
Hi! As the testcase shows, shrink-wrapping is incompatible with ix86_static_chain_on_stack, where we rely on the very first instruction in the (nested) function to be pushl %esi and use alternate entry point right after that pushl instruction (one byte after the start of the nested function). If

Re: [PATCH] Add clang-format config to contrib folder

2015-11-18 Thread Sebastian Pop
Martin, thanks for getting this patch out. I like the patch. Jeff, clang-format has scripts that allow formatting only the lines touched by a patch. It also has a script to integrate with git: https://llvm.org/svn/llvm-project/cfe/trunk/tools/clang-format/git-clang-format We could use those script

[PATCH] Fix libcpp ICE (PR preprocessor/60736)

2015-11-18 Thread Jakub Jelinek
Hi! In some cases, e.g. when using #include with /usr/include/ not containing that header, open_file_failed is called with NULL file->path; trying to print that doesn't really work, we should use file->name in that case instead. Though in other cases open_file_failed is called with both file->na

[C++ PATCH] Issue hard error even with -fpermissive for certain goto violations (PR c++/67409)

2015-11-18 Thread Jakub Jelinek
Hi! Before Paolo's changes, e.g. identify_goto always used permerror, and then depending on the severity of the issue either issued another permerror describing in detail the issue, or error. In particular, entering scope of a decl with non-trivial dtor has been a permerror, pretty much everything

[PATCH] Fix ifcvt one_cmpl_abs optimization (PR rtl-optimization/68376)

2015-11-18 Thread Jakub Jelinek
Hi! noce_try_abs optimizes these cases normal abs, which doesn't really care if the original condition is x < 0 ? -x : x or x <= 0 ? -x : x, but also the x < 0 ? ~x : x case. But in this case it is significant whether for x == 0 ~x or x applies; the following patch limits the one_cmpl optimizatio

Re: [C PATCH] Don't leak C_MAYBE_CONST_EXPRs into fold() (PR c/68412)

2015-11-18 Thread Joseph Myers
On Wed, 18 Nov 2015, Marek Polacek wrote: > diff --git gcc/c/c-typeck.c gcc/c/c-typeck.c > index c18c307..48c1a98 100644 > --- gcc/c/c-typeck.c > +++ gcc/c/c-typeck.c > @@ -3512,7 +3512,11 @@ parser_build_binary_op (location_t location, enum > tree_code code, > code1, arg

Re: [PATCH 01/02] PR/62314: add ability to add fixit-hints

2015-11-18 Thread David Malcolm
On Wed, 2015-11-18 at 14:57 -0700, Jeff Law wrote: > On 11/10/2015 09:35 AM, David Malcolm wrote: > > This patch adds the ability to add "fix-it hints" to a rich_location, > > which will be displayed when the corresponding diagnostic is printed. > > > > It does not actually add any fix-it hints (th

[Ada] Fix missing layout information in ASIS mode

2015-11-18 Thread Eric Botcazou
We simply fail to recurse into nested packages. Tested on x86_64-suse-linux, applied on the mainline. 2015-11-18 Eric Botcazou * gcc-interface/trans.c (elaborate_all_entities_for_package): New function extracted from... Recurse on packages. (elaborate_all_entities):

Re: Add out-of-line versions of some functions (PR c/65083)

2015-11-18 Thread Jeff Law
On 11/13/2015 03:15 AM, Joseph Myers wrote: PR c/65083 notes that some functions in are normal functions, not generic functions, and so need to have out-of-line copies that can be called when macro expansion is suppressed (unlike the generic functions where DR#419 makes it undefined if you suppr

Re: [PATCH 01/02] PR/62314: add ability to add fixit-hints

2015-11-18 Thread Jeff Law
On 11/10/2015 09:35 AM, David Malcolm wrote: This patch adds the ability to add "fix-it hints" to a rich_location, which will be displayed when the corresponding diagnostic is printed. It does not actually add any fix-it hints (that comes in the second patch), but it adds test coverage of the ma

[Ada] Remove more redundant checks in loops

2015-11-18 Thread Eric Botcazou
This improves the infrastructure present in gigi to remove redundant checks, i.e. checks that can never fail at run time, in loops, either directly or by exposing more opportunities for the GIMPLE optimizers. The patch is large but it also cleans up the GENERIC code generated by gigi, in partic

Re: POWERPC64_TOC_POINTER_ALIGNMENT

2015-11-18 Thread Michael Meissner
On Wed, Nov 18, 2015 at 10:35:36AM -0500, David Edelsohn wrote: > On Tue, Nov 17, 2015 at 9:32 PM, Alan Modra wrote: > > On Tue, Nov 17, 2015 at 07:53:18PM -0500, Michael Meissner wrote: > >> Here is the temporary patch I'm using to get past rs6000.c. But I suspect > >> the > >> TOC alignment sh

[gomp4] backport ptx changes from trunk

2015-11-18 Thread Nathan Sidwell
I've committed this to gomp4 branch. It removes some extraneous pieces from nvptx.c and backports comments and some minor reworking that got applied to trunk. nathan (nvptx_neuter_pars): Backport from trunk. Index: gcc/config/nvptx/nvptx.c ==

[ptx] remove workaround

2015-11-18 Thread Nathan Sidwell
I've committed this to trunk. Primarily it removes code working around the lack of default dimension setting -- I committed the defaulting code a little while ago and missed this piece. Fixed up some whitespace and ARG_UNUSED that I noticed along the way. nathan 2015-11-18 Nathan Sidwell

Debug iterators operator->

2015-11-18 Thread François Dumont
Hi I always wanted to fix those operators implementation so that it just use underlying iterator -> operator like for the other operators. And I also notice the @todo on it today so maybe it is still time to fix those. * include/debug/safe_iterator.h (_Safe_iterator<>::operator->()):

Re: [PATCH] Fix ICE with mangling aliases (PR c++/67354)

2015-11-18 Thread Jason Merrill
On 11/18/2015 03:52 AM, Jakub Jelinek wrote: If changing at_eof for this is too big hack, perhaps we could have a different bool just to affect the mangling aliases (and set it to true in generate_mangling_aliases or so). Let's do that. Jason

[Ada] Enable -fstrict-overflow at all optimization levels

2015-11-18 Thread Eric Botcazou
The Ada compiler generates overflow checks by default (as required by the language) so it makes sense to enable -fstrict-overflow at all optimization levels; this mainly affects -O1 in practice. Tested on x86_64-suse-linux, applied on the mainline. 2015-11-18 Eric Botcazou * gcc-in

[PATCH] Fix declaration of pthread-structs in s-osinte-rtems.ads (ada/68169)

2015-11-18 Thread Jan Sommer
Hello, The paperwork seems to have gone through. Here is the patch again for the 4.9.x, 5.x and trunk respectively. I just pulled the head of the corresponding branches and created a new diff, so it should apply properly. Best regards, JanIndex: gcc/ada/ChangeLog

Re: [patch] FreeBSD x86_64/i386 apply r125920

2015-11-18 Thread Andreas Tobler
On 16.11.15 23:20, Andreas Tobler wrote: Hi all, I'm going to apply the below patch to trunk if there are no objections. There are no regressions. From our pov, we should be in sync with Linux here. Also, I'm going to push this one out to 5.x after one week. Committed on trunk as r230565

Re: [PATCHES, PING*5] Enhance standard DWARF for Ada

2015-11-18 Thread Jason Merrill
On 10/20/2015 04:13 PM, Pierre-Marie de Rodat wrote: Sorry about the slow review on these patches. In future please feel free to ping me as often as once a week. + /* DWARF operations all work on signed integers. Note that this will no longer be the case in DWARF 5, where stack elements

Re: Re: OpenACC declare directive updates

2015-11-18 Thread Cesar Philippidis
On 11/08/2015 08:53 PM, James Norris wrote: > The attached patch and ChangeLog reflect the updates from your > review: https://gcc.gnu.org/ml/gcc-patches/2015-11/msg00714.html > and Cesar's review: > https://gcc.gnu.org/ml/gcc-patches/2015-11/msg00885.html. > > With the changes made in this patch

[nios2, committed] remove duplicates in || expression

2015-11-18 Thread Sandra Loosemore
I've checked in this patch to fix PR 68410. David, thanks for pointing out the think-o here. -Sandra 2015-11-18 Sandra Loosemore PR target/68410 * config/nios2/nios2.c (cdx_and_immed): Remove duplicate tests from || expression. Index: gcc/config/nios2/nios2.c ===

Re: [PATCH] Avoid useless work in loop vectorization

2015-11-18 Thread Alan Lawrence
On 13/11/15 08:41, Richard Biener wrote: Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2015-11-13 Richard Biener * tree-vect-loop.c (vect_analyze_loop_2): Add fatal parameter. Signal fatal failure if early checks fail. (vect_analyze

RE: [gomp4.1] Handle linear clause modifiers in declare simd

2015-11-18 Thread Tian, Xinmin
Yes, I will send the updated version to Jakub when I come back from SC15. I am updating it based on discussion with Jakub. Thanks, Xinmin -Original Message- From: Jakub Jelinek [mailto:ja...@redhat.com] Sent: Wednesday, November 18, 2015 9:41 AM To: Ilya Verbin; Tian, Xinmin Cc: gcc-pa

Re: [PATCH] PR fortran/59910 -- structure constructor in DATA statement

2015-11-18 Thread Steve Kargl
On Tue, Nov 17, 2015 at 05:01:42PM -0800, Steve Kargl wrote: > On Tue, Nov 17, 2015 at 04:36:01PM -0800, Steve Kargl wrote: > > On Wed, Nov 18, 2015 at 12:24:29AM +0100, Dominique d'Humières wrote: > > > > ??? but I suspect gfc_reduce_init_expr() > > > > may be useful for PARAMETER statements as w

Re: [patch, avr] Add new Atmel AVR devices

2015-11-18 Thread Denis Chertykov
2015-11-18 9:36 GMT+03:00 Sivanupandi, Pitchumani : > Attached patch adds new Atmel devices to avr-gcc. > If Ok, could someone commit please? I do not have commit access. > > Regards, > Pitchumani > > gcc/ChangeLog > > 2015-11-18 Pitchumani Sivanupandi > > * config/avr/avr-mcus.def: Add

Re: Remove noce_mem_write_may_trap_or_fault_p in ifcvt

2015-11-18 Thread Bernd Schmidt
Ok, so this is a thorny problem. I thought I had a solution, and I'll start by describing it, but in the end I think it doesn't actually work. On 11/06/2015 10:09 PM, Jeff Law wrote: On 11/06/2015 12:30 PM, Bernd Schmidt wrote: Well, I think if MEM_READONLY_P is insufficient (and I guess peopl

Re: [PATCH] PR fortran/59910 -- structure constructor in DATA statement

2015-11-18 Thread Jerry DeLisle
On 11/17/2015 12:34 PM, Steve Kargl wrote: > Here's what looks like a fairly simple patch, but it leads > to a question. Why does gfortran not try to reduce the > components in a structure constructor in general? I've > hidden the gfc_reduce_init_expr() behind a check for a > DATA statement, but

[PATCH] [4.9] Re: [PATCH][5] Backport ISL 0.15 support

2015-11-18 Thread Matthias Klose
On 12.10.2015 12:58, Richard Biener wrote: This backports the patch to allow bootstrapping with ISL 0.15 to the GCC 5 branch (the GCC 4.9 branch will require backporting of some dependencies). I don't think so. 4.8 and 4.9 don't use as much ISL code as 5 does. I had a look at the backport an

Re: [1/2] OpenACC routine support

2015-11-18 Thread Cesar Philippidis
On 11/10/2015 12:16 AM, Jakub Jelinek wrote: > On Mon, Nov 09, 2015 at 09:28:47PM -0800, Cesar Philippidis wrote: >> Here's the patch that Nathan was referring to. I ended up introducing a >> boolean variable named first in the various functions which call >> finalize_oacc_routines. The problem the

[nvptx] SESE region optimization

2015-11-18 Thread Nathan Sidwell
I've applied this to trunk, it adds the SESE region neutering from the gomp4 branch. The general idea is that when neutering partitioned execution, one can skip from the entry of an SESE region straight to its exit, rather than do each block in the region individually. Finding the regions i

[Ada] Fix ICE on on indirect renaming of address at -O

2015-11-18 Thread Eric Botcazou
Addresses cannot be directly subject to a renaming, but they can nevertheless be renamed through a constant and thus need to be dealt with as other rvalues. Tested on x86_64-suse-linux, applied on the mainline. 2015-11-18 Eric Botcazou * gcc-interface/decl.c (gnat_to_gnu_entity) : Us

[Ada] Fix stack usage increase for renaming of indexed component

2015-11-18 Thread Eric Botcazou
This fixes an oversight in the new fold_constant_decl_in_expr function, which causes the code generated by the compiler for the renaming of an indexed component whose prefix is a constant object and whose index is not to use significantly more stack than needed. Tested on x86_64-suse-linux, app

Re: [gomp4.1] Handle linear clause modifiers in declare simd

2015-11-18 Thread Jakub Jelinek
On Wed, Nov 18, 2015 at 08:30:53PM +0300, Ilya Verbin wrote: > Could you please point to where the new ABI additions are documented? > I can't find R/L/U parameter types in [1] and [2]. > > [1] > https://sourceware.org/glibc/wiki/libmvec?action=AttachFile&do=view&target=VectorABI.txt > [2] https:

Re: [PATCH] Add clang-format config to contrib folder

2015-11-18 Thread Jeff Law
On 11/18/2015 10:34 AM, Manuel López-Ibáñez wrote: Which is a sad demonstration of how the refusal of GCC's FEs being re-used for other purposes by GNU tools (and others) was and is a mistake, and it is leading to GNU tools being replaced by LLVM-based ones (ultimately affecting GCC and GDB them

Re: [PATCH] Add clang-format config to contrib folder

2015-11-18 Thread Manuel López-Ibáñez
On 18/11/15 17:05, Jeff Law wrote: As we've been continuously converting our source base to C++, the clang-format should provide better results than a collection of regular expressions (check_GNU_style.sh). As a reference file I attach gcc/tree-ssa-uninit.c file. Feel free to comment the suggest

Re: [gomp4.1] Handle linear clause modifiers in declare simd

2015-11-18 Thread Ilya Verbin
Hi! On Wed, Jul 01, 2015 at 12:55:38 +0200, Jakub Jelinek wrote: > I've committed following patch, which per the new ABI additions > mangles and handles the various new linear clause modifiers in > declare simd functions. The vectorizer side is not done yet, > > [...] > > @@ -14195,12 +14216,25 @

Re: [PATCH] Add clang-format config to contrib folder

2015-11-18 Thread Jeff Law
On 11/18/2015 07:10 AM, Martin Liška wrote: Hello. Following patch adds a clang-format config file that should respect the GNU coding standards. As the file is not part of build process, I hope the patch can be applied even though we've just skipped to stage3? The patch adds a hunk to Makefile

Re: [PATCH, VECTOR ABI] Add __attribute__((__simd__)) to GCC.

2015-11-18 Thread Jeff Law
On 11/18/2015 07:11 AM, Kirill Yukhin wrote: Hello Andreas, Devid. On 18 Nov 10:45, Andreas Schwab wrote: Kirill Yukhin writes: diff --git a/gcc/testsuite/c-c++-common/attr-simd.c b/gcc/testsuite/c-c++-common/attr-simd.c new file mode 100644 index 000..b4eda34 --- /dev/null +++ b/gcc/te

Re: [PATCH] Fix memory leaks in tree-ssa-uninit.c

2015-11-18 Thread Jeff Law
On 11/18/2015 07:23 AM, Martin Liška wrote: On 11/13/2015 08:19 PM, Jeff Law wrote: On 11/13/2015 09:58 AM, Martin Liška wrote: On 11/13/2015 05:32 PM, Jeff Law wrote: On 11/13/2015 05:50 AM, Martin Liška wrote: Hello. Patch survives regbootstrap on x86_64-linux-gnu. Ready for trunk? Thanks

Re: [C PATCH] Don't leak C_MAYBE_CONST_EXPRs into fold() (PR c/68412)

2015-11-18 Thread Marek Polacek
On Wed, Nov 18, 2015 at 05:24:34PM +0100, Bernd Schmidt wrote: > That seems to change the behaviour of the code though. Most of the code in > warn_tautological_cmp only looks at the unfolded form. Are you sure this is > safe, for example wrt. the from_macro_expansion_at tests or the > CONVERT_EXPR_

Re: [Patch,testsuite]: Fix the tree-ssa/split-path-1.c testcase

2015-11-18 Thread Jeff Law
On 11/18/2015 07:21 AM, Ajit Kumar Agarwal wrote: Hello Jeff: Please ignore my previous mails as they bounced back. Sorry for that. I have fixed the problem with the testcase. The splitting path optimization remains intact. Attached is the patch. The problem was related to the testcase as th

Re: [PATCH 1/4 v2][AArch64] Generalize CCMP support

2015-11-18 Thread Bernd Schmidt
On 11/17/2015 07:35 PM, Wilco Dijkstra wrote: I've updated the comments and documentation, see below. I hope it makes sense now - returning rtx that computes the same value as the tree expression we're emitting is the most useful thing one can do. The target-independent part is ok. Note that s

PR 68393: Handle SUBREG_PROMOTED_VAR_P in expand_direct_optab_fn

2015-11-18 Thread Richard Sandiford
Do the usual dance when assigning to SUBREG_PROMOTED_VAR_P destinations: first convert to the outer mode, then extend to the inner mode. This fixes the powerpc64le bootstrap failure reported in PR 68393. Tested that it fixes the powerpc64le-linux-gnu breakage. Also tested on x86_64-linux-gnu and

[PATCH 4/4 v2][AArch64] Cost CCMP instruction sequences to choose better expand order

2015-11-18 Thread Wilco Dijkstra
(v2 cleans up enum use) This patch adds CCMP selection based on rtx costs. This is based on Jiong's already approved patch https://gcc.gnu.org/ml/gcc-patches/2015-09/msg01434.html with some minor refactoring and enum cleanup plus the tests updated. OK for commit? ChangeLog: 2015-11-13 Jiong Wan

[PATCH 2/4 v2][AArch64] Add support for FCCMP

2015-11-18 Thread Wilco Dijkstra
(v2 version removes 4 enums) This patch adds support for FCCMP. This is trivial with the new CCMP representation - remove the restriction of FP in ccmp.c and add FCCMP patterns. Add a test to ensure FCCMP/FCCMPE are emitted as expected. OK for commit? ChangeLog: 2015-11-18 Wilco Dijkstra

Re: teach delay folding in c++ about OACC_LOOPs

2015-11-18 Thread Nathan Sidwell
On 11/18/15 10:14, Cesar Philippidis wrote: Jason, Your recent delay folding patch broke libgomp.oacc-c++/loop-auto-1.c. It looks like you forgot to handle OACC_LOOP in cp_fold_r. You probably didn't notice this because Nathan committed his auto acc loop patch just before you applied your patch.

RE: [PATCH 1/4 v2][AArch64] Generalize CCMP support

2015-11-18 Thread Wilco Dijkstra
Bernd Schmidt wrote: > Sent: 17 November 2015 22:16 > To: Wilco Dijkstra; gcc-patches@gcc.gnu.org > Subject: Re: [PATCH 1/4][AArch64] Generalize CCMP support > > On 11/13/2015 05:02 PM, Wilco Dijkstra wrote: > > * gcc/ccmp.c (expand_ccmp_expr): Extract cmp_code from return > value > > of > >

Re: [C PATCH] Don't leak C_MAYBE_CONST_EXPRs into fold() (PR c/68412)

2015-11-18 Thread Bernd Schmidt
On 11/18/2015 05:16 PM, Marek Polacek wrote: Actually, no, I think we should do this instead. +++ gcc/c-family/c-common.c @@ -1924,7 +1924,7 @@ warn_tautological_cmp (location_t loc, enum tree_code code, tree lhs, tree rhs) /* We do not warn for constants because they are typical of macro

Re: [PATCH, 10/16] Add pass_oacc_kernels pass group in passes.def

2015-11-18 Thread Bernhard Reutner-Fischer
On November 18, 2015 9:30:23 AM GMT+01:00, Richard Biener wrote: >On Tue, 17 Nov 2015, Tom de Vries wrote: > >> On 17/11/15 16:18, Richard Biener wrote: >> > > > IMHO autopar needs to handle induction itself. >> > > > >> > > >I'm not sure what you mean. Could you elaborate? Autopar >handles >> >

Re: [C PATCH] Don't leak C_MAYBE_CONST_EXPRs into fold() (PR c/68412)

2015-11-18 Thread Marek Polacek
On Wed, Nov 18, 2015 at 05:03:48PM +0100, Marek Polacek wrote: > Since C++ delayed folding, warn_tautological_cmp needs to fold its arguments. > But sometimes this function gets C_MAYBE_CONST_EXPR from the C FE, and fold() > duly ICEs. > > I was torn if I should just return from warn_tautological_

[C PATCH] Don't leak C_MAYBE_CONST_EXPRs into fold() (PR c/68412)

2015-11-18 Thread Marek Polacek
Since C++ delayed folding, warn_tautological_cmp needs to fold its arguments. But sometimes this function gets C_MAYBE_CONST_EXPR from the C FE, and fold() duly ICEs. I was torn if I should just return from warn_tautological_cmp and not warn when it gets C_MAYBE_CONST_EXPR as an argument, or if I

Re: [PATCH PR52272]Be smart when adding iv candidates

2015-11-18 Thread Bernd Schmidt
On 11/10/2015 11:19 AM, Bin.Cheng wrote: On Tue, Nov 10, 2015 at 6:06 PM, Bernd Schmidt wrote: Multi-line expressions should be wrapped in parentheses so that emacs/indent can format them automatically. Two sets of parens are needed for this. Operators should then line up appropriately. Ah, t

Re: [PATCH][ARM] Do not expand movmisalign pattern if not in 32-bit mode

2015-11-18 Thread Kyrill Tkachov
Ping. https://gcc.gnu.org/ml/gcc-patches/2015-11/msg01392.html Thanks, Kyrill On 11/11/15 16:10, Kyrill Tkachov wrote: Hi all, The attached testcase ICEs when compiled with -march=armv6k -mthumb -Os or any march for which -mthumb gives Thumb1: error: unrecognizable insn: } ^ (insn 13 12 14

Re: POWERPC64_TOC_POINTER_ALIGNMENT

2015-11-18 Thread David Edelsohn
On Tue, Nov 17, 2015 at 9:32 PM, Alan Modra wrote: > On Tue, Nov 17, 2015 at 07:53:18PM -0500, Michael Meissner wrote: >> Here is the temporary patch I'm using to get past rs6000.c. But I suspect >> the >> TOC alignment should never be 256. > > Yes, it should be. Recent GNU ld aligns .TOC. to a

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

2015-11-18 Thread Eric Botcazou
> Ah. I think the patch is good and we should reflect this in the > documentation. OK, will do, thanks. -- Eric Botcazou

Re: [PATCH][ARM] PR 68149 Fix ICE in unaligned_loaddi split

2015-11-18 Thread Kyrill Tkachov
Ping. https://gcc.gnu.org/ml/gcc-patches/2015-11/msg01253.html Thanks, Kyrill On 10/11/15 17:32, Kyrill Tkachov wrote: Hi all, This ICE in this PR occurs when we're trying to split unaligned_loaddi into two SImode unaligned loads. The problem is in the addressing mode. When reload was pickin

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

2015-11-18 Thread Richard Biener
On Wed, Nov 18, 2015 at 3:28 PM, Eric Botcazou wrote: >> Looks good to me. I also found the Arrays of Variable Length section >> in extend.texi which also refers to alloca as doing the same. We may >> want to add a note there that you should not mix both and that only >> VLAs (when not mixed wit

Re: libgomp: Compile-time error for non-portable gomp_mutex_t initialization

2015-11-18 Thread Ilya Verbin
On Fri, Sep 25, 2015 at 17:28:25 +0200, Jakub Jelinek wrote: > On Fri, Sep 25, 2015 at 05:04:47PM +0200, Thomas Schwinge wrote: > > On Thu, 26 Mar 2015 23:41:30 +0300, Ilya Verbin wrote: > > > On Thu, Mar 26, 2015 at 13:09:19 +0100, Jakub Jelinek wrote: > > > > the current code is majorly broken.

Re: [gomp4] OpenACC async clause regressions

2015-11-18 Thread Tom de Vries
On 22/10/15 20:27, Thomas Schwinge wrote: diff --cc libgomp/testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c index d478ce2,22cef6d..f3b490a --- libgomp/testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c +++ libgomp/testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c @@@ -1,4 -1,4 +1,6 @@@ /* { d

teach delay folding in c++ about OACC_LOOPs

2015-11-18 Thread Cesar Philippidis
Jason, Your recent delay folding patch broke libgomp.oacc-c++/loop-auto-1.c. It looks like you forgot to handle OACC_LOOP in cp_fold_r. You probably didn't notice this because Nathan committed his auto acc loop patch just before you applied your patch. I'm not sure why only that test is affected t

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-11-18 Thread Richard Biener
On Wed, Nov 18, 2015 at 3:04 PM, Richard Biener wrote: > On Sat, Nov 14, 2015 at 2:15 AM, Kugan > wrote: >> >> Attached is the latest version of the patch. With the patches >> 0001-Add-new-SEXT_EXPR-tree-code.patch, >> 0002-Add-type-promotion-pass.patch and >> 0003-Optimize-ZEXT_EXPR-with-tree-vr

Re: [PATCH] Add clang-format config to contrib folder

2015-11-18 Thread Markus Trippelsdorf
On 2015.11.18 at 15:37 +0100, Markus Trippelsdorf wrote: > On 2015.11.18 at 15:10 +0100, Martin Liška wrote: > > Hello. > > > > Following patch adds a clang-format config file that should respect the GNU > > coding standards. > > As the file is not part of build process, I hope the patch can be a

Re: [PATCH] Add clang-format config to contrib folder

2015-11-18 Thread Markus Trippelsdorf
On 2015.11.18 at 15:10 +0100, Martin Liška wrote: > Hello. > > Following patch adds a clang-format config file that should respect the GNU > coding standards. > As the file is not part of build process, I hope the patch can be applied > even though > we've just skipped to stage3? The patch adds

[PATCH] S/390: Clobber r1 in patterns resulting in pfpo instruction.

2015-11-18 Thread Dominik Vogt
The attached patch fixes the S/390 patterns using the "pfpo" instruction in s390.md. The instructions clobber r1, but the patterns did not reflect that. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany gcc/ChangeLog * config/s390/s390.md (GPR1_REGNUM): New constant. ("*trunc

[committed] PR 68406: Avoid problem with older host compilers

2015-11-18 Thread Richard Sandiford
Older compilers require the Key typedef to be expanded for the traversal function templates. This patch uses the same approach as we did for hash_map. Tested on x86_64-linux-gnu and applied as obvious (given the previous hash_map patch). Sorry for the breakage. Richard gcc/ PR bootstr

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

2015-11-18 Thread Eric Botcazou
> Looks good to me. I also found the Arrays of Variable Length section > in extend.texi which also refers to alloca as doing the same. We may > want to add a note there that you should not mix both and that only > VLAs (when not mixed with alloca) are freed at scope boundary. It's already there

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

2015-11-18 Thread Ajit Kumar Agarwal
-Original Message- From: Tom de Vries [mailto:tom_devr...@mentor.com] Sent: Wednesday, November 18, 2015 1:14 PM To: Jeff Law; Richard Biener Cc: Ajit Kumar Agarwal; GCC Patches; Vinod Kathail; Shail Aditya Gupta; Vidhumouli Hunsigida; Nagaraju Mekala Subject: Re: [Patch,tree-optimizati

Re: [PATCH] Fix memory leaks in tree-ssa-uninit.c

2015-11-18 Thread Martin Liška
On 11/13/2015 08:19 PM, Jeff Law wrote: > On 11/13/2015 09:58 AM, Martin Liška wrote: >> On 11/13/2015 05:32 PM, Jeff Law wrote: >>> On 11/13/2015 05:50 AM, Martin Liška wrote: Hello. Patch survives regbootstrap on x86_64-linux-gnu. Ready for trunk? Thanks, Martin

RE: [Patch,testsuite]: Fix the tree-ssa/split-path-1.c testcase

2015-11-18 Thread Ajit Kumar Agarwal
Hello Jeff: Please ignore my previous mails as they bounced back. Sorry for that. I have fixed the problem with the testcase. The splitting path optimization remains intact. Attached is the patch. The problem was related to the testcase as the loop bound goes beyond the malloced array. There

RFC/RFA: Fix bug with REE optimization corrupting extended registers

2015-11-18 Thread Nick Clifton
Hi Guys, I recently discovered a bug in the current Redundant Extension Elimination optimization. If the candidate extension instruction increases the number of hard registers used, the pass does not check to see if these extra registers are live between the definition and the extension

Re: [PATCH, VECTOR ABI] Add __attribute__((__simd__)) to GCC.

2015-11-18 Thread Kirill Yukhin
Hello Andreas, Devid. On 18 Nov 10:45, Andreas Schwab wrote: > Kirill Yukhin writes: > > > diff --git a/gcc/testsuite/c-c++-common/attr-simd.c > > b/gcc/testsuite/c-c++-common/attr-simd.c > > new file mode 100644 > > index 000..b4eda34 > > --- /dev/null > > +++ b/gcc/testsuite/c-c++-common/

[PATCH] Add clang-format config to contrib folder

2015-11-18 Thread Martin Liška
Hello. Following patch adds a clang-format config file that should respect the GNU coding standards. As the file is not part of build process, I hope the patch can be applied even though we've just skipped to stage3? The patch adds a hunk to Makefile which can create symlink to the root directo

Re: [0/7] Type promotion pass and elimination of zext/sext

2015-11-18 Thread Richard Biener
On Sat, Nov 14, 2015 at 2:15 AM, Kugan wrote: > > Attached is the latest version of the patch. With the patches > 0001-Add-new-SEXT_EXPR-tree-code.patch, > 0002-Add-type-promotion-pass.patch and > 0003-Optimize-ZEXT_EXPR-with-tree-vrp.patch. > > I did bootstrap on ppc64-linux-gnu, aarch64-linux-gn

[Ada] Crahs on indexing operation with named associations

2015-11-18 Thread Arnaud Charlet
This patch fixes a crash on a variable indexing operation appearing on the left-hand side of an assignment, when the index expressions are given by parameter associations. The following must compile quietly: gcc -c -gnatct test_indexing.adb --- with Ada.Text_IO; use Ada.Text_IO; with Project;

[Ada] Make System.String_Hash available through GNAT.String_Hash

2015-11-18 Thread Arnaud Charlet
System.String_Hash provides a generic hash function that can be generally useful outside standard containers. This change make it available for users through a new renaming package: GNAT.String_Hash. Tested on x86_64-pc-linux-gnu, committed on trunk 2015-11-18 Pierre-Marie de Rodat *

[Ada] Freezing of contracts, Part_Of and current instance of a concurrent type

2015-11-18 Thread Arnaud Charlet
This patch addresses several areas: The freezing of contracts has been enhanced. A body continues to freeze the contract of the nearest enclosing package and now freezes the contracts of all eligible constructs in the same declarative list that precede the body. A concurrent constituent is no lon

[PTX] OpenACC complex double reductions

2015-11-18 Thread Nathan Sidwell
Here's the version of the complex double reduction patch I've committed to trunk. There's no atomic cmp&swap larger than 64 bits, so we have to do something else. I started with a patch to synthesize such an operation using a global lock, and fitted it into the current scheme. But that (a)

Re: [PATCH, PR tree-optimization/68327] Compute vectype for live phi nodes when copmputing VF

2015-11-18 Thread Ilya Enkovich
2015-11-18 16:44 GMT+03:00 Richard Biener : > On Wed, Nov 18, 2015 at 12:34 PM, Ilya Enkovich > wrote: >> Hi, >> >> When we compute vectypes we skip non-relevant phi nodes. But we process >> non-relevant alive statements and thus may need vectype of non-relevant live >> phi node to compute mas

  1   2   >