Re: [wwwdocs] GCC 6 Release Notes for RTEMS

2015-09-15 Thread Sebastian Huber
I checked this in. On 15/09/15 09:49, Sebastian Huber wrote: I think there are some head lines missing: Index: htdocs/gcc-6/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-6/changes.html,v retrieving revision 1.29 diff -u -r

[PATCH][PING][C++] Fix PR67333

2015-09-15 Thread Mikhail Maltsev
Ping. On 08/27/2015 09:27 PM, Mikhail Maltsev wrote: > Hi. > This patch fixes a rejects-valid bug related to volatile-qualified arguments > of > constexpr functions. This is essentially a one-line change in constexpr.c. > Bootstrapped and regtested on x86_64-pc-linux-gnu. OK for trunk? > > gcc/c

Re: [PATCH] [ping] Use single shared memory block pool for all pool allocators

2015-09-15 Thread Mikhail Maltsev
On 08/31/2015 02:44 PM, Richard Biener wrote: > Apart from Richards comments: > > +/* Return UNCAST_BLOCK to pool. */ > +inline void > +memory_block_pool::remove (void *uncast_block) > +{ > + block_list *block = reinterpret_cast (uncast_block); > + block->m_next = instance.m_blocks; > + instan

[PATCH] shrink-wrap: Fix up partitions (PR67587)

2015-09-15 Thread Segher Boessenkool
With the new shrink-wrap algorithm, blocks reachable both with and without prologue are duplicated, and their incoming edges are then distributed accordingly. So we need to call fixup_partitions. Is this okay for trunk? Segher 2015-09-16 Segher Boessenkool PR bootstrap/67587

Go patch committed: Avoid compiler crash on initialization error

2015-09-15 Thread Ian Lance Taylor
This patch by Chris Manghane to the Go frontend avoids a compiler crash on an initialization error involving builtin functions. This fixes https://golang.org/issue/12319 . Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE ==

Re: dejagnu version update?

2015-09-15 Thread Mike Stump
On Sep 15, 2015, at 1:04 PM, Jeff Law wrote: > Given we haven't updated the dejagnu reqs since ~2001, I think stepping > forward would be appropriate and I'd support moving all the way to 1.5.3 with > the expectation that we'll be on a cadence of no faster than 2 years going > forward. So, I a

Re: debug mode symbols cleanup

2015-09-15 Thread Jonathan Wakely
On 14/09/15 20:26 +0200, François Dumont wrote: On 08/09/2015 22:47, François Dumont wrote: On 07/09/2015 13:03, Jonathan Wakely wrote: On 05/09/15 22:53 +0200, François Dumont wrote: I remember Paolo saying once that we were not guarantiing any abi compatibility for debug mode. I haven't f

Re: [PATCH 1/2] xtensa: fix TLS calls for call0 ABI

2015-09-15 Thread Max Filippov
On Tue, Sep 15, 2015 at 9:21 PM, augustine.sterl...@gmail.com wrote: > On Tue, Sep 15, 2015 at 3:00 AM, Max Filippov wrote: >> 2015-09-15 Max Filippov >> gcc/ >> * config/xtensa/xtensa.c (xtensa_call_tls_desc): Use a10 or a2 >> to pass TLS call argument, according to current AB

Re: Merge from trunk to gccgo branch

2015-09-15 Thread Ian Lance Taylor
On Tue, Sep 15, 2015 at 11:55 AM, Ian Lance Taylor wrote: > I merged trunk revision 227802 to the gccgo branch. And again, from revision 227811. Ian

libgo patch committed: Use -fno-split-stack for Go if linker doesn't support split-stack

2015-09-15 Thread Ian Lance Taylor
Another patch for libgo with an old linker: if the compiler supports -fsplit-stack but the linker does not, then we need to explicitly compile the Go code with -fno-split-stack. Otherwise the linker will complain when linking libgo.so. This patch fixes the problem. Bootstrapped on x86_64-unknown-

Re: dejagnu version update?

2015-09-15 Thread Bernhard Reutner-Fischer
On September 15, 2015 10:05:27 PM GMT+02:00, Jeff Law wrote: >On 09/15/2015 01:21 PM, David Malcolm wrote: >> On Tue, 2015-09-15 at 10:39 -0700, Mike Stump wrote: >>> On Sep 14, 2015, at 3:37 PM, Jeff Law wrote: > Maybe GCC-6 can bump the required > dejagnu version to allow for getting ri

Re: [PATCH, rs6000] Use hardware support for vector character multiply

2015-09-15 Thread Bill Schmidt
On Tue, 2015-09-15 at 13:29 -0700, Andrew Pinski wrote: > On Tue, Sep 15, 2015 at 6:58 AM, Richard Biener > wrote: > > On Thu, Sep 3, 2015 at 5:32 PM, Bill Schmidt > > wrote: > >> On Thu, 2015-09-03 at 23:26 +0800, Andrew Pinski wrote: > >>> On Thu, Sep 3, 2015 at 11:20 PM, Bill Schmidt > >>> wr

Re: [PATCH, rs6000] Use hardware support for vector character multiply

2015-09-15 Thread Andrew Pinski
On Tue, Sep 15, 2015 at 6:58 AM, Richard Biener wrote: > On Thu, Sep 3, 2015 at 5:32 PM, Bill Schmidt > wrote: >> On Thu, 2015-09-03 at 23:26 +0800, Andrew Pinski wrote: >>> On Thu, Sep 3, 2015 at 11:20 PM, Bill Schmidt >>> wrote: >>> > Hi, >>> > >>> > It was pointed out to me recently that mult

Re: dejagnu version update?

2015-09-15 Thread Jeff Law
On 09/15/2015 01:21 PM, David Malcolm wrote: On Tue, 2015-09-15 at 10:39 -0700, Mike Stump wrote: On Sep 14, 2015, at 3:37 PM, Jeff Law wrote: Maybe GCC-6 can bump the required dejagnu version to allow for getting rid of all these superfluous load_gcc_lib? *blink* :) I'd support that as a dir

