Re: [PATCH] Teach VRP to register assertions along default switch labels (PR 18046)

2016-07-22 Thread Patrick Palka
On Fri, 22 Jul 2016, Patrick Palka wrote: > On Fri, 22 Jul 2016, Patrick Palka wrote: > > > This patch teaches VRP to register along a default switch label > > assertions that corresponds to the anti range of each case label. > > > > Does this look OK to commit after bootstrap + regtest on > > x

Re: [libstdc++] Add C++17clamp

2016-07-22 Thread Jonathan Wakely
On 22/07/16 17:12 -0400, NightStrike wrote: Would it be possible to fix the missed optimization to give the better asm without having to do -ffast-math as mentioned here: https://gcc.gnu.org/ml/gcc-help/2014-11/msg00034.html If so, then the proposed implementation would be optimized for the sim

C++ PATCH for c++/71350 (error recursion with initializer-list)

2016-07-22 Thread Jason Merrill
Here the problem was just that we were failing to check complain for the missing braces warning. Tested x86_64-pc-linux-gnu, applying to trunk. commit 9d4ef5496bdd42e5986a06089901631983b04846 Author: Jason Merrill Date: Fri Jul 22 14:42:53 2016 -0400 PR c++/71515 - typename in partial

Re: C++ PATCH for c++/71748 (call to base dtor in template)

2016-07-22 Thread Jason Merrill
On Fri, Jul 22, 2016 at 7:32 PM, Jason Merrill wrote: > The fix for 52746 was incomplete; it didn't propagate the > adjust_result_of_qualified_name_lookup handling from lookup_destructor > to tsubst_baselink. Fixed thus. > > Tested x86_64-pc-linux-gnu, applying to trunk. commit 732dce1a04cbe7d9d6

C++ PATCH for c++/71748 (call to base dtor in template)

2016-07-22 Thread Jason Merrill
The fix for 52746 was incomplete; it didn't propagate the adjust_result_of_qualified_name_lookup handling from lookup_destructor to tsubst_baselink. Fixed thus. Tested x86_64-pc-linux-gnu, applying to trunk.

Re: [PATCH, contrib] download_prerequisites: check for existing symlinks before making new ones

2016-07-22 Thread Jeff Law
On 07/21/2016 12:15 PM, Bernd Edlinger wrote: Hi, > So rather than relying on ln to remove the link, why don't we just > explicitly remove it with rm -f? sounds good, I ran into similar issues already. ln -nfs does not follow the target if it is a symlink -n, --no-dereference

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

