Re: [PATCH] libstdc++/77641 fix std::variant for literal types

2016-09-21 Thread Ville Voutilainen
This problem is not introduced by the latest patch, but it's something that we should look at anyway. There's been recent discussion about what assignments do with variants that hold references. Consider this: #include int main() { float f1 = 1.0f, f2 = 2.0f; std::variant v1(f1); v1 =

Re: PR35503 - warn for restrict pointer

2016-09-21 Thread Prathamesh Kulkarni
On 20 September 2016 at 18:31, Joseph Myers wrote: > On Tue, 20 Sep 2016, Prathamesh Kulkarni wrote: > >> Could someone please take a look at the change to c-format.c, I am not sure >> if I have added that correctly. > > Any changes to these GCC formats also require tests to be updated > (gcc.dg/f

[Patch, avr] Provide correct LD offset bound in avr_address_cost

2016-09-21 Thread Senthil Kumar Selvaraj
Hi, This patch fixes cost computation in avr_address_cost - instead of the hardcoded 61, it uses the already existing MAX_LD_OFFSET(mode) macro. This showed up when investigating a code size regression in the ivopts pass. That pass computes address_cost with and without an offset to dec

Re: [PATCH] libstdc++/77641 fix std::variant for literal types

2016-09-21 Thread Tim Shen
On Wed, Sep 21, 2016 at 1:52 AM, Jonathan Wakely wrote: > THanks, OK for trunk. Committed. Thanks! -- Regards, Tim Shen

Re: [PATCH] Fix various minor gimple-ssa-sprintf.c issues

2016-09-21 Thread Martin Sebor
On 09/21/2016 09:09 AM, Jakub Jelinek wrote: Hi! When looking at PR77676, I've noticed various small formatting etc. issues, like not using is_gimple_* APIs where we have them, not using gimple_call_builtin_p/gimple_call_fndecl (this one actually can show up, if e.g. uses the builtin with incorr

[PATCH] Introduce selftest::locate_file

2016-09-21 Thread David Malcolm
On Mon, 2016-09-19 at 11:31 -0600, Jeff Law wrote: > On 09/16/2016 03:19 PM, David Malcolm wrote: > > > > > When possible I don't think we want the tests to be target > > > specific. > > > Hmm, I'm probably about to argue for Bernd's work... The 71779 > > > testcase > > > is a great example -- it

Re: [PATCH] fix ILP32 bootstrap failures due to -Wformat-length

2016-09-21 Thread Martin Sebor
On 09/21/2016 05:09 PM, Jakub Jelinek wrote: On Wed, Sep 21, 2016 at 04:39:42PM -0600, Martin Sebor wrote: diff --git a/gcc/gimple-ssa-sprintf.c b/gcc/gimple-ssa-sprintf.c index dddb026..652d3fb 100644 --- a/gcc/gimple-ssa-sprintf.c +++ b/gcc/gimple-ssa-sprintf.c @@ -210,8 +210,8 @@ struct forma

Re: [PATCH] fix ILP32 bootstrap failures due to -Wformat-length

2016-09-21 Thread Jakub Jelinek
On Wed, Sep 21, 2016 at 04:39:42PM -0600, Martin Sebor wrote: > diff --git a/gcc/gimple-ssa-sprintf.c b/gcc/gimple-ssa-sprintf.c > index dddb026..652d3fb 100644 > --- a/gcc/gimple-ssa-sprintf.c > +++ b/gcc/gimple-ssa-sprintf.c > @@ -210,8 +210,8 @@ struct format_result > static HOST_WIDE_INT > ta

[PATCH] fix ILP32 bootstrap failures due to -Wformat-length

2016-09-21 Thread Martin Sebor
As mentioned in PR77676. the gimple-ssa-sprintf.c pass committed yesterday caused a number of bootstrap failures, including on ILP32 targets. All of them were due to differences between integer sizes between the host and the target. To unblock the powerpc64 bootstrap failure reported in the PR I

RE: [PATCH] Fix PR tree-optimization/77654

2016-09-21 Thread Doug Gilmore
> From: Richard Biener [rguent...@suse.de] > Sent: Wednesday, September 21, 2016 12:48 AM > To: Doug Gilmore > Cc: gcc-patches@gcc.gnu.org; rgue...@gcc.gnu.org > Subject: RE: [PATCH] Fix PR tree-optimization/77654 > > On Tue, 20 Sep 2016, Doug Gilmore wrote: > > > It looks like the original messa

Re: [PATCH] Handle VECTOR_CST in integer_nonzerop()

2016-09-21 Thread Patrick Palka
On Tue, Sep 20, 2016 at 8:20 AM, Marc Glisse wrote: > On Mon, 19 Sep 2016, Patrick Palka wrote: > >> On Wed, Sep 14, 2016 at 1:58 AM, Marc Glisse wrote: >>> >>> On Fri, 19 Aug 2016, Patrick Palka wrote: >>> On Fri, Aug 19, 2016 at 7:30 PM, Patrick Palka wrote: > > > integer

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-09-21 Thread Gerald Pfeifer
On Wed, 21 Sep 2016, Martin Sebor wrote: >> Is it possible that is related to your warning patches? > Yes, this is likely the same bug as mentioned in comment #6 on > pr77676. The bug in the comment ILP32-specific and only tangentially > related to the PR itself. I'm testing the patch that's atta

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-09-21 Thread Jakub Jelinek
On Wed, Sep 21, 2016 at 01:55:33PM -0600, Martin Sebor wrote: > On 09/21/2016 01:40 PM, Gerald Pfeifer wrote: > >I noticed the following bootstrap failure on i?86-unknown-freebsd > >that started in the last 24 hours: > > > >/scratch/tmp/gerald/gcc-HEAD/gcc/vec.c: In member function ‘void > >vec_us

[PATCH] fix ICE on %lf directive in format_floating in gimple-ssa-sprintf.c (middle-end/77683)

2016-09-21 Thread Martin Sebor
The attached patch corrects the handling of the 'l' length modifier for floating point directives (such as %lf) where it's specified to have no effect. It also replaces the gcc_unreachable() macro with a return statement telling the pass to give up on unknown length modifiers (rather than abort).

Re: [PATCH] accept flexible arrays in struct in unions (c++/71912 - [6/7 regression])

2016-09-21 Thread Jason Merrill
On Tue, Sep 20, 2016 at 1:01 PM, Martin Sebor wrote: > On 09/16/2016 12:19 PM, Jason Merrill wrote: >> On 09/14/2016 01:03 PM, Martin Sebor wrote: >>> >>> + /* Type of the member. */ >>> + tree fldtype = TREE_CODE (fld) == FIELD_DECL ? TREE_TYPE (fld) >>> : fld; >> >> Why set "fldtype"

Re: [PATCH] Fix PR tree-optimization/77550

2016-09-21 Thread Bernd Edlinger
On 09/21/16 21:57, Christophe Lyon wrote: > Hi, > > The new testcase pr77550.C fails on arm: > /testsuite/g++.dg/pr77550.C:39:43: error: 'operator new' takes type > 'size_t' ('unsigned int') as first parameter [-fpermissive] > compiler exited with status 1 > > Christophe > Yes, I see, thanks. Thi

Re: [PATCH, v2] Introduce class rtx_reader

2016-09-21 Thread Richard Sandiford
David Malcolm writes: > On Fri, 2016-09-16 at 16:04 -0600, Jeff Law wrote: >> On 09/08/2016 06:30 PM, David Malcolm wrote: >> > Bundle up various global variables within gensupport.c into a >> > class rtx_reader, with a view towards making it easier to run the >> > code more than once in-process.

Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context

2016-09-21 Thread Bernd Edlinger
On 09/21/16 21:03, Jason Merrill wrote: > On Wed, Sep 21, 2016 at 11:43 AM, Bernd Edlinger > wrote: >> On 09/21/16 17:00, Jason Merrill wrote: >>> On 09/20/2016 02:40 PM, Bernd Edlinger wrote: On 09/20/16 16:51, Jason Merrill wrote: > On Tue, Sep 20, 2016 at 10:11 AM, Bernd Edlinger >

Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context

2016-09-21 Thread Jason Merrill
On Wed, Sep 21, 2016 at 3:52 PM, Bernd Edlinger wrote: > On 09/21/16 21:03, Jason Merrill wrote: >> On Wed, Sep 21, 2016 at 11:43 AM, Bernd Edlinger >> wrote: >>> On 09/21/16 17:00, Jason Merrill wrote: On 09/20/2016 02:40 PM, Bernd Edlinger wrote: > On 09/20/16 16:51, Jason Merrill wrot

Re: C++ PATCH to forbid use of bool with the ++ operator

2016-09-21 Thread Marek Polacek
On Wed, Sep 21, 2016 at 03:45:55PM -0400, Jason Merrill wrote: > On Wed, Sep 14, 2016 at 1:38 PM, Jason Merrill wrote: > >> * c-c++-common/gomp/atomic-12.c: Use -Wno-deprecated. > >> * c-c++-common/gomp/atomic-13.c: Likewise. > >> * c-c++-common/gomp/atomic-14.c: Likewise.

Re: [PATCH] Fix PR tree-optimization/77550

2016-09-21 Thread Christophe Lyon
On 21 September 2016 at 09:16, Richard Biener wrote: > On Tue, 20 Sep 2016, Bernd Edlinger wrote: > >> On 09/20/16 09:41, Richard Biener wrote: >> > On Mon, 19 Sep 2016, Bernd Edlinger wrote: >> > >> >> On 09/19/16 11:25, Richard Biener wrote: >> >>> On Sun, 18 Sep 2016, Bernd Edlinger wrote: >> >

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-09-21 Thread Martin Sebor
On 09/21/2016 01:40 PM, Gerald Pfeifer wrote: I noticed the following bootstrap failure on i?86-unknown-freebsd that started in the last 24 hours: /scratch/tmp/gerald/gcc-HEAD/gcc/vec.c: In member function ‘void vec_usage::dump(mem_location*, mem_usage&) const’: /scratch/tmp/gerald/gcc-HEAD/gcc

Re: C/C++ PATCH to implement -Wpointer-compare warning (PR c++/64767)

2016-09-21 Thread Jason Merrill
On Mon, Sep 19, 2016 at 2:49 PM, Jason Merrill wrote: > I suppose that an INTEGER_CST of character type is necessarily a > character constant, so adding a check for !char_type_p ought to do the > trick. Indeed it does. I'm checking this in: commit d2f237ef0f63b3ee3da79bcbfad08fedb325d554 Author:

Re: C++ PATCH to forbid use of bool with the ++ operator

2016-09-21 Thread Jason Merrill
On Wed, Sep 14, 2016 at 1:38 PM, Jason Merrill wrote: >> * c-c++-common/gomp/atomic-12.c: Use -Wno-deprecated. >> * c-c++-common/gomp/atomic-13.c: Likewise. >> * c-c++-common/gomp/atomic-14.c: Likewise. >> * g++.dg/cpp1y/lambda-init11.C: Remove invalid code. >>

Re: [v3 PATCH] PR libstdc++/77288 and the newest proposed resolution for LWG 2756

2016-09-21 Thread Ville Voutilainen
On 21 September 2016 at 12:31, Jonathan Wakely wrote: > On 06/09/16 09:00 +0300, Ville Voutilainen wrote: >> >>PR libstdc++/77288 >>* include/std/optional (__is_optional_impl, __is_optional): Remove. >>(__converts_from_optional, __assigns_from_optional): New. >>(optional(_Up&&)): U

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-09-21 Thread Gerald Pfeifer
I noticed the following bootstrap failure on i?86-unknown-freebsd that started in the last 24 hours: /scratch/tmp/gerald/gcc-HEAD/gcc/vec.c: In member function ‘void vec_usage::dump(mem_location*, mem_usage&) const’: /scratch/tmp/gerald/gcc-HEAD/gcc/vec.c:79:3: error: ‘%s’ directive writing betw

Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context

2016-09-21 Thread Bernd Edlinger
On 09/21/16 21:03, Jason Merrill wrote: > On Wed, Sep 21, 2016 at 11:43 AM, Bernd Edlinger > wrote: >> Yes. I think that goes in the right direction, >> but it does not work yet. >> >> #define XXX (a ? 2 : 3) >> >> if (XXX) // prints a warning, but it should not. > > Indeed, that was too simplist

Re: Implement -Wimplicit-fallthrough (version 9)

2016-09-21 Thread Jason Merrill
On 09/21/2016 02:59 PM, Marek Polacek wrote: + if (statement == NULL_TREE + && attr != NULL_TREE + && maybe_attribute_fallthrough_p (attr)) +{ + /* Turn [[fallthrough]]; into FALLTHROUGH ();. */ + statement = build_call_expr_internal_loc (loc, IFN_FALLTHROUGH, +

Re: Implement -Wimplicit-fallthrough (version 9)

2016-09-21 Thread Marek Polacek
On Wed, Sep 21, 2016 at 10:06:07AM -0400, Jason Merrill wrote: > On 09/21/2016 08:44 AM, Marek Polacek wrote: > > @@ -10733,12 +10758,35 @@ cp_parser_expression_statement (cp_parser* > > parser, tree in_statement_expr) > > statement. */ > >if (cp_lexer_next_token_is_not (parser->lexer,

Re: [PATCH], PR 77670, Fix PowerPC ISA 3.0 -mpower9-minmax code generation

2016-09-21 Thread Segher Boessenkool
On Tue, Sep 20, 2016 at 07:38:43PM -0400, Michael Meissner wrote: > Since this is in ISA 3.0 code only, I did not do the full bootstrap and make > check sequence. I can do this if you prefer. Yes, please do, to make sure you didn't accidentally break something else. > Is the patch ok to put into

[PATCH] print-rtx.c: add 'h', v' and 'p' prefixes to regnos

2016-09-21 Thread David Malcolm
On Tue, 2016-09-20 at 15:12 -0400, David Malcolm wrote: > On Tue, 2016-09-20 at 09:20 -0600, Jeff Law wrote: > > On 09/20/2016 08:34 AM, Bernd Schmidt wrote: > > > On 09/20/2016 04:32 PM, David Malcolm wrote: > > > > > > > > To summarize so far: you want every pseudo to have its regno > > > > dumpe

Re: [Fortran, Patch] First patch for coarray FAILED IMAGES (TS 18508)

2016-09-21 Thread Alessandro Fanfarillo
Thanks Andre. 2016-09-19 9:55 GMT-06:00 Andre Vehreschild : > Hi Alessandro, > The if in resolve.c at 8837: resolve_failed_image (... is intentional? It is > doing nothing. So do you plan to add more code, or will there never be > anything. If the later I recommend to just put a comment there and

Add _FloatN, _FloatNx tests for __builtin_fpclassify

2016-09-21 Thread Joseph Myers
This patch adds tests for _FloatN and _FloatNx arguments to the __builtin_fpclassify type-generic built-in function, omitted from the original tests for type-generic functions on these types. Tested for x86_64-pc-linux-gnu; all the supported new tests pass. Committed. 2016-09-21 Joseph Myers

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-09-21 Thread Pedro Alves
On 09/21/2016 03:59 PM, Szabolcs Nagy wrote: > On 21/09/16 15:37, Alexander Monakov wrote: >> On Wed, 21 Sep 2016, Martin Sebor wrote: >>> On 09/21/2016 01:11 AM, Markus Trippelsdorf wrote: The patch uses "nul" instead of "null" throughout. >>> >>> Yes, that's intentional. NUL and null are al

Re: [PATCH 4/4][Ada,DJGPP] Ada support for DJGPP

2016-09-21 Thread Andris Pavenis
On 09/04/2016 09:52 PM, Arnaud Charlet wrote: This last patch (4/4) contains DJGPP related changes to adaint.c (except one which belongs to patch 1/4). This patch is quite intrusive. Are all these changes really needed? New version of patch is in attachment. char __gnat_get_default_identi

[RFC] Extend ipa-bitwise-cp with pointer alignment propagation

2016-09-21 Thread Prathamesh Kulkarni
Hi, The attached patch tries to extend ipa bits propagation to handle pointer alignment propagation. The patch just disables ipa-cp-alignment pass, I suppose we want to eventually remove it ? Bootstrap+tested on x86_64-unknown-linux-gnu. Cross-tested on arm*-*-*, aarch64*-*-*. Does the patch look

[PATCH, v2] Introduce class rtx_reader

2016-09-21 Thread David Malcolm
On Fri, 2016-09-16 at 16:04 -0600, Jeff Law wrote: > On 09/08/2016 06:30 PM, David Malcolm wrote: > > Bundle up various global variables within gensupport.c into a > > class rtx_reader, with a view towards making it easier to run the > > code more than once in-process. > > > > gcc/ChangeLog: > >

Re: [gofrontend-dev] Go patch committed: Avoid warning by using a local var for std::ofstream

2016-09-21 Thread Florian Weimer
* Carlos O'Donell: >> Yes, and for the warning to go away, GCC's MALLOC_ABI_ALIGNMENT needs >> to be increased as well, I think. > > This is not required. Strictly speaking, that's true. > The __attribute__((__aligned__(16))); is not required for pthread locks > to work correctly, it is simply t

Re: C/C++ PATCH to implement -Wbool-operation (PR c/77490)

2016-09-21 Thread Jason Merrill
On 09/20/2016 01:13 PM, Marek Polacek wrote: On Mon, Sep 19, 2016 at 02:41:04PM -0400, Jason Merrill wrote: On 09/16/2016 05:01 AM, Marek Polacek wrote: @@ -5853,7 +5853,16 @@ cp_build_unary_op (enum tree_code code, tree xarg, bool noconvert,

Re: [gofrontend-dev] Go patch committed: Avoid warning by using a local var for std::ofstream

2016-09-21 Thread Carlos O'Donell
On 09/21/2016 10:56 AM, Florian Weimer wrote: > * John David Anglin: > >> On Tue, Sep 20, 2016 at 09:27:17PM +0200, Florian Weimer wrote: >>> * Ian Lance Taylor: >>> GCC PR 77625 is about a warning while compiling the Go frontend. The Go frontend called `new std::ofstream()`, and the wa

Re: [PATCH][3/n] dwarf2out refactoring for early (LTO) debug

2016-09-21 Thread Jason Merrill
Looks good. On Wed, Sep 21, 2016 at 4:37 AM, Richard Biener wrote: > On Wed, Aug 26, 2015 at 1:34 PM, Richard Biener wrote: >> >> The following fixes a GC issue I run into when doing >> prune_unused_types_prune early. The issue is that the DIE struct >> has a chain_circular marked field (die_si

Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context

2016-09-21 Thread Bernd Edlinger
On 09/21/16 17:00, Jason Merrill wrote: > On 09/20/2016 02:40 PM, Bernd Edlinger wrote: >> On 09/20/16 16:51, Jason Merrill wrote: >>> On Tue, Sep 20, 2016 at 10:11 AM, Bernd Edlinger >>> wrote: I think I will have to suppress the warning if the conditional is in a macro somehow. >>> >>>

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-09-21 Thread Jeff Law
On 09/21/2016 01:11 AM, Markus Trippelsdorf wrote: On 2016.09.11 at 20:03 -0600, Martin Sebor wrote: On 09/08/2016 04:10 PM, Joseph Myers wrote: On Thu, 8 Sep 2016, Martin Sebor wrote: PR middle-end/49905 - Better sanity checking on sprintf src & dest to produce warning for dodgy cod

Re: C/C++ PATCH to implement -Wbool-operation (PR c/77490)

2016-09-21 Thread Marek Polacek
On Wed, Sep 21, 2016 at 11:37:32AM -0400, Jason Merrill wrote: > On 09/20/2016 01:13 PM, Marek Polacek wrote: > > On Mon, Sep 19, 2016 at 02:41:04PM -0400, Jason Merrill wrote: > > > On 09/16/2016 05:01 AM, Marek Polacek wrote: > > > > @@ -5853,7 +5853,16 @@ cp_build_unary_op (enum tree_code code,

Re: [PATCH] Fix ICE with inlining and #pragma omp simd (PR fortran/77665)

2016-09-21 Thread Alexander Monakov
On Wed, 21 Sep 2016, Jakub Jelinek wrote: > The simduid pass uses the cfun->has_simduid_loops flag to determine if it > needs to clean up any left-over GOMP_SIMD_* internal functions. > During inlining, we set the flag if we inline some loop with simduid, or if > we find GOMP_SIMD_ORDERED_* interna

[PATCH, testsuite]: Remove debug statements from gcc.c-torture/unsorted/dump-noaddr.x

2016-09-21 Thread Uros Bizjak
2016-09-21 Uros Bizjak * gcc.c-torture/unsorted/dump-noaddr.x: Remove debug statements. Tested on x86_64-linux-gnu {,-m32}, committed to mainline SVN and release branches. Uros. diff --git a/gcc/testsuite/gcc.c-torture/unsorted/dump-noaddr.x b/gcc/testsuite/gcc.c-torture/unsorted/dump-no

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-09-21 Thread Martin Sebor
On 09/21/2016 08:37 AM, Alexander Monakov wrote: On Wed, 21 Sep 2016, Martin Sebor wrote: On 09/21/2016 01:11 AM, Markus Trippelsdorf wrote: The patch uses "nul" instead of "null" throughout. Yes, that's intentional. NUL and null are alternate spellings for the same character. I went with nu

[PATCH] Fix various minor gimple-ssa-sprintf.c issues

2016-09-21 Thread Jakub Jelinek
Hi! When looking at PR77676, I've noticed various small formatting etc. issues, like not using is_gimple_* APIs where we have them, not using gimple_call_builtin_p/gimple_call_fndecl (this one actually can show up, if e.g. uses the builtin with incorrect arguments (fewer, different types etc.)), o

Re: [C++ PATCH] Aligned new option handling fixes (PR c++/77651)

2016-09-21 Thread Jason Merrill
OK. On Wed, Sep 21, 2016 at 10:46 AM, Jakub Jelinek wrote: > Hi! > > The following patch fixes some ICEs which were because of missing > RejectNegative for the *aligned-new= options - they have their "negative" > values as the option argument, so the only options that should allow > negative form

Re: Add FALLTHRU to gimple-ssa-sprintf.c

2016-09-21 Thread Martin Sebor
On 09/21/2016 05:07 AM, Marek Polacek wrote: On Wed, Sep 21, 2016 at 12:57:23PM +0200, Jakub Jelinek wrote: On Wed, Sep 21, 2016 at 12:52:33PM +0200, Marek Polacek wrote: Pointed out by Tobias. This looks like a missing fallthru marker. Ok? 2016-09-21 Marek Polacek * gimple-ssa-s

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-09-21 Thread Szabolcs Nagy
On 21/09/16 15:37, Alexander Monakov wrote: > On Wed, 21 Sep 2016, Martin Sebor wrote: >> On 09/21/2016 01:11 AM, Markus Trippelsdorf wrote: >>> The patch uses "nul" instead of "null" throughout. >> >> Yes, that's intentional. NUL and null are alternate spellings for >> the same character. I went

Re: [gofrontend-dev] Go patch committed: Avoid warning by using a local var for std::ofstream

2016-09-21 Thread Florian Weimer
* John David Anglin: > On Tue, Sep 20, 2016 at 09:27:17PM +0200, Florian Weimer wrote: >> * Ian Lance Taylor: >> >> > GCC PR 77625 is about a warning while compiling the Go frontend. The >> > Go frontend called `new std::ofstream()`, and the warning is "error: >> > `new' of type `std::ofstream {

Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context

2016-09-21 Thread Bernd Edlinger
On 09/21/16 16:38, Richard Earnshaw (lists) wrote: > On 20/09/16 16:30, Bernd Schmidt wrote: >> On 09/20/2016 05:18 PM, Jeff Law wrote: I assume HARD_FRAME_POINTER_REGNUM is never zero. >>> It could be zero. It's just a hard register number. No target has the >>> property that its hard frame

Re: [PATCH v2][AArch64] Fix symbol offset limit

2016-09-21 Thread Wilco Dijkstra
ping   Wilco wrote:    > The original example is from GCC itself, the fixed_regs array is small but > due to > optimization we can end up with &fixed_regs + 0x. We could also check the bounds of each symbol if they exist, like the patch below. In aarch64_classify_symbol symbols a

[PATCH] Fix ICE with inlining and #pragma omp simd (PR fortran/77665)

2016-09-21 Thread Jakub Jelinek
Hi! The simduid pass uses the cfun->has_simduid_loops flag to determine if it needs to clean up any left-over GOMP_SIMD_* internal functions. During inlining, we set the flag if we inline some loop with simduid, or if we find GOMP_SIMD_ORDERED_* internal call, but the testcase shows that we need t

[C++ PATCH] Aligned new option handling fixes (PR c++/77651)

2016-09-21 Thread Jakub Jelinek
Hi! The following patch fixes some ICEs which were because of missing RejectNegative for the *aligned-new= options - they have their "negative" values as the option argument, so the only options that should allow negative forms are -Wno-aligned-new and -fno-aligned-new, not -Wno-aligned-new=none o

Re: [PATCH][AArch64] Improve stack adjustment

2016-09-21 Thread Wilco Dijkstra
ping From: Wilco Dijkstra Sent: 23 August 2016 15:49 To: Richard Earnshaw; GCC Patches Cc: nd Subject: Re: [PATCH][AArch64] Improve stack adjustment   ping     Richard Earnshaw wrote: > I see you've added a default argument for your new parameter.  I think > doing that is fine, but I have tw

Re: [PATCH][AArch64] Align FP callee-saves

2016-09-21 Thread Wilco Dijkstra
ping From: Wilco Dijkstra Sent: 08 September 2016 14:35 To: GCC Patches Cc: nd Subject: [PATCH][AArch64] Align FP callee-saves   If the number of integer callee-saves is odd, the FP callee-saves use 8-byte aligned LDP/STP.  Since 16-byte alignment may be faster on some CPUs, align the FP cal

Re: [PATCH] Optimise the fpclassify builtin to perform integer operations when possible

2016-09-21 Thread Richard Earnshaw (lists)
On 13/09/16 12:35, Wilco Dijkstra wrote: > Jakub wrote: >> On Mon, Sep 12, 2016 at 04:19:32PM +, Tamar Christina wrote: >>> This patch adds an optimized route to the fpclassify builtin >>> for floating point numbers which are similar to IEEE-754 in format. >>> >>> The goal is to make it faster

Re: [PATCH][AArch64 - v3] Simplify eh_return implementation

2016-09-21 Thread Wilco Dijkstra
ping From: Wilco Dijkstra Sent: 02 September 2016 12:31 To: Ramana Radhakrishnan; GCC Patches Cc: nd Subject: Re: [PATCH][AArch64 - v3] Simplify eh_return implementation   Ramana Radhakrishnan wrote: > Can you please file a PR for this and add some testcases ?  This sounds like > a serious e

Re: [gofrontend-dev] Go patch committed: Avoid warning by using a local var for std::ofstream

2016-09-21 Thread John David Anglin
On Tue, Sep 20, 2016 at 09:27:17PM +0200, Florian Weimer wrote: > * Ian Lance Taylor: > > > GCC PR 77625 is about a warning while compiling the Go frontend. The > > Go frontend called `new std::ofstream()`, and the warning is "error: > > `new' of type `std::ofstream {aka std::basic_ofstream}' wit

[committed] Cherry-pick libasan C++17 aligned new support

2016-09-21 Thread Jakub Jelinek
Hi! Upstream has accepted my PR77567 changes, I've bootstrapped/regtested its backport on x86_64-linux and committed to trunk. 2016-09-21 Jakub Jelinek PR sanitizer/77567 * asan/asan_new_delete.cc: Cherry-pick upstream r282019. --- libsanitizer/asan/asan_new_delete.cc.jj

Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context

2016-09-21 Thread Richard Earnshaw (lists)
On 20/09/16 16:30, Bernd Schmidt wrote: > On 09/20/2016 05:18 PM, Jeff Law wrote: >>> I assume HARD_FRAME_POINTER_REGNUM is never zero. >> It could be zero. It's just a hard register number. No target has the >> property that its hard frame pointer register is 0 though :-) > > git blame to the r

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-09-21 Thread Alexander Monakov
On Wed, 21 Sep 2016, Martin Sebor wrote: > On 09/21/2016 01:11 AM, Markus Trippelsdorf wrote: > > The patch uses "nul" instead of "null" throughout. > > Yes, that's intentional. NUL and null are alternate spellings for > the same character. I went with nul to distinguish it from the null > pointe

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-09-21 Thread Martin Sebor
On 09/21/2016 01:11 AM, Markus Trippelsdorf wrote: On 2016.09.11 at 20:03 -0600, Martin Sebor wrote: On 09/08/2016 04:10 PM, Joseph Myers wrote: On Thu, 8 Sep 2016, Martin Sebor wrote: PR middle-end/49905 - Better sanity checking on sprintf src & dest to produce warning for dodgy cod

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-09-21 Thread Martin Sebor
On 09/21/2016 04:36 AM, Christophe Lyon wrote: Hi Martin, On 21 September 2016 at 09:11, Markus Trippelsdorf wrote: On 2016.09.11 at 20:03 -0600, Martin Sebor wrote: On 09/08/2016 04:10 PM, Joseph Myers wrote: On Thu, 8 Sep 2016, Martin Sebor wrote: PR middle-end/49905 - Better sanity che

Re: Implement -Wimplicit-fallthrough (version 9)

2016-09-21 Thread Jason Merrill
On 09/21/2016 08:44 AM, Marek Polacek wrote: @@ -10733,12 +10758,35 @@ cp_parser_expression_statement (cp_parser* parser, tree in_statement_expr) statement. */ if (cp_lexer_next_token_is_not (parser->lexer, CPP_SEMICOLON)) { + /* This might be attribute fallthrough. */ +

Re: [PATCH GCC][v2]Simplify alias check code generation in vectorizer

2016-09-21 Thread Richard Biener
On Tue, Sep 20, 2016 at 5:25 PM, Bin Cheng wrote: > Hi, > I originally posted a patch improving code generation for alias check in > vectorizer at https://gcc.gnu.org/ml/gcc-patches/2016-06/msg00929.html. Here > it's the 2nd version (better) patch. It detects data reference pair in which > th

Re: [PATCH] Implement C++17 node extraction and insertion (P0083R5)

2016-09-21 Thread Jonathan Wakely
This mail got rejected from gcc-patches as spam. The attachment can be found at https://gcc.gnu.org/ml/libstdc++/2016-09/msg00115.html On 21/09/16 14:48 +0100, Jonathan Wakely wrote: This implements container node extraction/insertion, and merging. The patch includes Debug Mode support and pret

Re: [patch] Fix ICE on ACATS test for Aarch64 at -O

2016-09-21 Thread Eric Botcazou
> Is this really safe. If I look at where we call > expand_shift/expand_shift_1 I get real worried that we could end up > using that NULL value in a context where it's not expected. > > So while emit_store_flag_force knows what to do upon NULL return, I'm > not sure the other users of expand_shift

Re: [PATCH 1/17][ARM] Add ARMv8.2-A command line option and profile.

2016-09-21 Thread Ramana Radhakrishnan
On Mon, Jul 4, 2016 at 2:46 PM, Matthew Wahab wrote: > On 17/05/16 15:22, Matthew Wahab wrote: >> This patch adds the command options for the architecture ARMv8.2-A and >> the half-precision extension. The architecture is selected by >> -march=armv8.2-a and has all the properties of -march=armv8.1

Re: [PATCHv3, resent] Add a warning for suspicious use of conditional expressions in boolean context

2016-09-21 Thread Trevor Saunders
On Tue, Sep 20, 2016 at 11:48:04PM -0400, Eric Gallager wrote: > On 9/20/16, Trevor Saunders wrote: > > On Wed, Sep 21, 2016 at 01:13:41AM +0200, Bernd Schmidt wrote: > >> On 09/21/2016 01:09 AM, Trevor Saunders wrote: > >> > > >> > I thought I remember discussing this macro with you, but see what

Re: [ARM] FP16 ARM Alternative format variants of AAPCS tests.

2016-09-21 Thread Matthew Wahab
On 03/08/16 12:43, Ramana Radhakrishnan wrote: On Mon, Jun 27, 2016 at 11:09 AM, Matthew Wahab wrote: Tests added for FP16 argument and return values being passed in registers only check the case when the FP16 IEEE format is used. This patch adds equivalent tests that also check the behaviour

[PATCH] Refactor section/label init for early LTO debug

2016-09-21 Thread Richard Biener
The following patch ports a refactoring of section/label in it from the early LTO debug work to trunk. For early LTO debug we need to be able to emit two sets of debug infos into two sets of different sections - early LTO into .gnu.debuglto_ prefixed sections and regular (early + late) debug for

RE: [PATCH] Disable -mbranch-likely for -Os when targetting generic architecture

2016-09-21 Thread Matthew Fortune
Robert Suchanek writes: > Hi Catherine, > > Apologies for the (very) late reply. > It appears that I never replied to the last message. > > > > gcc/ > > > * config/mips/mips-cpus.def: Replace PTF_AVOID_BRANCHLIKELY with > > > PTF_AVOID_BRANCHLIKELY_ALWAYS for generic architecture and with >

Re: Implement -Wimplicit-fallthrough (version 9)

2016-09-21 Thread Marek Polacek
On Tue, Sep 20, 2016 at 12:26:11PM -0400, Jason Merrill wrote: > On 09/20/2016 11:33 AM, Marek Polacek wrote: > > @@ -5135,6 +5135,30 @@ cp_parser_primary_expression (cp_parser *parser, > > case RID_AT_SELECTOR: > > return cp_parser_objc_expression (parser); > > > > + case RID_ATTRIBUT

Re: [PATCH] Fix JUMP_LABEL documentation

2016-09-21 Thread Bernd Schmidt
On 09/20/2016 08:51 PM, Segher Boessenkool wrote: * doc/rtl.texi (JUMP_LABEL): Document RETURN and SIMPLE_RETURN values. Ok, thanks. Bernd

Re: [PATCH, 5.x/6.x/7.x] Be more conservative in early inliner if FDO is enabled

2016-09-21 Thread Yuan, Pengfei
> > Btw, It occurs to me that then win in code-size might be purely due to the > > smaller base value for the TU size we use to compute the maximum unit > > growth with ... any idea how to improve it on this side? Say, computing > > the TU size before early optimization (uh, probably not ...) > >

Re: [RFC][IRA]Initialize ira_use_lra_p early by moving the initialization into ira_init_once ().

2016-09-21 Thread Bernd Schmidt
On 09/21/2016 01:46 PM, Renlin Li wrote: * ira.c (ira): Move ira_use_lra_p initialization code to ... (ira_init_once): Here. LGTM. Bernd

[RFC][IRA]Initialize ira_use_lra_p early by moving the initialization into ira_init_once ().

2016-09-21 Thread Renlin Li
Hi, ira_use_lra_p is a global variable use in ira as well as backend_init_target (). It's fine to be used in IRA as it's will be initialized at the beginning of ira pass. However, early in backend_init_target (), this variable may not be initialized yet. There is a check in backend_init_targ

Re: Make regcprop to eliminate noop moves better

2016-09-21 Thread Eric Botcazou
> while working on the GCN port I ended up with many redundant register copies > of the form > mov reg, exec > do something > mov reg, exec > do something > ... > these copies are generated by LRA because exec is small register class and > needs a lot of reloading (it could be improved too, bu

Re: Add FALLTHRU to gimple-ssa-sprintf.c

2016-09-21 Thread Jakub Jelinek
On Wed, Sep 21, 2016 at 01:07:20PM +0200, Marek Polacek wrote: > On Wed, Sep 21, 2016 at 12:57:23PM +0200, Jakub Jelinek wrote: > > On Wed, Sep 21, 2016 at 12:52:33PM +0200, Marek Polacek wrote: > > > Pointed out by Tobias. This looks like a missing fallthru marker. > > > > > > Ok? > > > > > > 2

Re: Add FALLTHRU to gimple-ssa-sprintf.c

2016-09-21 Thread Marek Polacek
On Wed, Sep 21, 2016 at 12:57:23PM +0200, Jakub Jelinek wrote: > On Wed, Sep 21, 2016 at 12:52:33PM +0200, Marek Polacek wrote: > > Pointed out by Tobias. This looks like a missing fallthru marker. > > > > Ok? > > > > 2016-09-21 Marek Polacek > > > > * gimple-ssa-sprintf.c (pass_sprintf_

Re: Add FALLTHRU to gimple-ssa-sprintf.c

2016-09-21 Thread Jakub Jelinek
On Wed, Sep 21, 2016 at 12:52:33PM +0200, Marek Polacek wrote: > Pointed out by Tobias. This looks like a missing fallthru marker. > > Ok? > > 2016-09-21 Marek Polacek > > * gimple-ssa-sprintf.c (pass_sprintf_length::compute_format_length): > Add falls through comment. This is o

Add FALLTHRU to gimple-ssa-sprintf.c

2016-09-21 Thread Marek Polacek
Pointed out by Tobias. This looks like a missing fallthru marker. Ok? 2016-09-21 Marek Polacek * gimple-ssa-sprintf.c (pass_sprintf_length::compute_format_length): Add falls through comment. diff --git gcc/gimple-ssa-sprintf.c gcc/gimple-ssa-sprintf.c index 0afcf68..dddb026

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-09-21 Thread Christophe Lyon
Hi Martin, On 21 September 2016 at 09:11, Markus Trippelsdorf wrote: > On 2016.09.11 at 20:03 -0600, Martin Sebor wrote: >> On 09/08/2016 04:10 PM, Joseph Myers wrote: >> > On Thu, 8 Sep 2016, Martin Sebor wrote: > >> PR middle-end/49905 - Better sanity checking on sprintf src & dest to >>

Re: [v3 PATCH] Implement LWG 2729 for pair.

2016-09-21 Thread Jonathan Wakely
On 17/08/16 07:41 +0300, Ville Voutilainen wrote: Implement LWG 2729 for pair. * include/bits/stl_pair.h (_PCC): New. (_ConstructiblePair, _ImplicitlyConvertiblePair): Turn into static member functions of _PCC. (_MoveConstructiblePair, _ImplicitlyMoveConvertiblePair): Likewise.

[Patch, fortran] Clean up of error recovery in DTIO procedures

2016-09-21 Thread Paul Richard Thomas
Dear All, Please find attached a patch to clean up the various issues with errors in DTIO procedures. The tests were all provided by Gerhard Steinmetz for which thanks are due. I intend to commit this patch as 'obvious' tomorrow morning unless there are any objections in the meantime. Bootstrapp

[PATCH, libgfortran] Use rand_s on MinGW-w64, fix bounds overflow

2016-09-21 Thread Janne Blomqvist
Hi, per private mail I got a bug report about the new RANDOM_NUMBER not working correctly on windows in certain situations. I think the reason for this might be an array bounds overflow in the fallback code (in case /dev/urandom doesn't exist), which this patch fixes. Also, on Windows the equival

Re: [v3 PATCH, RFC] Implement LWG 2729 for tuple

2016-09-21 Thread Jonathan Wakely
On 31/08/16 19:49 +0300, Ville Voutilainen wrote: @@ -338,6 +345,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } }; + template +struct __is_tuple_impl_trait_impl : false_type + { }; + + template +struct __is_tuple_impl_trait_impl<_Tuple_impl<_Idx, _Tp...>> : true_type + { }; + +

Re: [Patch AArch64] Add floatdihf2 and floatunsdihf2 patterns

2016-09-21 Thread James Greenhalgh
On Tue, Sep 13, 2016 at 10:31:28AM +0100, James Greenhalgh wrote: > On Tue, Sep 06, 2016 at 10:19:50AM +0100, James Greenhalgh wrote: > > This patch adds patterns for conversion from 64-bit integer to 16-bit > > floating-point values under AArch64 targets which don't have support for > > the ARMv8.

Re: [v3 PATCH] PR libstdc++/77288 and the newest proposed resolution for LWG 2756

2016-09-21 Thread Jonathan Wakely
On 06/09/16 09:00 +0300, Ville Voutilainen wrote: PR libstdc++/77288 * include/std/optional (__is_optional_impl, __is_optional): Remove. (__converts_from_optional, __assigns_from_optional): New. (optional(_Up&&)): Use is_same instead of __is_optional. (optional(const optional<_Up>&

Re: [PATCH] (PR 65950) Improve predicate for exit(0);

2016-09-21 Thread Richard Biener
On Wed, Sep 21, 2016 at 10:45 AM, Andrew Pinski wrote: > On Wed, Sep 21, 2016 at 4:32 PM, Richard Biener > wrote: >> On Wed, Sep 21, 2016 at 9:13 AM, Andrew Pinski wrote: >>> Hi, >>> While looking through bug reports, I noticed someone had reported >>> that LTO caused the vectorizer not to kic

Re: [PATCH] libstdc++/77641 fix std::variant for literal types

2016-09-21 Thread Jonathan Wakely
On 20/09/16 11:03 -0700, Tim Shen wrote: On Mon, Sep 19, 2016 at 1:06 PM, Tim Shen wrote: I believe that it's a "typo" from me - it should be is_trivially_destructible, not is_default_constructible (so that we can avoid using aligned_storage in the corresponding specialization). is_literal_type

Re: [PATCH GCC 6/9]Simplify control flow graph for vectorized loop

2016-09-21 Thread Bin.Cheng
On Wed, Sep 14, 2016 at 5:43 PM, Jeff Law wrote: > On 09/14/2016 07:21 AM, Richard Biener wrote: >> >> On Tue, Sep 6, 2016 at 8:52 PM, Bin Cheng wrote: >>> >>> Hi, >>> This is the main patch improving control flow graph for vectorized loop. >>> It generally rewrites loop peeling stuff in vectoriz

Re: [PATCH] (PR 65950) Improve predicate for exit(0);

2016-09-21 Thread Andrew Pinski
On Wed, Sep 21, 2016 at 4:32 PM, Richard Biener wrote: > On Wed, Sep 21, 2016 at 9:13 AM, Andrew Pinski wrote: >> Hi, >> While looking through bug reports, I noticed someone had reported >> that LTO caused the vectorizer not to kick in. Originally it was not >> obvious why it would change the

Re: [PATCH][3/n] dwarf2out refactoring for early (LTO) debug

2016-09-21 Thread Richard Biener
On Wed, Aug 26, 2015 at 1:34 PM, Richard Biener wrote: > > The following fixes a GC issue I run into when doing > prune_unused_types_prune early. The issue is that the DIE struct > has a chain_circular marked field (die_sib) which cannot tolerate > spurious extra entries from old removed entries

Re: [PATCH][ARM][v2] Use snprintf rather than sprintf

2016-09-21 Thread Kyrill Tkachov
On 20/09/16 18:56, Pedro Alves wrote: On 09/20/2016 05:49 PM, Kyrill Tkachov wrote: Ok, I'm proposing a new function defined in system.h (though I'm open to suggestions for other location). It would be something like: static inline int ATTRIBUTE_PRINTF_3 gcc_snprintf (char *str, size_t size,

Re: Fortran, committed: segfault with allocate and stat for derived types with default initialization (pr 68078)

2016-09-21 Thread Louis Krupp
Having heard no objections, I changed pr68068 to { target x86_64-*-linux* } in revision 240304. My comment in pr68078.f90: ! This test calls set_vm_limit to set an artificially low address space ! limit. set_vm_limit calls setrlimit, which has some portability ! considerations. setrlimit gets

Re: [PATCH] (PR 65950) Improve predicate for exit(0);

2016-09-21 Thread Richard Biener
On Wed, Sep 21, 2016 at 9:13 AM, Andrew Pinski wrote: > Hi, > While looking through bug reports, I noticed someone had reported > that LTO caused the vectorizer not to kick in. Originally it was not > obvious why it would change the behavior since this was a simple > program with nothing out of

  1   2   >