Re: dejagnu version update?

2015-09-15 Thread Jeff Law
On 09/15/2015 01:23 PM, Bernhard Reutner-Fischer wrote: On September 15, 2015 7:39:39 PM GMT+02:00, Mike Stump wrote: On Sep 14, 2015, at 3:37 PM, Jeff Law wrote: Maybe GCC-6 can bump the required dejagnu version to allow for getting rid of all these superfluous load_gcc_lib? *blink* :) I'd

Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack

2015-09-15 Thread Ian Lance Taylor
On Tue, Sep 15, 2015 at 11:24 AM, Lynn A. Boger wrote: > > I need some feedback on whether to enable the gold linker at > all for split stack on platforms other than Power in gcc/configure.ac. > I don't know if there are gold linker versions that should be verified for > non-Power platforms. My f

Re: [PATCH] PR28901 -Wunused-variable ignores unused const initialised variables

2015-09-15 Thread Joseph Myers
timezone/private.h comes verbatim from the tzcode project and should not be modified locally in glibc. -- Joseph S. Myers jos...@codesourcery.com

Re: dejagnu version update?

2015-09-15 Thread Bernhard Reutner-Fischer
On September 15, 2015 7:39:39 PM GMT+02:00, Mike Stump wrote: >On Sep 14, 2015, at 3:37 PM, Jeff Law wrote: >>> Maybe GCC-6 can bump the required >>> dejagnu version to allow for getting rid of all these superfluous >>> load_gcc_lib? *blink* :) >> I'd support that as a direction. >> >> Certainl

Re: dejagnu version update?

2015-09-15 Thread David Malcolm
On Tue, 2015-09-15 at 10:39 -0700, Mike Stump wrote: > On Sep 14, 2015, at 3:37 PM, Jeff Law wrote: > >> Maybe GCC-6 can bump the required > >> dejagnu version to allow for getting rid of all these superfluous > >> load_gcc_lib? *blink* :) > > I'd support that as a direction. > > > > Certainly dr

Re: [PATCH] PR28901 -Wunused-variable ignores unused const initialised variables

2015-09-15 Thread Mark Wielaard
On Tue, 2015-09-15 at 20:33 +0200, Mark Wielaard wrote: > I build glibc and found 9 unused variables. They all look like they are > really not used in the code, so they can all just be removed. Someone of > course should double check they aren't unused by accident before > committing upstream. For

Merge from trunk to gccgo branch

2015-09-15 Thread Ian Lance Taylor
I merged trunk revision 227802 to the gccgo branch. Ian

Re: [PATCH] PR28901 -Wunused-variable ignores unused const initialised variables

2015-09-15 Thread Mark Wielaard
On Tue, 2015-09-15 at 10:20 -0700, Steve Ellcey wrote: > On Tue, 2015-09-15 at 19:10 +0200, Jakub Jelinek wrote: > > On Tue, Sep 15, 2015 at 10:02:15AM -0700, Steve Ellcey wrote: > > > I am not sure I like this change. It broke the GLIBC build for me on > > > MIPS. Basically GLIBC has a header fi

Re: [C++] Coding rule enforcement

2015-09-15 Thread Jason Merrill
On 09/15/2015 01:20 PM, Manuel López-Ibáñez wrote: On 15/09/15 15:26, Richard Biener wrote: On Tue, Sep 15, 2015 at 3:02 PM, Nathan Sidwell wrote: Jason, somme of our customers have 'interesting' C++ coding rules, they'd like to have the compiler enforced. They want to disable: 1) namespace

Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack

2015-09-15 Thread Lynn A. Boger
I will make the changes Ian suggested to gospec.c and was planning to fix the sed string in gcc/configure.ac as David suggested. I need some feedback on whether to enable the gold linker at all for split stack on platforms other than Power in gcc/configure.ac. I don't know if there are gold linke

Re: [PATCH 2/2] xtensa: fix xtensa_fallback_frame_state for call0 ABI

2015-09-15 Thread augustine.sterl...@gmail.com
On Tue, Sep 15, 2015 at 3:00 AM, Max Filippov wrote: > 2015-09-15 Max Filippov > gcc/ > * config/xtensa/xtensa.h (DWARF_ALT_FRAME_RETURN_COLUMN): New > definition. > (DWARF_FRAME_REGISTERS): Reserve space for one extra register in > call0 ABI. > > libgcc/ >

Re: [PATCH 1/2] xtensa: fix TLS calls for call0 ABI

2015-09-15 Thread augustine.sterl...@gmail.com
On Tue, Sep 15, 2015 at 3:00 AM, Max Filippov wrote: > 2015-09-15 Max Filippov > gcc/ > * config/xtensa/xtensa.c (xtensa_call_tls_desc): Use a10 or a2 > to pass TLS call argument, according to current ABI. > * config/xtensa/xtensa.md (tls_call pattern): Use callx8 or Ap

Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack

