Re: [PATCH][RFC] Enable -fstrict-overflow by default

2017-04-25 Thread Martin Sebor
On 04/24/2017 05:25 AM, Richard Biener wrote: The following makes signed overflow undefined for all (non-)optimization levels. The intent is to remove -fno-strict-overflow signed overflow behavior as that is not a sensible option to the user (it ends up with the worst of both -fwrapv and

Re: [PATCH] handle sprintf(d, "%s", ...) in gimple-ssa-sprintf.c

2017-04-25 Thread Martin Sebor
On 04/25/2017 04:05 PM, Jeff Law wrote: On 04/21/2017 03:33 PM, Martin Sebor wrote: Bug 77671 - missing -Wformat-overflow warning on sprintf overflow with "%s", is caused by gimple-fold.c transforming s{,n}printf calls with a plain "%s" format string into strcpy regardless of whether they are

[PATCH] Alias analysis of zero sized arrays

2017-04-25 Thread Steve Ellcey
This patch changes get_ref_base_and_extent to treat zero sized arrays like C99 flexible arrays and assume that references to zero sized arrays can also be made beyond the 'end' of the array.  C99 flexible arrays are recognized by not having an INTEGER_CST limit/size and the routine then sets

Re: [PATCH] C++: fix-it hints suggesting accessors for private fields

2017-04-25 Thread Nathan Sidwell
On 04/25/2017 04:01 PM, David Malcolm wrote: On Tue, 2017-04-25 at 12:11 -0400, Nathan Sidwell wrote: On 04/25/2017 11:58 AM, David Malcolm wrote: { return FIELD; } I tried adding the kind of filtering you suggest, but the binfo doesn't seem to have info on const vs non-const

[C++ PATCH] fix test breakage

2017-04-25 Thread Nathan Sidwell
I've committed this patch to remove the TCL 8.5ism of {*}[returns-a-list]. I recall now seeing that 8.5 was released 10 years ago, so thought it'd be ok. Sadly not :( nathan -- Nathan Sidwell 2017-04-25 Nathan Sidwell * g++.dg/dg.exp (find-cxx-tests): Remove TCL 8.5-ism.

Re: [PATCH] handle sprintf(d, "%s", ...) in gimple-ssa-sprintf.c

2017-04-25 Thread Jeff Law
On 04/21/2017 03:33 PM, Martin Sebor wrote: Bug 77671 - missing -Wformat-overflow warning on sprintf overflow with "%s", is caused by gimple-fold.c transforming s{,n}printf calls with a plain "%s" format string into strcpy regardless of whether they are valid well before the -Wformtat-overflow

Re: std::vector move assign patch

2017-04-25 Thread Marc Glisse
On Tue, 25 Apr 2017, Jonathan Wakely wrote: That's only 5 more memory operations. If I tweak vector swapping to avoid calling swap on each member (which drops type-based aliasing information, that was the topic of PR64601) I didn't really understand the discussion in the PR. I find that's

Re: [PATCH] C++: fix-it hints suggesting accessors for private fields

2017-04-25 Thread David Malcolm
On Tue, 2017-04-25 at 12:11 -0400, Nathan Sidwell wrote: > On 04/25/2017 11:58 AM, David Malcolm wrote: > > >{ return FIELD; } > > > > for the correct field, favoring returning T to returning T&. > > Hm, that seems the poorer choice (unless you can suggest both). > After > all the T&

Re: Who broke options.h?

2017-04-25 Thread Jakub Jelinek
On Tue, Apr 25, 2017 at 12:43:00PM -0700, Steve Kargl wrote: > This appears to fix my problem. Do you want to commit the patch > or would you rather have me do it? Note, the problem is present > in 7-branch. I haven't checked the other branches. Committed to trunk, 7.x will need to wait until

Re: Who broke options.h?

2017-04-25 Thread Steve Kargl
On Tue, Apr 25, 2017 at 06:58:56PM +0200, Jakub Jelinek wrote: > On Tue, Apr 25, 2017 at 09:54:04AM -0700, Steve Kargl wrote: > > On Tue, Apr 25, 2017 at 05:46:15PM +0200, Andreas Schwab wrote: > > > On Apr 25 2017, Steve Kargl wrote: > > > > > > > Someone

[PATCH] Improve RTL ifcvt for empty else_bb (PR rtl-optimization/80491)

2017-04-25 Thread Jakub Jelinek
Hi! The following patch is a partial fix for PR80491, an improvement for if-conversion if there is empty else_bb. What we do right now is in that case we only look at the immediately preceeding (non-debug/non-note) instruction before cond_earliest and if it is not the set of x, we just turn it

[PATCH, i386]: Handle ASHIFTRT in STV pass (PR 70799)

2017-04-25 Thread Uros Bizjak
Attached fairly rivial patch adds ASHIFTRT handling for TARGET_AVX512VL targets in STV pass. The patch also merges a couple of shift vector insn patterns. 2017-04-25 Uros Bizjak PR target/70799 * config/i386/i386.c (dimode_scalar_to_vector_candidate_p): Handle

Re: Who broke options.h?

2017-04-25 Thread Jakub Jelinek
On Tue, Apr 25, 2017 at 10:18:28AM -0700, Steve Kargl wrote: > > --- gcc/Makefile.in 2017-04-18 21:16:24.703775156 +0200 > > +++ gcc/Makefile.in 2017-04-25 18:56:58.304963926 +0200 > > @@ -2139,6 +2139,7 @@ s-specs : Makefile > > > > optionlist: s-options ; @true > > s-options:

Re: Who broke options.h?

2017-04-25 Thread Steve Kargl
On Tue, Apr 25, 2017 at 06:58:56PM +0200, Jakub Jelinek wrote: > On Tue, Apr 25, 2017 at 09:54:04AM -0700, Steve Kargl wrote: > > On Tue, Apr 25, 2017 at 05:46:15PM +0200, Andreas Schwab wrote: > > > On Apr 25 2017, Steve Kargl wrote: > > > > > > > Someone

Re: Who broke options.h?

2017-04-25 Thread Joseph Myers
On Tue, 25 Apr 2017, Jakub Jelinek wrote: > On Tue, Apr 25, 2017 at 09:54:04AM -0700, Steve Kargl wrote: > > On Tue, Apr 25, 2017 at 05:46:15PM +0200, Andreas Schwab wrote: > > > On Apr 25 2017, Steve Kargl wrote: > > > > > > > Someone (other than Richard who

Re: Who broke options.h?

2017-04-25 Thread Jakub Jelinek
On Tue, Apr 25, 2017 at 09:54:04AM -0700, Steve Kargl wrote: > On Tue, Apr 25, 2017 at 05:46:15PM +0200, Andreas Schwab wrote: > > On Apr 25 2017, Steve Kargl wrote: > > > > > Someone (other than Richard who seems to have fixed his > > > bootstrap issue) in the

Re: Who broke options.h?

2017-04-25 Thread Steve Kargl
On Tue, Apr 25, 2017 at 05:46:15PM +0200, Andreas Schwab wrote: > On Apr 25 2017, Steve Kargl wrote: > > > Someone (other than Richard who seems to have fixed his > > bootstrap issue) in the last 3 days has broken bootstrap > > on FreeBSD. > > Did you change

Re: std::vector move assign patch

2017-04-25 Thread Jonathan Wakely
On 25/04/17 18:12 +0200, Marc Glisse wrote: On Tue, 25 Apr 2017, Jonathan Wakely wrote: On 25/04/17 17:23 +0200, Marc Glisse wrote: On Tue, 25 Apr 2017, Jonathan Wakely wrote: On 24/04/17 22:10 +0200, Marc Glisse wrote: It seems that this patch had 2 consequences that may or may not have

Re: [PATCH 4/7] [D] libiberty: Remove wrongly spec'd mangle rule for encoded integers.

2017-04-25 Thread Iain Buclaw
On 20 April 2017 at 20:58, Iain Buclaw wrote: > > Hmm, it seems like D compilers until 3 years ago infact used to mangle > in this way. Better keep it around then for a little while longer for > compatibility. I'll follow-up with an amendment which doesn't remove > the

Re: Who broke options.h?

2017-04-25 Thread Steve Kargl
On Tue, Apr 25, 2017 at 04:13:45PM +, Joseph Myers wrote: > On Tue, 25 Apr 2017, David Malcolm wrote: > > > >From what I can tell, the n_opts and opts in that file come direct from > > opt-read.awk, which gets them from opt-gather.awk, which appears to > > sort them (but my awk skills are

[PATCH] Do CRC 4 bits at a time

2017-04-25 Thread Nathan Sidwell
Hi, our current CRC routine processes 1 bit at a time, and permits arbitrary numbers of bits from 1 to 32. However we only ever feed it multiples of 8 bits to process. So part of this patch changes the interface to use a crc32_unsigned_n worker function, which crcs a N-byte integer. The

Re: [PATCH 3/9] Documentation for the ia16 back end

2017-04-25 Thread Jeff Law
On 04/01/2017 10:48 AM, Andrew Jenner wrote: This patch updates the documentation. 2017-04-01 Andrew Jenner Rask Ingemann Lambertsen * doc/md.texi: Update for new ia16 back end. * doc/invoke.texi: Likewise. * doc/contrib.texi:

Re: Who broke options.h?

2017-04-25 Thread Steve Kargl
On Tue, Apr 25, 2017 at 11:09:05AM -0400, David Edelsohn wrote: > > > > From what I can tell, the n_opts and opts in that file come direct from > > opt-read.awk, which gets them from opt-gather.awk, which appears to > > sort them (but my awk skills are weak). > > > > Alternatively, maybe the

Re: [PATCH 7/9] ira-color

2017-04-25 Thread Jeff Law
On 04/01/2017 10:48 AM, Andrew Jenner wrote: In the course of working with ia16, I found a case where the sorted_allocnos array in ira-color.c requires more than ira_allocnos_num entries. The following patch allows this array to expand when this happens. 2017-04-01 Andrew Jenner

Re: [PATCH 8/9] subreg_get_info

2017-04-25 Thread Jeff Law
On 04/01/2017 10:48 AM, Andrew Jenner wrote: In the course of working with the ia16 port, I found a case of subreg shape (I think it was a 32-bit value in one 16-bit register and two 8-bit registers) which is not currently supported by subreg_get_info but which easily could be, with the

Re: [PATCH] Fix fold_binary_loc BIT_IOR_EXPR folding (PR sanitizer/80349)

2017-04-25 Thread Jakub Jelinek
On Tue, Apr 25, 2017 at 06:27:01PM +0200, Marek Polacek wrote: > On Tue, Apr 25, 2017 at 06:09:20PM +0200, Jakub Jelinek wrote: > > On Tue, Apr 25, 2017 at 06:05:25PM +0200, Marek Polacek wrote: > > > Here we are crashing because fold_binary_loc produced a BIT_IOR_EXPR with > > > incompatible

Re: [PATCH] Fix fold_binary_loc BIT_IOR_EXPR folding (PR sanitizer/80349)

2017-04-25 Thread Marek Polacek
On Tue, Apr 25, 2017 at 06:09:20PM +0200, Jakub Jelinek wrote: > On Tue, Apr 25, 2017 at 06:05:25PM +0200, Marek Polacek wrote: > > Here we are crashing because fold_binary_loc produced a BIT_IOR_EXPR with > > incompatible operands. Fixed by adding the missing conversion, similarly > > to

Re: [PATCH 5/7] [D] libiberty: Fixes for demangling qualified symbol names

2017-04-25 Thread Iain Buclaw
On 25 April 2017 at 17:35, Jeff Law wrote: > On 04/15/2017 09:25 AM, Iain Buclaw wrote: >> >> This patch removes `dlang_parse_symbol', and replaces it with >> `dlang_parse_qualified' and `dlang_parse_mangle'. All callers have >> been updated to reflect as to whether we expect

Re: C++ PATCH to fix ICE in replace_placeholders_r (PR c++/79937)

2017-04-25 Thread Marek Polacek
On Fri, Apr 07, 2017 at 03:27:36PM -0400, Jason Merrill wrote: > On Fri, Mar 24, 2017 at 12:22 PM, Marek Polacek wrote: > > On Thu, Mar 23, 2017 at 05:09:58PM -0400, Jason Merrill wrote: > >> On Thu, Mar 23, 2017 at 4:34 PM, Marek Polacek wrote: > >> > On

Re: [ARM ABI PATCH] Change ARM ABI to match AAPCS, provide -Wpsabi notes (PR target/77728)

2017-04-25 Thread Kyrill Tkachov
On 25/04/17 14:57, Kyrill Tkachov wrote: Hi all, On 25/04/17 11:00, Jakub Jelinek wrote: Hi! As mentioned in the PR, r225465 aka PR65956 changed the ABI on ARM to match updated AAPCS, but the change had a bug - for structures it considered DECL_ALIGN of any TYPE_FIELDS, rather than just

Re: Who broke options.h?

2017-04-25 Thread Joseph Myers
On Tue, 25 Apr 2017, David Malcolm wrote: > >From what I can tell, the n_opts and opts in that file come direct from > opt-read.awk, which gets them from opt-gather.awk, which appears to > sort them (but my awk skills are weak). Maybe the opt-gather.awk call in Makefile.in needs to set

Re: std::vector move assign patch

2017-04-25 Thread Marc Glisse
On Tue, 25 Apr 2017, Jonathan Wakely wrote: On 25/04/17 17:23 +0200, Marc Glisse wrote: On Tue, 25 Apr 2017, Jonathan Wakely wrote: On 24/04/17 22:10 +0200, Marc Glisse wrote: It seems that this patch had 2 consequences that may or may not have been planned. Consider this example (from

Re: [PATCH] C++: fix-it hints suggesting accessors for private fields

2017-04-25 Thread Nathan Sidwell
On 04/25/2017 11:58 AM, David Malcolm wrote: { return FIELD; } for the correct field, favoring returning T to returning T&. Hm, that seems the poorer choice (unless you can suggest both). After all the T& case will meet the rvalue case (const-qualifiers ignoring). I suppose if thing is

Re: [PATCH] Fix fold_binary_loc BIT_IOR_EXPR folding (PR sanitizer/80349)

2017-04-25 Thread Jakub Jelinek
On Tue, Apr 25, 2017 at 06:05:25PM +0200, Marek Polacek wrote: > Here we are crashing because fold_binary_loc produced a BIT_IOR_EXPR with > incompatible operands. Fixed by adding the missing conversion, similarly > to . > >

[PATCH] Fix fold_binary_loc BIT_IOR_EXPR folding (PR sanitizer/80349)

2017-04-25 Thread Marek Polacek
Here we are crashing because fold_binary_loc produced a BIT_IOR_EXPR with incompatible operands. Fixed by adding the missing conversion, similarly to . Bootstrapped/regtested on x86_64-linux, ok for trunk? And 7.1? 2017-04-25 Marek

Re: [PATCH] C++: fix-it hints suggesting accessors for private fields

2017-04-25 Thread David Malcolm
On Tue, 2017-04-25 at 07:49 -0400, Nathan Sidwell wrote: > On 04/25/2017 07:46 AM, Nathan Sidwell wrote: > > On 04/24/2017 04:06 PM, David Malcolm wrote: > > > > > test.cc:12:13: note: field ‘int foo::m_field’ can be accessed via > > > ‘int > > > foo::get_field() const’ > > > return

[Ada] Remove zero-origin array indexing for Source_Buffers

2017-04-25 Thread Arnaud Charlet
This patch removes the zero-origin array indexing that was used for Source_Buffers with thin pointers. It is impossible to implement zero-origin indexing correctly in Ada without fat pointers. For one thing, 'First and 'Last can't work. For another thing, array bounds checking can't work. And

[Ada] Spurious error on container indexing that is in-out parameter in call

2017-04-25 Thread Arnaud Charlet
This patch fixes a spurious error on a user-defined indexing that appears as the actual in a parameter association of a procedure call. Given that the enclosing call has not been analyzed yet, determining the matching formal of the candidate subprogram must be located by name and not by position.

Re: [PATCH 7/7] [D] libiberty: Refactor and add tests for decoding hexdigits.

2017-04-25 Thread Jeff Law
On 04/15/2017 09:28 AM, Iain Buclaw wrote: Similar to the patch for decoding numbers, puts the handling of character decoding into a designated function with the same style caller interface. Removes one nested level and decoding logic from `dlang_parse_string'. Added some more tests, which

Re: Who broke options.h?

2017-04-25 Thread Andreas Schwab
On Apr 25 2017, Steve Kargl wrote: > Someone (other than Richard who seems to have fixed his > bootstrap issue) in the last 3 days has broken bootstrap > on FreeBSD. Did you change your locale since then? Andreas. -- Andreas Schwab, sch...@linux-m68k.org

Re: [PATCH 2/3] [ARC] Fast interrupts support.

2017-04-25 Thread Sandra Loosemore
On 04/25/2017 07:03 AM, Claudiu Zissulescu wrote: diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index cebafe6..aa5cd27 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -606,7 +606,8 @@ Objective-C and Objective-C++ Dialects}. -mnorm -mspfp -mspfp-compact -mspfp-fast

Re: [PATCH 6/7] [D] libiberty: Fixes for decoding numbers.

2017-04-25 Thread Jeff Law
On 04/15/2017 09:27 AM, Iain Buclaw wrote: This fixes two main problems found in the use of strtol(). First that it returns `0' if nothing is decoded, and none of the callers checked whether nothing was consumed. Second that it just returns `LONG_MAX' on overflow. Rather than updating each

Re: [PATCH 1/3] [ARC] Automatic context save/restore for regular interrupts.

2017-04-25 Thread Sandra Loosemore
On 04/25/2017 07:03 AM, Claudiu Zissulescu wrote: diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 0eeea7b..cebafe6 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -606,7 +606,7 @@ Objective-C and Objective-C++ Dialects}. -mnorm -mspfp -mspfp-compact -mspfp-fast

Re: [PATCH 5/7] [D] libiberty: Fixes for demangling qualified symbol names

2017-04-25 Thread Jeff Law
On 04/15/2017 09:25 AM, Iain Buclaw wrote: This patch removes `dlang_parse_symbol', and replaces it with `dlang_parse_qualified' and `dlang_parse_mangle'. All callers have been updated to reflect as to whether we expect either a `MangleName' or `QualifiedName' to be the next token we encounter,

Re: std::vector move assign patch

2017-04-25 Thread Jonathan Wakely
On 25/04/17 17:23 +0200, Marc Glisse wrote: On Tue, 25 Apr 2017, Jonathan Wakely wrote: On 24/04/17 22:10 +0200, Marc Glisse wrote: It seems that this patch had 2 consequences that may or may not have been planned. Consider this example (from PR64601) #include typedef std::vector V; void

Re: [PATCH] Destroy arguments for _Cilk_spawn calling in the child (PR 80038)

2017-04-25 Thread Jeff Law
On 04/14/2017 06:44 PM, Xi Ruoyao wrote: On 2017-04-14 15:00 +0800, Xi Ruoyao wrote: On 2017-04-13 09:05 +0200, Richard Biener wrote: Did you verify LTO bootstrap still works with the patch? I've just done a LTO bootstrapp (boarding a train :) ). It works with my patch. I've done dejagnu

Re: [RFC, testsuite] Add dg-save-linenr

2017-04-25 Thread Mike Stump
On Apr 25, 2017, at 8:21 AM, Tom de Vries wrote: > > OK for trunk? Ok.

Re: [PATCH GCC8][15/33]Simplify function autoinc_possible_for_pair

2017-04-25 Thread Jeff Law
On 04/18/2017 04:45 AM, Bin Cheng wrote: Hi, This patch simplifies function autoinc_possible_for_pair by deleting unnecessary local variables. Is it OK? Thanks, bin 2017-04-11 Bin Cheng * tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify. OK when

Re: [PATCH GCC8][12/33]Expose interfaces of tree-ssa-address.c

2017-04-25 Thread Jeff Law
On 04/18/2017 04:43 AM, Bin Cheng wrote: Hi, This patch exposes several interfaces in tree-ssa-address.c so that they can be used in cost computation for address iv_use. Is it OK? Thanks, bin 2017-04-11 Bin Cheng * tree-ssa-address.c (struct mem_address): Move

Re: std::vector move assign patch

2017-04-25 Thread Marc Glisse
On Tue, 25 Apr 2017, Jonathan Wakely wrote: On 24/04/17 22:10 +0200, Marc Glisse wrote: It seems that this patch had 2 consequences that may or may not have been planned. Consider this example (from PR64601) #include typedef std::vector V; void f(V,V){ V(std::move(w)).swap(v); } void

Re: [RFC, testsuite] Add dg-save-linenr

2017-04-25 Thread Tom de Vries
On 04/24/2017 05:20 PM, David Malcolm wrote: On Sat, 2017-04-22 at 19:49 +0200, Tom de Vries wrote: Hi, there are currently two types of line number supported in dg-{error,warning,message,bogus} directives: absolute and relative. With an absolute line number, it's immediately clear what line

Re: [PATCH][STAGE1] Add prefix to test verification in guality.h

2017-04-25 Thread Jeff Law
On 04/20/2017 05:38 AM, Martin Liška wrote: Hello. Currently tests that include guality.h header file and us the fancy macros for verification produce output like: FAIL: o is -1, not 268566560 FAIL: w is -1, not 268566624 FAIL: w is -1, not 268566624 FAIL: o is -1, not 268566576 FAIL: w is -1,

Re: [PATCH][RFC] Enable -fstrict-overflow by default

2017-04-25 Thread Jeff Law
On 04/25/2017 09:09 AM, Richard Biener wrote: On April 25, 2017 4:39:49 PM GMT+02:00, Jeff Law wrote: On 04/24/2017 05:25 AM, Richard Biener wrote: The following makes signed overflow undefined for all (non-)optimization levels. The intent is to remove

Re: Who broke options.h?

2017-04-25 Thread Jakub Jelinek
On Tue, Apr 25, 2017 at 11:03:40AM -0400, David Malcolm wrote: > >From what I can tell, the n_opts and opts in that file come direct from > opt-read.awk, which gets them from opt-gather.awk, which appears to > sort them (but my awk skills are weak). Perhaps a bug in the FreeBSD awk? The *.awk

Re: [PATCH][RFC] Enable -fstrict-overflow by default

2017-04-25 Thread Richard Biener
On April 25, 2017 4:39:49 PM GMT+02:00, Jeff Law wrote: >On 04/24/2017 05:25 AM, Richard Biener wrote: >> >> The following makes signed overflow undefined for all >(non-)optimization >> levels. The intent is to remove -fno-strict-overflow signed overflow >> behavior as that is

Re: Who broke options.h?

2017-04-25 Thread David Edelsohn
On Tue, Apr 25, 2017 at 11:03 AM, David Malcolm wrote: > On Tue, 2017-04-25 at 06:59 -0700, Steve Kargl wrote: >> Someone (other than Richard who seems to have fixed his >> bootstrap issue) in the last 3 days has broken bootstrap >> on FreeBSD. The generated file

Re: Who broke options.h?

2017-04-25 Thread David Malcolm
On Tue, 2017-04-25 at 06:59 -0700, Steve Kargl wrote: > Someone (other than Richard who seems to have fixed his > bootstrap issue) in the last 3 days has broken bootstrap > on FreeBSD. The generated file gcc/options.h contains > code of the form > > OPT_C = 116,

Re: [PATCH][RFC] Enable -fstrict-overflow by default

2017-04-25 Thread Jeff Law
On 04/24/2017 05:25 AM, Richard Biener wrote: The following makes signed overflow undefined for all (non-)optimization levels. The intent is to remove -fno-strict-overflow signed overflow behavior as that is not a sensible option to the user (it ends up with the worst of both -fwrapv and

Re: [RFC, testsuite] Add dg-save-linenr

2017-04-25 Thread Jeff Law
On 04/22/2017 11:49 AM, Tom de Vries wrote: Hi, there are currently two types of line number supported in dg-{error,warning,message,bogus} directives: absolute and relative. With an absolute line number, it's immediately clear what line number is meant, but when a line is added at the start

Re: [PATCH] avoid assuming all integers are representable in HOST_WIDE_INT (PR #80497)

2017-04-25 Thread Jakub Jelinek
On Tue, Apr 25, 2017 at 08:24:32AM -0600, Jeff Law wrote: > On 04/24/2017 05:35 PM, Martin Sebor wrote: > > Bug 80497 brings to light that my fix for PR 80364 where I corrected > > the handling for int128_t was incomplete. I handled the non-constant > > case but missed the INTEGER_CST case just a

Re: [PATCH] avoid assuming all integers are representable in HOST_WIDE_INT (PR #80497)

2017-04-25 Thread Jeff Law
On 04/24/2017 05:35 PM, Martin Sebor wrote: Bug 80497 brings to light that my fix for PR 80364 where I corrected the handling for int128_t was incomplete. I handled the non-constant case but missed the INTEGER_CST case just a few lines above. The attached patch also corrects that problem plus

Who broke options.h?

2017-04-25 Thread Steve Kargl
Someone (other than Richard who seems to have fixed his bootstrap issue) in the last 3 days has broken bootstrap on FreeBSD. The generated file gcc/options.h contains code of the form OPT_C = 116, /* -C */ OPT_CC = 117, /* -CC */

Re: [ARM ABI PATCH] Change ARM ABI to match AAPCS, provide -Wpsabi notes (PR target/77728)

2017-04-25 Thread Kyrill Tkachov
Hi all, On 25/04/17 11:00, Jakub Jelinek wrote: Hi! As mentioned in the PR, r225465 aka PR65956 changed the ABI on ARM to match updated AAPCS, but the change had a bug - for structures it considered DECL_ALIGN of any TYPE_FIELDS, rather than just actual data components (AAPCS says members, for

Re: std::vector move assign patch

2017-04-25 Thread Jonathan Wakely
On 25/04/17 13:52 +0100, Jonathan Wakely wrote: On 24/04/17 22:10 +0200, Marc Glisse wrote: It seems that this patch had 2 consequences that may or may not have been planned. Consider this example (from PR64601) #include typedef std::vector V; void f(V,V){ V(std::move(w)).swap(v); } void

[Ada] With clause inhibits error in SPARK subunit

2017-04-25 Thread Arnaud Charlet
This patch modifies the analysis of subunits to preserve the SPARK mode in effect while multiple scopes and contexts are uninstalled to provide a clean environment for the context of the subunit itself. As a result, the original SPARK mode is still in effect when the subunit is analyzed. The

[Ada] Spurious error on predicate of local private type.

2017-04-25 Thread Arnaud Charlet
This patch fixes a spurious error on a predicate specification for a type declared in a local package, when an object declaration that references that type appears outside of the package. The following must compile quietly: --- procedure Pred_Scope is package P is Local : Boolean :=

[Ada] Don't emit unit version on configurable run time target if not needed.

2017-04-25 Thread Arnaud Charlet
Minor clean-up in the binder generated file: data for 'Version and 'Body_Version are not emitted anymore if not needed. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-04-25 Tristan Gingold * bingen.adb (System_Version_Control_Used): New variable.

[PATCH] [ARC][COMMITTED] Fix typo dmpyh pattern

2017-04-25 Thread Claudiu Zissulescu
gcc/ 2017-04-25 Claudiu Zissulescu * config/arc/simdext.md (dmpyh): Fix typo. --- gcc/ChangeLog | 4 gcc/config/arc/simdext.md | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index

[PATCH 2/3] [ARC] Fast interrupts support.

2017-04-25 Thread Claudiu Zissulescu
When a processor enters a fast interrupts handler, and duplicate register banks are configured, the processor saves the user context by saving the registers in the main register bank to these additional registers in the duplicate register bank. In this fast interrupt context, when you specify the

[PATCH 3/3] [ARC] Add support for advanced mpy/mac instructions.

2017-04-25 Thread Claudiu Zissulescu
Add support for MAC and DMPY instructions. ARCv2 Only. gcc/ 2016-12-08 Claudiu Zissulescu * config/arc/arc.c (arc_conditional_register_usage): Handle ACCL, ACCH registers. * config/arc/arc.md (mulsidi3): Use advanced mpy instructions when

[PATCH 1/3] [ARC] Automatic context save/restore for regular interrupts.

2017-04-25 Thread Claudiu Zissulescu
The AUX_IRQ_CTRL register controls the behavior of automated register save and restore or prologue and epilogue sequences during a non-fast interrupt entry and exit, and context save and restore instructions. A user passes to the compiler the configuration of the AUX_IRQ_CTRL register via

[PATCH 0/3] [ARC] New features

2017-04-25 Thread Claudiu Zissulescu
From: claziss Hi, This is a set of new features introduced to ARC. First patch is adding support for automatic context save/restore for regular interrupts. It is done using an hardware available machinery, thus, saving/restoring registers by the compiler is not needed in

[Ada] Add GNAT_Ravenscar_EDF profile

2017-04-25 Thread Arnaud Charlet
This is an experimental profile to test EDF scheduling on bareboard platforms. No test as no runtime yet. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-04-25 Tristan Gingold * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add relative_deadline to

[Ada] Compiler abort on components that are unchecked unions.

2017-04-25 Thread Arnaud Charlet
This patch fixes two errors in the handling of unchecked unions used as record components, in cases where such a use a potentially erroneous. The following must ocmpile quietly: gcc -c objects-base.adb --- package body Objects.Base is procedure setClass (self: in out SObject'Class; class

[Ada] Compiler abort on nested instantions with pragma Ignore_Pragma.

2017-04-25 Thread Arnaud Charlet
This patch fixes a crash in a compilation involving nested generics when a generic subprogram carries an Inline_Always pragma, and a configuration file has a corresponding pragma Ignore_Pragma (Inline_Always). No small example available. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] Crash processing comparison of composite objects

2017-04-25 Thread Arnaud Charlet
Comparisons of composite objects may be internally transformed by the frontend into a special kind of node that facilitates their internal management. If processing the comparison causes the internal declaration of a subtype declaration associated with some sub-expression, the backend may crash

[Ada] Missing predicate functions for private types.

2017-04-25 Thread Arnaud Charlet
This patch fixes an omission in the generation of predicate functions for private types whose full view derives from a subtype with predicates. Executing the following: gnatmake -gnata -q predicate_check predicate_check must yield; OK derived subtype OK original subtype --- with

[Ada] Better diagnostics for illegal expression functions as completions.

2017-04-25 Thread Arnaud Charlet
This patch provides a better error message on expression functions that are completions, when the expression has a reference to a type that cannot be frozen yet. Compiling try.ads must yield: try.ads:10:49: premature usage of incomplete type "T2" defined at line 3 try.ads:10:49: type "T2"

Convert inliner's time to sreal

2017-04-25 Thread Jan Hubicka
Hi, this patch convers time in ipa-inline-analysis to sreals and removes the ugly capping code. It is done in fully mechanical way --- sanitizing the code to take advantage of sreals is comming as a followup. Bootsrapped/regtested x86_64-linux, plan to commit it after the sreal streaming is in.

Re: [AARCH64 ABI PATCH] Change AARCH64 ABI to match AAPCS, provide -Wpsabi notes (PR target/77728)

2017-04-25 Thread Jakub Jelinek
On Tue, Apr 25, 2017 at 01:29:06PM +0100, Richard Earnshaw (lists) wrote: > >/* C.8 if the argument has an alignment of 16 then the NGRN is > > rounded up to the next even number. */ > > - if (nregs == 2 && alignment == 16 * BITS_PER_UNIT && ncrn % 2) > > + if (nregs

Re: std::vector move assign patch

2017-04-25 Thread Jonathan Wakely
On 24/04/17 22:10 +0200, Marc Glisse wrote: It seems that this patch had 2 consequences that may or may not have been planned. Consider this example (from PR64601) #include typedef std::vector V; void f(V,V){ V(std::move(w)).swap(v); } void g(V,V){ v=std::move(w); } 1) We generate shorter

[C++] testsuite tweak

2017-04-25 Thread Nathan Sidwell
The G++ testsuite's main dg.exp file does a recursive glob for .C files and then prunes out those in directories known to contain their own .exp file. This is dumb. This patch adds a recursive directory walker that stops when it encounters a .exp file. In addition to not having to specify

Re: Add LTO streaming support for sreal

2017-04-25 Thread Richard Biener
On Tue, 25 Apr 2017, Jan Hubicka wrote: > Hi, > for inliner to use sreals we need to stream them into summaries. I added them > as member functions, becuase for streamer_write_sreal/streamer_read_sreal pair > we would need to access private variables. Does this seem sane? Bah - stupid C++ ;) >

Add LTO streaming support for sreal

2017-04-25 Thread Jan Hubicka
Hi, for inliner to use sreals we need to stream them into summaries. I added them as member functions, becuase for streamer_write_sreal/streamer_read_sreal pair we would need to access private variables. Does this seem sane? Bootstrapped/regtested x86_64-linux, OK? Honza * sreal.c:

Re: [AARCH64 ABI PATCH] Change AARCH64 ABI to match AAPCS, provide -Wpsabi notes (PR target/77728)

2017-04-25 Thread Richard Earnshaw (lists)
On 25/04/17 11:01, Jakub Jelinek wrote: > Hi! > > Similarly to the previous patch, just hopefully triggers less often, > because 128-bit alignment is more rare. > > Ok for trunk/7.1 if it passes testing? > > 2017-04-25 Ramana Radhakrishnan > Jakub

[Patch, testsuite] Fix failing attr-alloc_size-10.c for avr

2017-04-25 Thread Senthil Kumar Selvaraj
Hi, Integer promotion combined with equal sizes for short and int (16 bits) causes overflow warnings when expanding the TEST macro for USHRT_MAX. Fixed by explicitly disabling overflow warnings for targets with !int32plus. Committed as obvious. Regards Senthil gcc/testsuite/ChangeLog

[Ada] Re-implement classwide invariants to evaluate statically

2017-04-25 Thread Arnaud Charlet
This patch corrects an issue outlined by AI12-0150-1 (text below) and changes class-wide type invariant procedures to avoid expensive dynamic dispatching. To accomplish this changes to most calls to Build_Invariant_Procedure_Body and Build_Invariant_Procedure_Declaration were made to handle the

RE: [PATCH 0/7] [ARC] Fix constraint letters and allow extra registers

2017-04-25 Thread Claudiu Zissulescu
> These all look good. > > Thanks, > Andrew Committed in r247201, r247200, r247199, r247198, r247196, r247195, and r247194 Thank you for your review, Claudiu

[Ada] Spurious warning on non-existend exception handler

2017-04-25 Thread Arnaud Charlet
This patch modifies the analysis of exception handlers to bypass restriction checks when the handler is internally generated and the verification mode is warnings. -- Source -- -- gen.ads generic type Ptr is private; package Gen is end Gen; -- types.ads with

Re: [PATCH] Make __FUNCTION__ a mergeable string and do not generate symbol entry.

2017-04-25 Thread Jakub Jelinek
On Tue, Apr 25, 2017 at 01:48:05PM +0200, Martin Liška wrote: > Hello. > > This is patch that was originally installed by Jason and later reverted due > to PR70422. > In the later PR Richi suggested a fix for that and Segher verified that it > helped him > to survive regression tests. That's

Re: [PATCH, C++] Fix-it info for invalid class/struct after enum

2017-04-25 Thread Nathan Sidwell
On 04/25/2017 03:39 AM, Volker Reichelt wrote: Hi, the following patch adds fix-it information for a pedwarn in the C++ parser about the invalid use of class/struct after enum. 2017-04-25 Volker Reichelt * parser.c (cp_parser_elaborated_type_specifier):

Re: [PATCH] C++: fix-it hints suggesting accessors for private fields

2017-04-25 Thread Nathan Sidwell
On 04/25/2017 07:46 AM, Nathan Sidwell wrote: On 04/24/2017 04:06 PM, David Malcolm wrote: test.cc:12:13: note: field ‘int foo::m_field’ can be accessed via ‘int foo::get_field() const’ return f->m_field; ^~~ get_field() Assuming that an IDE can offer to

[PATCH] Make __FUNCTION__ a mergeable string and do not generate symbol entry.

2017-04-25 Thread Martin Liška
Hello. This is patch that was originally installed by Jason and later reverted due to PR70422. In the later PR Richi suggested a fix for that and Segher verified that it helped him to survive regression tests. That's reason why I'm resending that. Patch can bootstrap on ppc64le-redhat-linux

Re: [PATCH] C++: fix-it hints suggesting accessors for private fields

2017-04-25 Thread Nathan Sidwell
On 04/24/2017 04:06 PM, David Malcolm wrote: test.cc:12:13: note: field ‘int foo::m_field’ can be accessed via ‘int foo::get_field() const’ return f->m_field; ^~~ get_field() Assuming that an IDE can offer to apply fix-it hints, this should make it easier

Backport to GCC6

2017-04-25 Thread Martin Liška
Hello. There's a series of revisions I would like to install to GCC 6 branch. When I did the same couple weeks ago, Richi told me to install regression without asking for a permission. However the series also contains various fixed for PRs that are present probably from the time a functionality

Re: [PATCH] C++: fix-it hint for removing stray semicolons

2017-04-25 Thread Nathan Sidwell
On 04/24/2017 03:59 PM, David Malcolm wrote: Patch adds a fix-it hint to a pre-existing pedwarn to make it easier for IDEs to assist in fixing the mistake. Successfully bootstrapped on x86_64-pc-linux-gnu. OK for trunk? gcc/cp/ChangeLog: * parser.c (cp_parser_member_declaration): Add

Re: [PATCH] C: fix-it hint for removing stray semicolons

2017-04-25 Thread Nathan Sidwell
On 04/24/2017 03:58 PM, David Malcolm wrote: Patch adds a fix-it hint to a pre-existing pedwarn to make it easier for IDEs to assist in fixing the mistake. Successfully bootstrapped on x86_64-pc-linux-gnu. OK for trunk? gcc/c/ChangeLog: * c-parser.c

Re: [PATCH, gcc 8] C++: hints for missing std:: headers

2017-04-25 Thread Nathan Sidwell
On 04/24/2017 03:53 PM, David Malcolm wrote: If the user forgets to include an STL header, then an attempt to use a class in an explicitly scoped "std::" currently leads to this error: + if (scope == NULL_TREE) +return; + if (TREE_CODE (scope) != NAMESPACE_DECL) +return; + /* We

Re: [PATCH] Fix PR80492

2017-04-25 Thread Richard Biener
On Tue, 25 Apr 2017, Richard Biener wrote: > > The following fixes redundant hard-register "stores" to be not eliminated > by FRE/PRE and the alias machinery to properly handle different > local VAR_DECLs with the same asm specification. > > Comments are welcome. I tested the testcase on

Re: [PING][PATCH][AArch64] Implement ALU_BRANCH fusion

2017-04-25 Thread Wilco Dijkstra
Hi Naveen, > https://gcc.gnu.org/ml/gcc-patches/2017-03/msg01369.html Same comment for this part, we want to return true if we match: + if (SET_DEST (curr_set) != (pc_rtx) + || GET_CODE (SET_SRC (curr_set)) != IF_THEN_ELSE + || ! REG_P (XEXP (XEXP (SET_SRC (curr_set), 0),

  1   2   >