2016-07-22 Thread Jeff Law
Working through the new pass... Overall it looks pretty good. There's a certain level of trust I'll extend WRT getting the low level details right -- a thorough testsuite obviously helps there. +const pass_data pass_data_sprintf_length = { + GIMPLE_PASS,// pass type + "sprintf_le

Re: [PATCH], Fix PowerPC multi-line string formating issue

2016-07-22 Thread Segher Boessenkool
On Fri, Jul 22, 2016 at 03:51:31PM -0400, Michael Meissner wrote: > In working on the vector extracts, I noticed that the function > altivec_resolve_overloaded_builtin has two strings that span more than one > line. This confuses the diff -p command, as it thinks modified code after the > long lin

Implement C _FloatN, _FloatNx types [version 5]

2016-07-22 Thread Joseph Myers
[Version 5 is respun to apply without conflicts to current sources but has no other changes.] ISO/IEC TS 18661-3:2015 defines C bindings to IEEE interchange and extended types, in the form of _FloatN and _FloatNx type names with corresponding fN/FN and fNx/FNx constant suffixes and FLTN_* / FLTNX

Merge from trunk to gccgo branch

2016-07-22 Thread Ian Lance Taylor
I merged trunk revision 238662 to the gccgo branch. Ian

[PR fortran/71859] Patch

2016-07-22 Thread Steve Kargl
I intend to commit the following patch in approximately 2 * exp(1.) = 5.436 hours. 2016-07-22 Steven G. Kargl PR fortran/71859 * check.c(numeric_check): Prevent ICE. Issue error for invalid subroutine as an actual argument when numeric argument is expected. 2016-07-22

Re: [libstdc++] Add C++17clamp

2016-07-22 Thread NightStrike
Would it be possible to fix the missed optimization to give the better asm without having to do -ffast-math as mentioned here: https://gcc.gnu.org/ml/gcc-help/2014-11/msg00034.html If so, then the proposed implementation would be optimized for the simple case. On Fri, Jul 22, 2016 at 3:55 AM, J

Re: [PR fortran/71862] Patch

2016-07-22 Thread Paul Richard Thomas
Hi Steve, It looks good to me. OK to commit for as far back as you have a mind to go. Cheers Paul On 22 July 2016 at 21:52, Steve Kargl wrote: > I intend to commit the following patch and close the > PR in approximate 6.283 hours. > > 2016-07-22 Steven G. Kargl > > PR fortran/71862

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

2016-07-22 Thread Jakub Jelinek
On Mon, Jul 18, 2016 at 03:59:11PM -0600, Martin Sebor wrote: > + /* Try to use __builtin_object_size although it rarely returns > + a useful result even for straighforward cases. */ > + tree ost = warn_format_length < 2 > +? integer_zero_node : build_int_cst (size_type_node, 2); > + tr

[PR fortran/71862] Patch

2016-07-22 Thread Steve Kargl
I intend to commit the following patch and close the PR in approximate 6.283 hours. 2016-07-22 Steven G. Kargl PR fortran/71862 * class.c: Remove assert. Iterate over component only if non-null. 2016-07-22 Steven G. Kargl PR fortran/71862 * gfortran.dg/p

[PATCH], Fix PowerPC multi-line string formating issue

2016-07-22 Thread Michael Meissner
In working on the vector extracts, I noticed that the function altivec_resolve_overloaded_builtin has two strings that span more than one line. This confuses the diff -p command, as it thinks modified code after the long line is in another function. This patch fixes the formatting. I did a boots

Re: [PATCH] Teach VRP to register assertions along default switch labels (PR 18046)

2016-07-22 Thread Patrick Palka
On Fri, 22 Jul 2016, Patrick Palka wrote: > This patch teaches VRP to register along a default switch label > assertions that corresponds to the anti range of each case label. > > Does this look OK to commit after bootstrap + regtest on > x86_64-pc-linux-gnu? Forgot the changelog: gcc/ChangeLog

[PATCH] Teach VRP to register assertions along default switch labels (PR 18046)

2016-07-22 Thread Patrick Palka
This patch teaches VRP to register along a default switch label assertions that corresponds to the anti range of each case label. Does this look OK to commit after bootstrap + regtest on x86_64-pc-linux-gnu? --- gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-6.c | 2 +- gcc/testsuite/gcc.dg/tree-s

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

2016-07-22 Thread Jeff Law
On 07/21/2016 03:57 PM, Martin Sebor wrote: The pass only runs once. Without optimization, it's invoked early, does its thing, and is never invoked again. With optimization, it's also invoked early but returns without doing anything, only to to invoked again much later on to do real work. I w

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

2016-07-22 Thread Martin Sebor
r231665 committed in the 6.0 cycle tightened up the checking of flexible array members in C++ with the goal of rejecting code that could lead to hard to find bugs, while at the same time accepting (with a warning) benign extensions also accepted in C mode. c++/71912 is a complaint that G++ reject

[Committed] PR fortran/71935

2016-07-22 Thread Steve Kargl
I've committed the following patch under "obviously correct." 2016-07-22 Steven G. Kargl PR fortran/71935 * check.c (is_c_interoperable): Simplify right expression. 2016-07-22 Steven G. Kargl PR fortran/71935 * gfortran.dg/c_sizeof_1.f90: Move invalid code

Re: [libstdc++] Add C++17clamp

2016-07-22 Thread Jonathan Wakely
On 22/07/16 19:38 +0200, Daniel Krügler wrote: 2016-07-22 9:55 GMT+02:00 Jonathan Wakely : On 22/07/16 08:51 +0100, Jonathan Wakely wrote: On 21/07/16 19:38 -0400, NightStrike wrote: On Thu, Jul 14, 2016 at 7:50 PM, Ed Smith-Rowland <3dw...@verizon.net> wrote: Here is an implementation of

libgo patch committed: Update to 1.7rc3

2016-07-22 Thread Ian Lance Taylor
I have committed a patch to update libgo to the 1.7rc3 release candidate. This is very close to the upcoming 1.7 release. As usual with libgo updates, the patch is too large to include in this e-mail message. I've appended the changes to the gccgo-specific directories. Ian Index: gcc/go/gofront

Re: [libstdc++] Add C++17clamp

2016-07-22 Thread Daniel Krügler
2016-07-22 9:55 GMT+02:00 Jonathan Wakely : > On 22/07/16 08:51 +0100, Jonathan Wakely wrote: >> >> On 21/07/16 19:38 -0400, NightStrike wrote: >>> >>> On Thu, Jul 14, 2016 at 7:50 PM, Ed Smith-Rowland <3dw...@verizon.net> >>> wrote: Here is an implementation of P0025 An algorithm to

Re: [PATCH] nvptx: do not implicitly enable -ftoplevel-reorder

2016-07-22 Thread Alexander Monakov
On Fri, 22 Jul 2016, Bernd Schmidt wrote: > What's the motivation for supporting -fno-toplevel-reorder anyway? That's > practically just a legacy mode as far as I know. I've made the prerequisite middle-end patch after noticing that libgcc explicitly enables -fno-toplevel-reorder (and that was bre

Re: [PATCH] doc fix for c/71560 - union compound literal initializes wrong union field

2016-07-22 Thread Martin Sebor
On 07/14/2016 11:16 AM, Jeff Law wrote: On 07/14/2016 09:03 AM, Martin Sebor wrote: Ping. The updated patch at the link below corrects the issues with the tags pointed out by Sandra in her review. https://gcc.gnu.org/ml/gcc-patches/2016-07/msg00350.html OK. jeff Thanks. After committing i

Re: [PATCH] Avoid invoking ranlib on libbackend.a

2016-07-22 Thread Andreas Schwab
Patrick Palka writes: > ... so it's weird that your build times are constant because building > a thin archive is much faster than building a regular archive and > using a thin archive should not make subsequent steps, like linking > that archive, slower. So overall build times should be lower.

Re: Merge switch statements in tree-cfgcleanup

2016-07-22 Thread Jeff Law
On 07/22/2016 07:13 AM, Richard Biener wrote: + if (dom_info_available_p (CDI_DOMINATORS)) I think DOM info is always available during CFG cleanup My recollection is that the cfg cleanup routines start by removing unreachables, then recomputing the dominator tree if it's not available. That

Re: [PATCH] nvptx: do not implicitly enable -ftoplevel-reorder

2016-07-22 Thread Bernd Schmidt
On 07/22/2016 05:19 PM, Alexander Monakov wrote: I hope I've satisfactorily explained the failures you've pointed out (thanks for the data). I think I should leave the choice of what to do next (revert the patch or leave it in and install fixups where appropriate) up to you? What's the motivat

Re: [Fortran, Patch, PR71807, v1] [5/6/7 Regression] Internal compiler error with NULL() reference in structure constructor

2016-07-22 Thread Andre Vehreschild
Hi all, committed to gcc-6-branch as r238649, and to gcc-5-branch as r238650. Regards, Andre On Fri, 15 Jul 2016 11:29:37 +0200 Andre Vehreschild wrote: > Hi Jerry, > > thanks for the fast review. Committed to trunk as r238368. > > Regards, > Andre > > On Thu, 14 Jul 2016 10:4

Re: [PATCH] nvptx: do not implicitly enable -ftoplevel-reorder

2016-07-22 Thread Alexander Monakov
On Thu, 21 Jul 2016, Thomas Schwinge wrote: > Hmm. In an offloading configuration I see the following regression: First of all: sorry about this (bah, this is fairly embarrassing, while I forgot to check offloading, I should have seen the fallout in check-c testing; might have tested the wrong so

[C PATCH] Don't mark C99 inline functions as always_inline (PR c/71969)

2016-07-22 Thread Jakub Jelinek
Hi! As Richard reported on IRC, we are marking C99 inline (without extern) functions as effectively always_inline, even when the intent has been to do this only for the GNU extern inline functions (i.e. -fgnu89-inline extern inline or extern inline __attribute__((gnu_inline))). Fixed thusly, boot

[PATCH] Move allocator in std::string and RB tree move constructors

2016-07-22 Thread Jonathan Wakely
The move constructors for strings and RB trees were not move constructing the allocator. PR libstdc++/71964 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string::_Alloc_hider(pointer, _Alloc&&)): Add constructor. * include/bits/stl_tree.h (_Rb_tree(

Re: [RFC][IPA-VRP] Re-factor tree-vrp to factor out common code

2016-07-22 Thread kugan
Hi Richard, Thanks for the review. On 22/07/16 22:49, Richard Biener wrote: On Fri, Jul 22, 2016 at 2:27 PM, kugan wrote: Hi, Now that early vrp is moved as part of tree-vrp, there is only minimal interface tree-vrp should expose for ipa-vrp. However, I have not found the right place to plac

Patch ping

2016-07-22 Thread Cesar Philippidis
The following patches still need to be reviewed: * Change an LTO wrapper assert failure to an error when it detects missing symbols. This situation can arise in offloading code, e.g. when the user forgets to declare a global variable as offloadable. https://gcc.gnu.org/ml/gcc-patches/2016-0

Re: Rework C/C++ OpenACC routine parsing (was: C/C++: Simplify handling of location information for OpenACC routine directives)

2016-07-22 Thread Jakub Jelinek
On Wed, Jul 13, 2016 at 04:10:31PM +0200, Thomas Schwinge wrote: > @@ -14029,29 +14032,32 @@ c_parser_oacc_kernels_parallel (location_t loc, > c_parser *parser, > static void > c_parser_oacc_routine (c_parser *parser, enum pragma_context context) > { > - tree decl = NULL_TREE; > + gcc_checkin

[PATCH]: A couple of remaining conversions to HOST_WIDE_INT_{,M}1{,U}

2016-07-22 Thread Uros Bizjak
c/ChangeLog: 2016-07-22 Uros Bizjak * c-typeck.c: Use HOST_WIDE_INT_1 instead of (HOST_WIDE_INT) 1, c-family/ChangeLog: 2016-07-22 Uros Bizjak * c-common.c: Use HOST_WIDE_INT_M1U instead of ~(unsigned HOST_WIDE_INT) 0. Bootstrapped and regression tested on x86_64-linux-gnu,

Re: [PATCH] Add a STATIC_ASSERT on sizeof (struct cp_token)

2016-07-22 Thread Jakub Jelinek
On Fri, Jul 22, 2016 at 10:33:50AM -0400, David Malcolm wrote: > gcc/cp/ChangeLog: > * parser.h (struct cp_token): Add a STATIC_ASSERT on the > size of the struct. > --- > gcc/cp/parser.h | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/gcc/cp/parser.h b/gcc/cp/parser

[PATCH] Add a STATIC_ASSERT on sizeof (struct cp_token)

2016-07-22 Thread David Malcolm
On Fri, 2016-07-22 at 13:06 +0200, Jakub Jelinek wrote: > On Fri, Jul 22, 2016 at 12:44:07PM +0200, Marek Polacek wrote: > > --- gcc/gcc/cp/parser.h > > +++ gcc/gcc/cp/parser.h > > @@ -46,7 +46,7 @@ struct GTY (()) cp_token { > > Otherwise, this value is RID_MAX. */ > >ENUM_BITFIELD (rid

Re: [PATCH] Adapt the numbering scheme (PR gcov-profile/64874)

2016-07-22 Thread Jakub Jelinek
On Fri, Jul 22, 2016 at 01:46:44PM +0200, Martin Liška wrote: > As described in the PR, current numbering scheme in gcov-io.h would overflow > in couple of years. > Thus, I'm suggesting to switch from: > > [major][minor/10][minor%10][release_status] > > to: > [major/10][major%10][minor][release_

Re: Merge switch statements in tree-cfgcleanup

2016-07-22 Thread Richard Biener
On Wed, Jul 20, 2016 at 6:26 PM, Bernd Schmidt wrote: > On 07/20/2016 06:09 PM, Jeff Law wrote: >> >> So I'm going to let Richi run with the review on this one since the two >> of you are already iterating. But I did have one comment on the >> placement of the pass. >> >> I believe one of the key

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-22 Thread Bernd Edlinger
On 07/22/16 14:28, Richard Biener wrote: > On Thu, 21 Jul 2016, Bernd Edlinger wrote: > >> Hi, >> >> based on the discussion here, I have updated my patch again... >> >> This is the rest of the patch, which removes outdated function names, >> and creates built-in definitions for vfork, getcontext

Re: [PATCH] rs6000: Fix logic for when to emit .machine (PR71216)

2016-07-22 Thread David Edelsohn
On Fri, Jul 22, 2016 at 4:36 AM, Segher Boessenkool wrote: > The current logic determining whether to use .machine in the generated > asm code puts it there if the compiler is not configured with a default > target cpu, _or_ no -mcpu= was given on the command line. It should > be "and" instead. >

Re: [RFC][IPA-VRP] Re-factor tree-vrp to factor out common code

2016-07-22 Thread Richard Biener
On Fri, Jul 22, 2016 at 2:27 PM, kugan wrote: > Hi, > > Now that early vrp is moved as part of tree-vrp, there is only minimal > interface tree-vrp should expose for ipa-vrp. However, I have not found the > right place to place struct value_range (with GTY marker) and enum > value_range_type. > >

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-22 Thread Bernd Edlinger
On 07/21/16 23:57, Bernd Edlinger wrote: > Hi, > > based on the discussion here, I have updated my patch again... > > This is the rest of the patch, which removes outdated function names, > and creates built-in definitions for vfork, getcontext, savectx. > These built-ins have the return_twice attr

Re: [PATCH] Fix early debug regression with DW_AT_string_length (PR debug/71906)

2016-07-22 Thread Richard Biener
On Fri, Jul 22, 2016 at 2:08 PM, Jakub Jelinek wrote: > On Fri, Jul 22, 2016 at 01:55:22PM +0200, Richard Biener wrote: >> > @@ -19201,18 +19205,70 @@ gen_array_type_die (tree type, dw_die_re >> >if (size >= 0) >> > add_AT_unsigned (array_die, DW_AT_byte_size, size); >> >el

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-22 Thread Jakub Jelinek
On Fri, Jul 22, 2016 at 02:28:15PM +0200, Richard Biener wrote: > As DEF_EXT_LIB_BUILTIN won't have any effect with -std=c99 for example > I don't think having the builtins helps much. I think we have Well, -std=gnu11 is the default, so it will help. Jakub

Re: [PATCH] Fix unsafe function attributes for special functions (PR 71876)

2016-07-22 Thread Richard Biener
On Thu, 21 Jul 2016, Bernd Edlinger wrote: > Hi, > > based on the discussion here, I have updated my patch again... > > This is the rest of the patch, which removes outdated function names, > and creates built-in definitions for vfork, getcontext, savectx. > These built-ins have the return_twice

Re: [RFC][IPA-VRP] Re-factor tree-vrp to factor out common code

2016-07-22 Thread kugan
Hi, Now that early vrp is moved as part of tree-vrp, there is only minimal interface tree-vrp should expose for ipa-vrp. However, I have not found the right place to place struct value_range (with GTY marker) and enum value_range_type. enum value_range_type is needed in tree-ssanames.[h|c] a

Re: [PATCH] Avoid invoking ranlib on libbackend.a

2016-07-22 Thread Patrick Palka
On Fri, Jul 22, 2016 at 8:02 AM, Patrick Palka wrote: > On Fri, Jul 22, 2016 at 2:19 AM, Andrew Pinski wrote: >> On Wed, Jul 20, 2016 at 7:11 AM, Patrick Palka wrote: >>> On Wed, 20 Jul 2016, Bernd Schmidt wrote: >>> On 07/19/2016 10:20 AM, Richard Biener wrote: > I like it. Improving

Re: [Patch GCC/01]Bring back warning message on loop whose counter might overflow

2016-07-22 Thread Bin.Cheng
On Fri, Jul 22, 2016 at 12:39 PM, Richard Biener wrote: > On Thu, Jul 21, 2016 at 6:48 PM, Bin Cheng wrote: >> Hi, >> Previous patch removed warning message on loops whose counter might >> overflow, while this patch adds it back. Reason is it's always good to have >> a warning message indicati

Re: [RFC][IPA-VRP] Early VRP Implementation

2016-07-22 Thread kugan
Hi Richard, Thanks for the review. On 18/07/16 21:51, Richard Biener wrote: On Fri, Jul 15, 2016 at 9:33 AM, kugan wrote: Hi Andrew, On 15/07/16 17:28, Andrew Pinski wrote: On Fri, Jul 15, 2016 at 12:08 AM, kugan wrote: Hi Andrew, Why separate out early VRP from tree-vrp? Just a litt

Re: [PATCH] Fix early debug regression with DW_AT_string_length (PR debug/71906)

2016-07-22 Thread Jakub Jelinek
On Fri, Jul 22, 2016 at 01:55:22PM +0200, Richard Biener wrote: > > @@ -19201,18 +19205,70 @@ gen_array_type_die (tree type, dw_die_re > >if (size >= 0) > > add_AT_unsigned (array_die, DW_AT_byte_size, size); > >else if (TYPE_DOMAIN (type) != NULL_TREE > > - &&

Re: [PATCH] Avoid invoking ranlib on libbackend.a

2016-07-22 Thread Patrick Palka
On Fri, Jul 22, 2016 at 2:19 AM, Andrew Pinski wrote: > On Wed, Jul 20, 2016 at 7:11 AM, Patrick Palka wrote: >> On Wed, 20 Jul 2016, Bernd Schmidt wrote: >> >>> On 07/19/2016 10:20 AM, Richard Biener wrote: >>> > I like it. Improving re-build time in my dev tree is very much >>> > welcome, and

Re: [PATCH 2/2][v3] Drop excess size used for run time allocated stack variables.

2016-07-22 Thread Dominik Vogt
On Thu, Jul 21, 2016 at 02:07:05PM -0600, Jeff Law wrote: > On 06/23/2016 03:57 AM, Dominik Vogt wrote: > >>and use that rather than rounding size up to an alignment boundary. > > > >Not exactly. Consider the unpatched code. At the beginning we > >have some amount of space to be allocated on the

Re: [PATCH] Adapt the numbering scheme (PR gcov-profile/64874)

2016-07-22 Thread Nathan Sidwell
On 07/22/16 07:46, Martin Liška wrote: Hi. As described in the PR, current numbering scheme in gcov-io.h would overflow in couple of years. Thus, I'm suggesting to switch from: [major][minor/10][minor%10][release_status] to: [major/10][major%10][minor][release_status] If I'm reading that ri

Re: [PATCH] Fix early debug regression with DW_AT_string_length (PR debug/71906)

2016-07-22 Thread Richard Biener
On Thu, Jul 21, 2016 at 6:53 PM, Jakub Jelinek wrote: > Hi! > > The early debug changes broke e.g. following testcase: > program pr71906 > character(len=8) :: vard > character(len=:), allocatable :: vare > type t > character(len=:), allocatable :: f > end type > type(t) :: varf > a

[PATCH] Adapt the numbering scheme (PR gcov-profile/64874)

2016-07-22 Thread Martin Liška
Hi. As described in the PR, current numbering scheme in gcov-io.h would overflow in couple of years. Thus, I'm suggesting to switch from: [major][minor/10][minor%10][release_status] to: [major/10][major%10][minor][release_status] Patch can bootstrap on ppc64le-redhat-linux and survives regress

Re: [PATCH GCC/02]Remove -funsafe-loop-optimizations option.

2016-07-22 Thread Richard Biener
On Thu, Jul 21, 2016 at 6:49 PM, Bin Cheng wrote: > Hi, > This patch removes support for -funsafe-loop-optimizations on both GIMPLE and > RTL level by marking it as ignored. > Bootstrap and test on x86_64. Is it OK? Ok. Richard. > Thanks, > bin > > 2016-07-20 Bin Cheng > > * common

Re: [Patch GCC/01]Bring back warning message on loop whose counter might overflow

2016-07-22 Thread Richard Biener
On Thu, Jul 21, 2016 at 6:48 PM, Bin Cheng wrote: > Hi, > Previous patch removed warning message on loops whose counter might overflow, > while this patch adds it back. Reason is it's always good to have a warning > message indicating missed loop optimizations. Also warning message itself is

Re: [PATCH] predict.c: merge multi-edges

2016-07-22 Thread Martin Liška
On 07/22/2016 12:53 PM, Segher Boessenkool wrote: > Hi Martin, > > On Fri, Jul 22, 2016 at 10:17:51AM +0200, Martin Liška wrote: >> /* We can not predict the probabilities of outgoing edges of bb. Set them >> - evenly and hope for the best. */ >> + evenly and hope for the best. If UNLIKELY

[PATCH] rs6000: Fix logic for when to emit .machine (PR71216)

2016-07-22 Thread Segher Boessenkool
The current logic determining whether to use .machine in the generated asm code puts it there if the compiler is not configured with a default target cpu, _or_ no -mcpu= was given on the command line. It should be "and" instead. Tested on powerpc64-linux (-m32 as well). Also tested manually with

Re: [PATCH, vec-tails 07/10] Support loop epilogue combining

2016-07-22 Thread Richard Biener
On Thu, Jul 21, 2016 at 6:34 PM, Jeff Law wrote: > On 07/21/2016 03:15 AM, Ilya Enkovich wrote: >> >> In my list I see #1, #4, and #5 are not approved. > > So I think Richi wanted to see param control for the new options; Joseph > wanted the new options properly documented in invoke.texi; I had a

Re: Implement -Wimplicit-fallthrough: the rest

2016-07-22 Thread Bernd Schmidt
On 07/22/2016 01:15 PM, Jakub Jelinek wrote: @@ -32335,6 +32341,7 @@ rs6000_handle_altivec_attribute (tree *node, case V4SImode: case V8HImode: case V16QImode: case V4SFmode: case V2DImode: case V2DFmode: result = type; + gcc_fallthrough (); default: brea

Re: Implement -Wimplicit-fallthrough: the rest

2016-07-22 Thread Jakub Jelinek
On Fri, Jul 22, 2016 at 12:44:30PM +0200, Marek Polacek wrote: > ...and the boring part. It found a few bugs, e.g. in jcf-dump.c > and rs6000.c - I fixed those. > > I think generally it's better to use the attribute rather than a falls > through comment, because the latter can't be followed by ot

Re: Implement -Wimplicit-fallthrough: core

2016-07-22 Thread Jakub Jelinek
On Fri, Jul 22, 2016 at 12:44:07PM +0200, Marek Polacek wrote: > --- gcc/gcc/cp/parser.h > +++ gcc/gcc/cp/parser.h > @@ -46,7 +46,7 @@ struct GTY (()) cp_token { > Otherwise, this value is RID_MAX. */ >ENUM_BITFIELD (rid) keyword : 8; >/* Token flags. */ > - unsigned char flags; >

Re: [PATCH] predict.c: merge multi-edges

2016-07-22 Thread Segher Boessenkool
Hi Martin, On Fri, Jul 22, 2016 at 10:17:51AM +0200, Martin Liška wrote: > /* We can not predict the probabilities of outgoing edges of bb. Set them > - evenly and hope for the best. */ > + evenly and hope for the best. If UNLIKELY_EDGES is not null, distribute > + evel probability for a

Implement -Wimplicit-fallthrough: the rest

2016-07-22 Thread Marek Polacek
...and the boring part. It found a few bugs, e.g. in jcf-dump.c and rs6000.c - I fixed those. I think generally it's better to use the attribute rather than a falls through comment, because the latter can't be followed by other comment or a macro to work. This patch has been tested on powerpc64l

Implement -Wimplicit-fallthrough: core

2016-07-22 Thread Marek Polacek
Since my last attempt to attack this beast wasn't exactly successful, I'm offering a better version. For the general introduction regarding what and why, kindly see . What has changed: * I renamed the option to -Wimplicit-fallthrough. Whi

[Patch, fortran, committed] Fix PR 71795

2016-07-22 Thread Thomas Koenig
Hello world, I have committed the attached patch as obvious and simple after regression-testing. This fixes a regression. Will commit to the other affected branches shortly. Regards Thomas 2016-07-22 Thomas Koenig PR fortran/71795 * frontend-passes.c (combine_array

Re: [Fortran, patch, v1] Add STAT= support to caf_single get()/send()

2016-07-22 Thread Andre Vehreschild
Hi Paul, hi all, thanks for the fast review. Committed as r238636. Thanks again and regards, Andre On Thu, 21 Jul 2016 17:44:06 +0200 Paul Richard Thomas wrote: > Hi Andre, > > That looks good to me. OK for trunk. > > Thanks for the patch. > > Paul > > On 21 July 2016 at 15:31, And

Re: [Fortran, patch, committed] Help with STAT= attribute in coarray reference

2016-07-22 Thread Andre Vehreschild
Hi all, committed the cosmetics patch as r238635. Regards, Andre On Thu, 21 Jul 2016 14:57:32 +0200 Andre Vehreschild wrote: > Hi all, > > the attached patch fixes some style issues in the caf code recently > modified. Furthermore does it correct the function specifications of > caf_

Re: [RFC, v2] Test coverage for --param boundary values

2016-07-22 Thread Martin Liška
On 07/21/2016 08:53 PM, Jeff Law wrote: > On 07/18/2016 01:53 AM, Martin Liška wrote: >> You are right, I was inspired by what we do for GCC plugins in: >> gcc/testsuite/lib/plugin-support.exp >> >> where we have following comment: >> # Note that the plugin test support currently only works whe

Re: [PATCH GCC/03]New option warning missed optimization on loops whose counter may overflow

2016-07-22 Thread Bin.Cheng
On Fri, Jul 22, 2016 at 9:48 AM, Martin Jambor wrote: > On Thu, Jul 21, 2016 at 04:50:31PM +, Bin Cheng wrote: >> Hi, >> This patch adds new option -Wmissed-loop-optimizations warning on loops >> whose counter may overflow, as well as makes -Wunsafe-loop-optimizations an >> alias to the new

Re: [PATCH GCC/03]New option warning missed optimization on loops whose counter may overflow

2016-07-22 Thread Martin Jambor
On Thu, Jul 21, 2016 at 04:50:31PM +, Bin Cheng wrote: > Hi, > This patch adds new option -Wmissed-loop-optimizations warning on loops whose > counter may overflow, as well as makes -Wunsafe-loop-optimizations an alias > to the new option. > Bootstrap and test on x86_64 ongoing. Is it OK? I

Re: [patch,avr] remove secondary_reload hook implementation

2016-07-22 Thread Denis Chertykov
2016-07-21 18:33 GMT+03:00 Georg-Johann Lay : > This removes avr's TARGET_SECONDARY_RELOAD implementation which never worked > as expected... > > Its intention was to provide an 8-bit scratch register for loads from > non-generic address-spaces as they might need to set RAMPZ to the needed > flash

Re: [PATCH] Consider functions with xloc.file == NULL (PR, gcov-profile/69028)

2016-07-22 Thread Martin Liška
On 07/21/2016 10:56 AM, Richard Biener wrote: > On Wed, Jul 20, 2016 at 3:34 PM, Martin Liška wrote: >> Hi. >> >> Following patch addresses ICE which happens when coverage.c computes checksum >> of a function w/o xloc.file. My patch assumes it's a valid state having a >> function >> w/o xloc.file

[PATCH] Use correct form of delete in libstdc++.exp

2016-07-22 Thread Jonathan Wakely
Another testsuite memory bug found by ASan. * testsuite/lib/libstdc++.exp (check_v3_target_namedlocale): Use delete[] instead of delete. Tested x86_64-linux, committed to trunk. commit 001cfe5d6d3d75575efc5a746adc9b826dd5405b Author: redi Date: Fri Jul 22 08:33:26 2016 +

[PATCH] predict.c: merge multi-edges

2016-07-22 Thread Martin Liška
Hi. Following patch enhances prediction for basic blocks with >2 successor edges. Currently, even probability is set and the patch considers unlikely edges, where even probability is set for the remaining edges. I run SPEC2006 benchmark, where aforementioned BBs have following predictor distribu

Re: [libstdc++] Add C++17clamp

2016-07-22 Thread Jonathan Wakely
On 22/07/16 08:51 +0100, Jonathan Wakely wrote: On 21/07/16 19:38 -0400, NightStrike wrote: On Thu, Jul 14, 2016 at 7:50 PM, Ed Smith-Rowland <3dw...@verizon.net> wrote: Here is an implementation of P0025 An algorithm to "clamp" a value between a pair of boundary values. Testing is almost fini

Re: [libstdc++] Add C++17clamp

2016-07-22 Thread Jonathan Wakely
On 21/07/16 19:38 -0400, NightStrike wrote: On Thu, Jul 14, 2016 at 7:50 PM, Ed Smith-Rowland <3dw...@verizon.net> wrote: Here is an implementation of P0025 An algorithm to "clamp" a value between a pair of boundary values. Testing is almost finished - looks good so far. OK if testing passes?

Re: [PATCH 2/2] C++ FE: handle misspelled identifiers and typenames

2016-07-22 Thread Uros Bizjak
On Thu, Jul 21, 2016 at 7:23 PM, David Malcolm wrote: > On Thu, 2016-07-21 at 10:38 -0400, David Malcolm wrote: >> On Thu, 2016-07-21 at 10:28 -0400, David Malcolm wrote: >> > On Thu, 2016-07-21 at 09:00 +0200, Uros Bizjak wrote: >> > > Hello! >> > > >> > > > > gcc/ChangeLog: >> > > > > PR c/70339