2015-09-15 Thread David Edelsohn
On Thu, Aug 27, 2015 at 5:00 PM, Lynn A. Boger wrote: > Here is an updated patch, with a summary of the differences from my previous > patch: > > - In my previous patch gcc configure was verifying the gold linker even if > it was the > default linker, but that is not necessary since in that case -

[PATCH, i386]: Fix PR 67484, asan detects heap-use-after-free with target options

2015-09-15 Thread Uros Bizjak
Hello! As mentioned in the PR, ix86_valid_target_attribute_tree creates temporary copies of current options strings and saves *pointers* to these copies with build_target_option_node. A couple of lines below, these temporary copies are freed, leaving dangling pointers in the saved structure. Use

[PATCH, alpha]: Fix alpha bootstrap failure due to -Werror=shift-negative-value

2015-09-15 Thread Uros Bizjak
2015-09-15 Uros Bizjak * config/alpha/alpha.c (alpha_expand_block_clear): Use HOST_WIDE_INT_M1U instead of ~(HOST_WIDE_INT)0 when shifting. Bootstrapped and regression tested on alpha-linux-gnu. Committed to mainline SVN. Uros. Index: config/alpha/alpha.c

Re: [patch] Get rid of useless EH cleanups at -O0

2015-09-15 Thread Eric Botcazou
> Played with this a bit, this appears to be fine. Thanks. To answer your earlier question, the first part of the patch is only for debugging: this will e.g. prevent multiple breakpoints from being set by the debugger when there are more than 2 non-EH paths. -- Eric Botcazou

dejagnu version update?

2015-09-15 Thread Mike Stump
On Sep 14, 2015, at 3:37 PM, Jeff Law wrote: >> Maybe GCC-6 can bump the required >> dejagnu version to allow for getting rid of all these superfluous >> load_gcc_lib? *blink* :) > I'd support that as a direction. > > Certainly dropping the 2001 version from our website in favor of 1.5 (which >

Re: [C PATCH] Better diagnostics for missing struct/union (PR c/67580)

2015-09-15 Thread Marek Polacek
On Tue, Sep 15, 2015 at 11:26:03AM -0600, Martin Sebor wrote: > On 09/15/2015 10:52 AM, Marek Polacek wrote: > >Currently, when one writes a code that is missing the struct/union/enum > >tag, we get less than ideal error message. The following patch improves > >the situation a bit by giving a hint

Re: [C PATCH] Better diagnostics for missing struct/union (PR c/67580)

2015-09-15 Thread Martin Sebor
On 09/15/2015 10:52 AM, Marek Polacek wrote: Currently, when one writes a code that is missing the struct/union/enum tag, we get less than ideal error message. The following patch improves the situation a bit by giving a hint to the user. I can't count the number of times I've made this mistak

Re: [C++] Coding rule enforcement

2015-09-15 Thread Manuel López-Ibáñez
On 15/09/15 15:26, Richard Biener wrote: On Tue, Sep 15, 2015 at 3:02 PM, Nathan Sidwell wrote: Jason, somme of our customers have 'interesting' C++ coding rules, they'd like to have the compiler enforced. They want to disable: 1) namespace definitions 2) template declarations 3) multiple inh

Re: [PATCH] PR28901 -Wunused-variable ignores unused const initialised variables

2015-09-15 Thread Steve Ellcey
On Tue, 2015-09-15 at 19:10 +0200, Jakub Jelinek wrote: > On Tue, Sep 15, 2015 at 10:02:15AM -0700, Steve Ellcey wrote: > > I am not sure I like this change. It broke the GLIBC build for me on > > MIPS. Basically GLIBC has a header file with initialized static > > constant globals (sysdeps/ieee75

Re: [PATCH] PR28901 -Wunused-variable ignores unused const initialised variables

2015-09-15 Thread Joseph Myers
On Tue, 15 Sep 2015, Steve Ellcey wrote: > I am not sure I like this change. It broke the GLIBC build for me on > MIPS. Basically GLIBC has a header file with initialized static > constant globals (sysdeps/ieee754/dbl-64/atnat2.h contains tqpi1 and > qpi1) and that header file is included in mul

Re: [PATCH] PR28901 -Wunused-variable ignores unused const initialised variables

2015-09-15 Thread Jakub Jelinek
On Tue, Sep 15, 2015 at 10:02:15AM -0700, Steve Ellcey wrote: > I am not sure I like this change. It broke the GLIBC build for me on > MIPS. Basically GLIBC has a header file with initialized static > constant globals (sysdeps/ieee754/dbl-64/atnat2.h contains tqpi1 and > qpi1) and that header fil

Re: [C PATCH] Better diagnostics for missing struct/union (PR c/67580)

2015-09-15 Thread Joseph Myers
On Tue, 15 Sep 2015, Marek Polacek wrote: > Currently, when one writes a code that is missing the struct/union/enum > tag, we get less than ideal error message. The following patch improves > the situation a bit by giving a hint to the user. > > I couldn't use lookup_tag as that gives the "defin

libgo patch committed: check linking split-stack and non-split-stack together

2015-09-15 Thread Ian Lance Taylor
Mainline GCC and gold now support -fsplit-stack for PPC. This means that if you are using mainline GCC with an old version of gold, and you compile with -fsplit-stack, and there is split-stack code that calls non-split-stack code, then gold will give an error because it doesn't know how to handle

[PATCH] More class-ification of DOM

2015-09-15 Thread Jeff Law
This turns the available expression structures into a class. To recap the goal is to be able to pass that class into the threader so the threader can manipulate the tables in well defined ways ultimately allowing us to resolve PR47679. This patch turns expr_hash_elt into a class and introdu

Re: [PATCH] PR28901 -Wunused-variable ignores unused const initialised variables

2015-09-15 Thread Steve Ellcey
On Mon, 2015-09-14 at 09:50 +0200, Bernd Schmidt wrote: > On 09/13/2015 08:24 PM, Mark Wielaard wrote: > > commit 97505bd0e4ac15d86c2a302cfebc5f1a4fc2c2e8 > > Author: Mark Wielaard > > Date: Fri Sep 11 23:54:15 2015 +0200 > > > > PR28901 -Wunused-variable ignores unused const initialised var

Re: [PATCH 01/22] Change of location_get_source_line signature

2015-09-15 Thread David Malcolm
On Mon, 2015-09-14 at 13:26 -0600, Jeff Law wrote: > On 09/10/2015 02:28 PM, David Malcolm wrote: > > location_get_source_line takes an expanded_location, but the column > > is irrelevant; it just needs a filename and line number. > > > > This change is used by, but independent of, the new implemen

[C PATCH] Better diagnostics for missing struct/union (PR c/67580)

2015-09-15 Thread Marek Polacek
Currently, when one writes a code that is missing the struct/union/enum tag, we get less than ideal error message. The following patch improves the situation a bit by giving a hint to the user. I couldn't use lookup_tag as that gives the "defined as wrong kind of tag" error; instead I wrote a new

Re: [PATCH][C++] Avoid PCH dependent mangling

2015-09-15 Thread Richard Biener
On September 15, 2015 4:25:37 PM GMT+02:00, Jason Merrill wrote: >On 08/27/2015 09:36 AM, Richard Biener wrote: >> >> With the passes.c hunk in the patch below we FAIL assembly comparison >> of g++.dg/pch/system-[12].C because with PCH we have computed >> DECL_ASSEMBLER_NAME and thus appended DW_

Re: [PATCH] PR66870 PowerPC64 Enable gold linker with split stack

2015-09-15 Thread Ian Lance Taylor
On Thu, Aug 27, 2015 at 2:00 PM, Lynn A. Boger wrote: > Here is an updated patch, with a summary of the differences from my previous > patch: > > - In my previous patch gcc configure was verifying the gold linker even if > it was the > default linker, but that is not necessary since in that case -

Re: [patch] Bump size of stack checking protection area

2015-09-15 Thread Eric Botcazou
> For avoidance of doubt, the patch is fine then. Thanks, installed with the tm.texi bits. -- Eric Botcazou

Re: [PATCH] Warn when comparing nonnull arguments to NULL in a function.

2015-09-15 Thread Mark Wielaard
On Tue, 2015-09-15 at 14:21 +0200, Manuel López-Ibáñez wrote: > On 15/09/15 10:32, Mark Wielaard wrote: > > On Mon, 2015-09-14 at 21:37 -0600, Martin Sebor wrote: > > Although I now notice they differ on the placement of the carrot. > > Maybe the location passed into the warning is not correct/idea

[AArch64_be] Fix vtbl[34] and vtbx4

2015-09-15 Thread Christophe Lyon
This patch re-implements vtbl[34] and vtbx4 AdvSIMD intrinsics using existing builtins, and fixes the behaviour on aarch64_be. Tested on aarch64_be-none-elf and aarch64-none-elf using the Foundation Model. OK? Christophe. 2015-09-15 Christophe Lyon * config/aarch64/aarch64-builtins.c

Re: [PATCH WIP] Use Levenshtein distance for various misspellings in C frontend v2

2015-09-15 Thread Manuel López-Ibáñez
On 15 September 2015 at 17:38, David Malcolm wrote: > It would be appropriate to exit as soon as we reach 1 if we agree > that lookup_name_fuzzy isn't intended to find exact matches (since > otherwise we might fail to return an exact match if we see a > distance 1 match first). > > I haven't imple

Re: [patch] Get rid of useless EH cleanups at -O0

2015-09-15 Thread Bernd Schmidt
On 09/14/2015 11:56 AM, Eric Botcazou wrote: 2015-09-14 Eric Botcazou * tree-eh.c (lower_try_finally_dup_block): Clear location information on stack restore statements. (decide_copy_try_finally): Do not consider a stack restore statement as coming from sources.

Re: [PATCH 2/2] shrink-wrap: Rewrite try_shrink_wrapping

2015-09-15 Thread H.J. Lu
On Thu, Sep 10, 2015 at 8:14 AM, Segher Boessenkool wrote: > This patch rewrites the shrink-wrapping algorithm, allowing non-linear > pieces of CFG to be duplicated for use without prologue instead of just > linear pieces. > > On PowerPC, this enables shrink-wrapping of about 2%-3% more functions.

Re: [PATCH] vectorizing conditional expressions (PR tree-optimization/65947)

2015-09-15 Thread Alan Hayward
On 15/09/2015 13:09, "Richard Biener" wrote: > >Now comments on the patch itself. > >+ if (code == COND_EXPR) >+ *v_reduc_type = COND_REDUCTION; > >so why not simply use COND_EXPR instead of the new v_reduc_type? v_reduc_type is also dependant on check_reduction (which comes from !n

Re: CSE pass prevents loop-invariant motion

2015-09-15 Thread Jeff Law
On 09/15/2015 06:11 AM, Robin Dapp wrote: Hi, recently, I came across a problem that keeps a load instruction in a loop although it is loop-invariant. A simple example is: #include #define SZ 256 int a[SZ], b[SZ], c[SZ]; int main() { int i; for (i = 0; i < SZ; i++) { a[i] = b[i]

[PATCH WIP] Use Levenshtein distance for various misspellings in C frontend v2

2015-09-15 Thread David Malcolm
Updated patch attached, which is now independent of the rest of the patch kit; see below. Various other comments inline. On Fri, 2015-09-11 at 17:30 +0200, Manuel López-Ibáñez wrote: On 10/09/15 22:28, David Malcolm wrote: > > There are a couple of FIXMEs here: > > * where to call levenshtein_dis

Re: [PATCH] fix PR53852: stop ISL after a given number of operations

2015-09-15 Thread Sebastian Pop
On Tue, Sep 15, 2015 at 8:54 AM, Richard Biener wrote: > On Thu, Sep 3, 2015 at 5:22 PM, Sebastian Pop wrote: >> Richard Biener wrote: >>> > * gcc.dg/graphite/uns-interchange-12.c: Adjust pattern to >>> > pass with >>> > both isl-0.12 and isl-0.15. >>> >>> Does it mean wi

Re: [patch match.pd c c++]: Ignore results of 'shorten_compare' and move missing patterns in match.pd

2015-09-15 Thread Jeff Law
On 09/15/2015 04:06 AM, Richard Biener wrote: On Tue, Sep 8, 2015 at 1:17 PM, Kai Tietz wrote: Hi, This patch is the first part of obsoleting 'shorten_compare' function for folding. It adjusts the uses of 'shorten_compare' to ignore folding returned by it, and adds missing pattterns to match.p

[PATCH][ARM] Fix arm bootstrap failure due to -Werror=shift-negative-value

2015-09-15 Thread Kyrill Tkachov
Hi all, After Marek's patch I see the bootstrap failure on arm: gcc/config/arm/arm.c:4601:46: error: left shift of negative value [-Werror=shift-negative-value] && (val & (-1 << (32 - set_sign_bit_copies))) == val) I believe this is the right fix. Change -1 to HOST_WIDE_INT_M1U and change

Re: [PATCH] Target hook for disabling the delay slot filler.

2015-09-15 Thread Jeff Law
On 09/15/2015 08:27 AM, Bernd Schmidt wrote: On 09/15/2015 04:19 PM, Simon Dardis wrote: This patch adds a target hook for disabling the eager delay slot filler which when disabled can give better code. No new regressions. Ok to commit? Hmm. Whether a branch was filled by the simple or eager f

Re: [patch match.pd c c++]: Ignore results of 'shorten_compare' and move missing patterns in match.pd

2015-09-15 Thread Joseph Myers
On Tue, 15 Sep 2015, Kai Tietz wrote: > >> +/* Simplify '(type) X cmp CST' to 'X cmp (type-of-X) CST', if > >> + CST fits into the type of X. */ > >> +(for cmp (simple_comparison) > >> + (simplify > >> +(cmp (convert@2 @0) INTEGER_CST@1) > > > > what about REAL_CSTs? > > Well, for fast-ma

Re: [PATCH] Warn when comparing nonnull arguments to NULL in a function.

2015-09-15 Thread Martin Sebor
On 09/15/2015 02:32 AM, Mark Wielaard wrote: On Mon, 2015-09-14 at 21:37 -0600, Martin Sebor wrote: +void foo(void *bar) __attribute__((nonnull(1))); + +void foo(void *bar) { if (!bar) abort(); } /* { dg-warning "null" "argument ‘bar’ compared to NULL" } */ This looks like a very useful enhan

Re: [PATCH] Target hook for disabling the delay slot filler.

2015-09-15 Thread Bernd Schmidt
On 09/15/2015 04:19 PM, Simon Dardis wrote: This patch adds a target hook for disabling the eager delay slot filler which when disabled can give better code. No new regressions. Ok to commit? Hmm. Whether a branch was filled by the simple or eager filler is an implementation detail - is there

Re: [PATCH][C++] Avoid PCH dependent mangling

2015-09-15 Thread Jason Merrill
On 08/27/2015 09:36 AM, Richard Biener wrote: With the passes.c hunk in the patch below we FAIL assembly comparison of g++.dg/pch/system-[12].C because with PCH we have computed DECL_ASSEMBLER_NAME and thus appended DW_AT_linkage_name early during PCH generation while without PCH we compute it l

[PATCH] Target hook for disabling the delay slot filler.

2015-09-15 Thread Simon Dardis
Hello all, This patch adds a target hook for disabling the eager delay slot filler which when disabled can give better code. No new regressions. Ok to commit? Thanks, Simon gcc/ * target.def (use_eager_delay_filler_p): New hook for selectively disabling eager delay slot filler.

[PATCH] Fix PR67470

2015-09-15 Thread Richard Biener
When LIM ends up using predicated store motion it can wreck the IL too much for PHI hoisting to still apply when it should. The following avoids messing with existing PHIs (apart from virtuals) by splitting the edge in the problematical case to have a joiner before the existing PHI. Bootstrapped

Re: [RFC] Try vector as a new representation for vector masks

2015-09-15 Thread Ilya Enkovich
On 08 Sep 15:37, Ilya Enkovich wrote: > 2015-09-04 23:42 GMT+03:00 Jeff Law : > > > > So do we have enough confidence in this representation that we want to go > > ahead and commit to it? > > I think new representation fits nice mostly. There are some places > where I have to make some exceptions

Re: [PATCH, rs6000] Use hardware support for vector character multiply

2015-09-15 Thread Richard Biener
On Thu, Sep 3, 2015 at 5:32 PM, Bill Schmidt wrote: > On Thu, 2015-09-03 at 23:26 +0800, Andrew Pinski wrote: >> On Thu, Sep 3, 2015 at 11:20 PM, Bill Schmidt >> wrote: >> > Hi, >> > >> > It was pointed out to me recently that multiplying two vector chars is >> > performed using scalarization, ev

Re: [PATCH] fix PR53852: stop ISL after a given number of operations

2015-09-15 Thread Richard Biener
On Thu, Sep 3, 2015 at 5:22 PM, Sebastian Pop wrote: > Richard Biener wrote: >> > * gcc.dg/graphite/uns-interchange-12.c: Adjust pattern to pass >> > with >> > both isl-0.12 and isl-0.15. >> >> Does it mean with 0.15 we now "time out" on some of the cases? > > "time out" w

Re: [PATCH 07/22] Implement token range tracking within libcpp and C/C++ FEs

2015-09-15 Thread David Malcolm
On Tue, 2015-09-15 at 12:20 +0200, Jakub Jelinek wrote: > On Tue, Sep 15, 2015 at 12:14:22PM +0200, Richard Biener wrote: > > > diff --git a/gcc/cp/parser.h b/gcc/cp/parser.h > > > index 760467c..c7558a0 100644 > > > --- a/gcc/cp/parser.h > > > +++ b/gcc/cp/parser.h > > > @@ -61,6 +61,8 @@ struct G

Re: Possible patch for pr62242 -- follow-up

2015-09-15 Thread Dominique d'Humières
Louis, A few comments: (1) your patch fixes pr62242 and, as said in a previous mail, pr62246, pr60110, and some variants of pr52332. I have updated pr52332 and marked pr62246 and pr60110 as duplicate. Could you please add PR fortran/52332 to the ChangeLog entry? (2) You need a ChangeLog

Re: [C++] Coding rule enforcement

2015-09-15 Thread Jason Merrill
On 09/15/2015 09:26 AM, Richard Biener wrote: Wouldn't warning flags be better so you can decide whether it's an error or a warning via -Werror=virtual-inheritance vs. -Wvirtual-inheritance? Yep. That also handles the system header exemption (unless -Wsystem-headers). Jason

Re: [C++] Coding rule enforcement

2015-09-15 Thread Nathan Sidwell
On 09/15/15 09:26, Richard Biener wrote: Wouldn't warning flags be better so you can decide whether it's an error or a warning via -Werror=virtual-inheritance vs. -Wvirtual-inheritance? I agree. I didn't know of the -Werror=FOO trick to make them individually errors. nathan

Re: [C++] Coding rule enforcement

2015-09-15 Thread Richard Biener
On Tue, Sep 15, 2015 at 3:02 PM, Nathan Sidwell wrote: > Jason, > somme of our customers have 'interesting' C++ coding rules, they'd like to > have the compiler enforced. They want to disable: > > 1) namespace definitions > 2) template declarations > 3) multiple inheritance > 4) virtual inheritan

Re: [PATCH][AArch64 array_mode 7/8] Combine the expanders using VSTRUCT:nregs

2015-09-15 Thread Alan Lawrence
On 15/09/15 10:43, James Greenhalgh wrote: > > It is convenient that this falls out, but likely surprising for nregs. > Please add a comment to nregs explaining the dual use of nregs to represent > both the number of Q registers used for the type, and the number of elements > touched by the structu

Re: [1/7] Add new tree code SEXT_EXPR

2015-09-15 Thread Richard Biener
On Mon, Sep 7, 2015 at 4:55 AM, Kugan wrote: > > This patch adds support for new tree code SEXT_EXPR. diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index d567a87..bbc3c10 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -5071,6 +5071,10 @@ expand_debug_expr (tree exp) case FMA_EXPR:

Re: [3/7] Optimize ZEXT_EXPR with tree-vrp

2015-09-15 Thread Richard Biener
On Mon, Sep 7, 2015 at 4:58 AM, Kugan wrote: > This patch tree-vrp handling and optimization for ZEXT_EXPR. + else if (code == SEXT_EXPR) +{ + gcc_assert (range_int_cst_p (&vr1)); + unsigned int prec = tree_to_uhwi (vr1.min); + type = vr0.type; + wide_int tmin, tmax; +

[C++] Coding rule enforcement

2015-09-15 Thread Nathan Sidwell
Jason, somme of our customers have 'interesting' C++ coding rules, they'd like to have the compiler enforced. They want to disable: 1) namespace definitions 2) template declarations 3) multiple inheritance 4) virtual inheritance But they want to use the STL. This patch implements 4 new flags

Re: [5/7] Allow gimple debug stmt in widen mode

2015-09-15 Thread Richard Biener
On Tue, Sep 8, 2015 at 2:00 AM, Kugan wrote: > > Thanks for the review. > > On 07/09/15 23:20, Michael Matz wrote: >> Hi, >> >> On Mon, 7 Sep 2015, Kugan wrote: >> >>> Allow GIMPLE_DEBUG with values in promoted register. >> >> Patch does much more. >> > > Oops sorry. Copy and paste mistake. > > gc

Re: [PATCH 07/22] Implement token range tracking within libcpp and C/C++ FEs

2015-09-15 Thread Manuel López-Ibáñez
On 15 September 2015 at 14:18, Richard Biener wrote: > Of course this boils down to "uses" of a VAR_DECL using the shared tree > node. On GIMPLE some stmt kinds have separate locations for each operand > (PHI nodes), on GENERIC we'd have to invent a no-op expr tree code to > wrap such uses to be

Re: [patch match.pd c c++]: Ignore results of 'shorten_compare' and move missing patterns in match.pd

2015-09-15 Thread Kai Tietz
Hi Richi, thanks for the review. 2015-09-15 12:06 GMT+02:00 Richard Biener : > On Tue, Sep 8, 2015 at 1:17 PM, Kai Tietz wrote: >> Hi, >> >> This patch is the first part of obsoleting 'shorten_compare' function >> for folding. >> It adjusts the uses of 'shorten_compare' to ignore folding returne

[gomp4] small cleanup

2015-09-15 Thread Nathan Sidwell
I noticed I still had this patch locally, which I had noticed when preparing the launch API for trunk. Now committed to gomp4 branch. nathan 2015-09-15 Nathan Sidwell * oacc-parallel.c (GOACC_parallel_keyed): Use GOMP_DIM constants. Index: libgomp/oacc-parallel.c =

Re: [4/7] Use correct promoted mode sign for result of GIMPLE_CALL

2015-09-15 Thread Richard Biener
On Tue, Sep 8, 2015 at 11:50 PM, Jim Wilson wrote: > On 09/08/2015 08:39 AM, Jeff Law wrote: >> Is this another instance of the PROMOTE_MODE issue that was raised by >> Jim Wilson a couple months ago? > > It looks like a closely related problem. The one I am looking at has > confusion with a func

[C PATCH, committed] Some lookup_* TLC

2015-09-15 Thread Marek Polacek
While looking into something else I decided to do a little cleanup of lookup_* functions and their callers. Don't return 0 if we're supposed to return a tree and use bool appropriately. Bootstrapped/regtested on x86_64-linux, applying to trunk. 2015-09-15 Marek Polacek * c-decl.c (lo

Re: [PATCH][wwwdocs][AArch64] Add entry for target attributes and pragmas

2015-09-15 Thread Kyrill Tkachov
On 15/09/15 13:18, Christian Bruel wrote: Hi Kyril, On 09/02/2015 10:24 AM, Kyrill Tkachov wrote: Hi Gerald, On 01/09/15 18:29, Gerald Pfeifer wrote: On Tue, 1 Sep 2015, Kyrill Tkachov wrote: This wwwdocs patch adds an entry to the GCC 6 changes page about the aarch64 target attributes and

[PATCH] Make fold_stmt not transfer EH info

2015-09-15 Thread Richard Biener
This makes fold_stmt consistently not transfer EH info from old to new stmt as callers are responsible for that (and for removing dead EH edges). Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2015-09-15 Richard Biener * gimple-fold.c (gimplify_and_u

libgo patch committed: Go back to ignoring stack sizes for next GC

2015-09-15 Thread Ian Lance Taylor
This patch changes libgo to ignore stack sizes when deciding when to run the next GC. This patch restores an old patch, https://golang.org/cl/6081043, that was accidentally lost when updating to a new version of libgo in https://golang.org/cl/22440043. Bootstrapped and ran Go testsuite on x86_64-u

Re: CSE pass prevents loop-invariant motion

2015-09-15 Thread Richard Biener
On Tue, Sep 15, 2015 at 2:11 PM, Robin Dapp wrote: > Hi, > > recently, I came across a problem that keeps a load instruction in a > loop although it is loop-invariant. > > A simple example is: > > #include > > #define SZ 256 > int a[SZ], b[SZ], c[SZ]; > > int main() { > > int i; > for (i = 0;

Re: [PATCH] Warn when comparing nonnull arguments to NULL in a function.

2015-09-15 Thread Manuel López-Ibáñez
On 15/09/15 10:32, Mark Wielaard wrote: On Mon, 2015-09-14 at 21:37 -0600, Martin Sebor wrote: Although I now notice they differ on the placement of the carrot. Maybe the location passed into the warning is not correct/ideal? The caret is placed at the location given by expand_location(loc), wi

Re: [PATCH 07/22] Implement token range tracking within libcpp and C/C++ FEs

2015-09-15 Thread Richard Biener
On Tue, Sep 15, 2015 at 2:08 PM, Manuel López-Ibáñez wrote: > On 15/09/15 12:20, Jakub Jelinek wrote: >> >> On Tue, Sep 15, 2015 at 12:14:22PM +0200, Richard Biener wrote: diff --git a/gcc/cp/parser.h b/gcc/cp/parser.h index 760467c..c7558a0 100644 --- a/gcc/cp/parser.h ++

CSE pass prevents loop-invariant motion

2015-09-15 Thread Robin Dapp
Hi, recently, I came across a problem that keeps a load instruction in a loop although it is loop-invariant. A simple example is: #include #define SZ 256 int a[SZ], b[SZ], c[SZ]; int main() { int i; for (i = 0; i < SZ; i++) { a[i] = b[i] + c[i]; } printf("%d\n", a[0]); } The re

Re: [PATCH] vectorizing conditional expressions (PR tree-optimization/65947)

2015-09-15 Thread Richard Biener
On Thu, Sep 10, 2015 at 4:51 PM, Alan Hayward wrote: > Hi, > This patch (attached) adds support for vectorizing conditional expressions > (PR 65947), for example: > > int condition_reduction (int *a, int min_v) > { > int last = 0; > for (int i = 0; i < N; i++) > if (a[i] < min_v) > l

Re: [PATCH] vectorizing conditional expressions (PR tree-optimization/65947)

2015-09-15 Thread Richard Biener
On Thu, Sep 10, 2015 at 4:51 PM, Alan Hayward wrote: > Hi, > This patch (attached) adds support for vectorizing conditional expressions > (PR 65947), for example: > > int condition_reduction (int *a, int min_v) > { > int last = 0; > for (int i = 0; i < N; i++) > if (a[i] < min_v) > l

Re: [PATCH 07/22] Implement token range tracking within libcpp and C/C++ FEs

2015-09-15 Thread Manuel López-Ibáñez
On 15/09/15 12:20, Jakub Jelinek wrote: On Tue, Sep 15, 2015 at 12:14:22PM +0200, Richard Biener wrote: diff --git a/gcc/cp/parser.h b/gcc/cp/parser.h index 760467c..c7558a0 100644 --- a/gcc/cp/parser.h +++ b/gcc/cp/parser.h @@ -61,6 +61,8 @@ struct GTY (()) cp_token { BOOL_BITFIELD purged_p

Re: [patch] libstdc++/65142 Check read() result in std::random_device.

2015-09-15 Thread Jonathan Wakely
On 11/09/15 14:44 +0100, Jonathan Wakely wrote: We should not silently ignore a failure to read from the random device. Tested powerpc64le-linux, committed to trunk. I'm going to commit this to the gcc-5 branch too. commit 2d2f7012dc3744dafef0de94dd845bd190253dbd Author: Jonathan Wakely Da

Re: [PATCH] vectorizing conditional expressions (PR tree-optimization/65947)

2015-09-15 Thread Richard Biener
On Fri, Sep 11, 2015 at 6:29 PM, Ramana Radhakrishnan wrote: > Saying that all reductions have equivalent performance is unlikely to be true for many platforms. On PowerPC, for example, a PLUS reduction has very different cost from a MAX reduction. If the model isn't fine-gra

[Committed] S/390: Add missing brackets

2015-09-15 Thread Andreas Krebbel
gcc/ChangeLog: 2015-09-15 Andreas Krebbel * config/s390/s390.c (s390_const_operand_ok): Add missing brackets. Index: gcc/config/s390/s390.c === --- gcc/config/s390/s390.c (revision 227779) +++ gcc/config/s390

Re: [PATCH, PR67405, committed] Avoid NULL pointer dereference

2015-09-15 Thread Ilya Enkovich
2015-09-15 13:32 GMT+03:00 Richard Biener : > On Tue, Sep 15, 2015 at 11:28 AM, Ilya Enkovich > wrote: >> 2015-09-13 16:36 GMT+03:00 Richard Biener : >>> On Mon, Sep 7, 2015 at 2:39 PM, Ilya Enkovich >>> wrote: 2015-09-02 15:35 GMT+03:00 Richard Biener : > > DECL_FIELD_BIT_OFFSET s

Re: [PATCH 07/22] Implement token range tracking within libcpp and C/C++ FEs

2015-09-15 Thread Jakub Jelinek
On Tue, Sep 15, 2015 at 12:33:58PM +0200, Richard Biener wrote: > On Tue, Sep 15, 2015 at 12:20 PM, Jakub Jelinek wrote: > > On Tue, Sep 15, 2015 at 12:14:22PM +0200, Richard Biener wrote: > >> > diff --git a/gcc/cp/parser.h b/gcc/cp/parser.h > >> > index 760467c..c7558a0 100644 > >> > --- a/gcc/c

Re: [PATCH 07/22] Implement token range tracking within libcpp and C/C++ FEs

2015-09-15 Thread Richard Biener
On Tue, Sep 15, 2015 at 12:20 PM, Jakub Jelinek wrote: > On Tue, Sep 15, 2015 at 12:14:22PM +0200, Richard Biener wrote: >> > diff --git a/gcc/cp/parser.h b/gcc/cp/parser.h >> > index 760467c..c7558a0 100644 >> > --- a/gcc/cp/parser.h >> > +++ b/gcc/cp/parser.h >> > @@ -61,6 +61,8 @@ struct GTY ((

Re: [PATCH, PR67405, committed] Avoid NULL pointer dereference

2015-09-15 Thread Richard Biener
On Tue, Sep 15, 2015 at 11:28 AM, Ilya Enkovich wrote: > 2015-09-13 16:36 GMT+03:00 Richard Biener : >> On Mon, Sep 7, 2015 at 2:39 PM, Ilya Enkovich wrote: >>> 2015-09-02 15:35 GMT+03:00 Richard Biener : DECL_FIELD_BIT_OFFSET should be never NULL. Whoever created that FIELD_DECL

Re: [patch] Get rid of useless EH cleanups at -O0

2015-09-15 Thread Richard Biener
On Tue, Sep 15, 2015 at 11:18 AM, Bernd Schmidt wrote: > On 09/14/2015 11:56 AM, Eric Botcazou wrote: > >> this patchlet makes it possible to get rid of useless EH cleanups >> generated at >> -O0 in Ada for simple constructs involving VLAs: >> >>declare >> S : String (1 .. N); >>begin

  1   2   >