Re: [PATCH build/doc] Replacing libiberty with gnulib

2016-08-16 Thread Joseph Myers
On Tue, 16 Aug 2016, Pedro Alves wrote: > My recollection is that those build-machine programs link with libiberty > too today, and should thus switch to gnulib as well, right? Yes. For host programs the include path for the $host build of gnulib must be used, and for build programs the

[PATCH, i386]: Split shifts with useless masked count operand to a normal shift

2016-08-16 Thread Uros Bizjak
x86 can do masking on the count operand by itself. Instead of inventing new insn, just split the combined pattern to a normal shift insn. 2016-08-16 Uros Bizjak * config/i386/i386.md (*ashl3_mask): Rewrite define_insn pattern as define_insn_and_split. Split insn

Re: [BUILDROBOT] avr broken

2016-08-16 Thread Nathan Sidwell
On 08/16/16 13:04, Jan-Benedict Glaw wrote: That'll probably work. But after all, I'm not an AVR maintainer (not even an user), but just running the Build Robot. Does your robot approve? :)

Re: [patch, Fortran] Fix PR 71902

2016-08-16 Thread Mikael Morin
Hello, Le 14/08/2016 à 15:05, Thomas Koenig a écrit : Index: frontend-passes.c === --- frontend-passes.c (Revision 239218) +++ frontend-passes.c (Arbeitskopie) @@ -177,6 +178,13 @@ realloc_string_callback (gfc_code **c, int

Re: [PATCH] Speed up ix86_expand_builtin

2016-08-16 Thread Jakub Jelinek
On Tue, Aug 16, 2016 at 09:21:57PM +0200, Uros Bizjak wrote: > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > The patch is basically unreviwable, but we have many checks in the x86 > specific testsuite that would break left and right if something is > wrong in the area

[PR fortran/77260] Patch

2016-08-16 Thread Steve Kargl
If no one objects before Saturday, I will commit the following patch. 2016-08-20 Steven G. Kargl PR fortran/77260 * trans-decl.c(generate_local_decl): Suppress warning for unused variable if symbol is entry point. 2016-08-20 Steven G. Kargl

Re: protected alloca class for malloc fallback

2016-08-16 Thread Martin Sebor
On 08/16/2016 10:47 AM, Jeff Law wrote: On 08/16/2016 10:44 AM, Jakub Jelinek wrote: On Tue, Aug 16, 2016 at 10:27:58AM -0600, Jeff Law wrote: I think you're being rather short-sighed here. GCC is being used in ways we can't necessarily predict -- which might include compile servers, JITs,

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

2016-08-16 Thread kugan
Hi Richard, On 12/08/16 20:43, Richard Biener wrote: On Wed, Aug 3, 2016 at 3:17 AM, kugan wrote: [SNIP] diff --git a/gcc/common.opt b/gcc/common.opt index 8a292ed..7028cd4 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -2482,6 +2482,10 @@ ftree-vrp

[committed] Backport r238728 testsuite g++.dg/init/elide5.C fix (PR testsuite/77034)

2016-08-16 Thread Jakub Jelinek
Hi! I've backported following fix to 6 branch: 2016-08-16 Jakub Jelinek PR testsuite/77034 Backported from mainline 2016-07-25 Jason Merrill * g++.dg/init/elide5.C (operator new): Use decltype(sizeof(1)) instead

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

2016-08-16 Thread kugan
On 23/07/16 20:12, kugan wrote: Hi Richard, As we had value_range_type in tree-ssanames.h why not put value_range there? For IPA_VRP, we now need value_range used in ipa-prop.h (in ipa-vrp patch). Based on this, attached patch now adds struct value_range to tree-ssanames.h and fixes the

[RFC][IPA-VRP] splits out the update_value_range calls from vrp_visit_stmt

2016-08-16 Thread kugan
Hi, as said the refactoring that would be appreciated is to split out the update_value_range calls from the worker functions so you can call the respective functions from the DOM implementations. That they are globbed in vrp_visit_stmt currently is due to the API of the SSA propagator. Here

Re: [PATCH] PR71752 - SLP: Maintain operand ordering when creating vec defs

2016-08-16 Thread Richard Biener
On Mon, Aug 15, 2016 at 4:16 PM, Alan Hayward wrote: > > > On 15/08/2016 12:17, "Richard Biener" wrote: > >>On Mon, Aug 15, 2016 at 11:48 AM, Alan Hayward >>wrote: >>> The testcase pr71752.c was failing because the SLP code

[PING v2] Unreviewed GCC-6 patches

2016-08-16 Thread Jakub Sejdak
Hi! I would like to ping a couple of unreviewed patches for GCC-6 branch (they are already in trunk): - Backport new Phoenix-RTOS OS name to config.sub https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01441.html - Backport support for Phoenix-RTOS targets in GCC's config for ARM platform.

[PATCH, libgfortran] Always seed the PRNG from the OS

2016-08-16 Thread Janne Blomqvist
Hi, now that I have changed the PRNG algorithm behind RANDOM_NUMBER, and thus breaking compatibility (in the weak sense that the stream of random numbers will be different), one might also do a few other minor improvements. The attached patch makes sure to always initialize the PRNG seed from

Re: [doc] Document GNU make version for libjava on Solaris

2016-08-16 Thread Eric Botcazou
> this is really strange: although I regularly use gmake 4.1 since > September last year, just this weekend I did several mainline bootstraps > on i386-pc-solaris2.10 for a reghunt in libjava. Using gmake 3.81 > worked just fine for me. The Solaris symbol versioning support has been > in libjava

Re: [RFC][IPA-VRP] splits out the update_value_range calls from vrp_visit_stmt

2016-08-16 Thread Richard Biener
On Tue, Aug 16, 2016 at 9:39 AM, kugan wrote: > Hi, > >> as said the refactoring that would be appreciated is to split out the >> update_value_range calls >> from the worker functions so you can call the respective functions >> from the DOM implementations. >>

[HSA, PATCH] HSA configure: add conditionally slash to HSA_RUNTIME_LIB

2016-08-16 Thread Martin Liška
Hello. Following patch fixes small issue in situations where --with-hsa-runtime{-lib} is not provided to configure script. Currently, we search for '/libhsa-runtime64.so', which is wrong. Installed to the HSA branch as r239495. Martin >From 0162a1ecbe9c1dd1f63db264473d2165d79e979e Mon Sep 17

Re: [PATCH] Fix PR76783

2016-08-16 Thread Richard Biener
On Tue, 16 Aug 2016, Richard Biener wrote: > > This patch fixes PR76783 by not just using any PRE order but RPO order > for the SSA propagator. This makes sure to visit PHI args from > non-backedges before the PHI node itself. > > It also fixes the assumption that BB_VISITED is well-defined on

Re: [PATCH PR69848]Avoid not insn by inverting comparison code in vcond patterns

2016-08-16 Thread Bin.Cheng
On Tue, Aug 16, 2016 at 10:53 AM, James Greenhalgh wrote: > On Wed, Aug 10, 2016 at 04:00:16PM +, Bin Cheng wrote: >> Hi, >> This is a follow up patch for previous vcond patches. In previous ones, >> we rely on combiner to simplify "X = !Y; Z = X ? A : B" into "Z =

Re: Early jump threading

2016-08-16 Thread Jan Hubicka
> I don't think the backwards/FSM threader tries to update the profile > data at all right now. This seems to be cause of the regression andrew is speaking about. I wrote updating of profile after threading few times and there was also Theresa's patch. I tought all the threaders use common

Re: [doc] Document GNU make version for libjava on Solaris

2016-08-16 Thread Rainer Orth
Hi Eric, > It turns out that neither GNU make 3.80 nor 3.81 can build libjava on Solaris > with the Solaris linker because of the final "ver-sun" recipe. Probably not > worth fixing at this point, so this patch simply documents it instead. this is really strange: although I regularly use

[wwwdocs] PATCH for Re: GCC Coding Conventions typo

2016-08-16 Thread Gerald Pfeifer
On Fri, 22 Apr 2016, Chris Gregory wrote: > https://gcc.gnu.org/codingconventions.html#ExternC > > In the `Extern "C"` commentary, the coding conventions says: > > Definitions within the body of a namespace are not indented. > > This should read > > Definitions within the body of an

Re: [PATCH, PR70895] Add copy mapping for reductions on OpenACC loop directives

2016-08-16 Thread Thomas Schwinge
Hi! On Mon, 15 Aug 2016 19:25:48 +0800, Chung-Lin Tang wrote: > per the discussion on the bugzilla PR page, reductions on OpenACC loop > directives will automatically get a copy clause mapping on an enclosing > parallel construct (unless bounded by a local variable or

[PATCH, libgfortran] Improve PRNG seed scrambling

2016-08-16 Thread Janne Blomqvist
Hi, the attached patch improves the scrambling of the seed given by the RANDOM_SEED intrinsic. Previously we shuffled the bytes in the seed back and forth, the new implementation replaces this with a "XOR cipher" (https://en.wikipedia.org/wiki/XOR_cipher). Also, now the scrambling is also done

[PATCH] Fix PR76783

2016-08-16 Thread Richard Biener
This patch fixes PR76783 by not just using any PRE order but RPO order for the SSA propagator. This makes sure to visit PHI args from non-backedges before the PHI node itself. It also fixes the assumption that BB_VISITED is well-defined on pass entry (but still keeps clearing it at the end

Re: [PATCH PR69848]Avoid not insn by inverting comparison code in vcond patterns

2016-08-16 Thread James Greenhalgh
On Wed, Aug 10, 2016 at 04:00:16PM +, Bin Cheng wrote: > Hi, > This is a follow up patch for previous vcond patches. In previous ones, > we rely on combiner to simplify "X = !Y; Z = X ? A : B" into "Z = Y ? B : A". > That works for some cases, but not all of them, for example, case in >

[PATCH] PR 72847 Prevent double-free in std::vector

2016-08-16 Thread Jonathan Wakely
This fixes a possible double-free in vector by ensuring that we don't leave dangling pointers after a call to _M_deallocate(). This means we don't provide the strong exception-safety guarantee, but I find it hard to care too much about vector. I had to change a few other places that were

Re: [PATCH PR72817/PR73450]Fix wrong code caused by niter analyzer for NE_EXPR exit cond.

2016-08-16 Thread Jakub Jelinek
On Thu, Aug 11, 2016 at 04:35:51PM +, Bin Cheng wrote: > 2016-08-11 Bin Cheng > > PR tree-optimization/72817 > PR tree-optimization/73450 > * gcc.dg/tree-ssa/pr72817.c: New test. > * gcc.dg/tree-ssa/pr73450.c: New test. > --- /dev/null > +++

Re: [WIP] [PR fortran/72741] Rework Fortran OpenACC routine clause handling

2016-08-16 Thread Thomas Schwinge
Hi! On Mon, 15 Aug 2016 18:54:49 -0700, Cesar Philippidis wrote: > For the moment, I'm ignoring the > device_type problem and handling all of the matching errors in > gfc_match_oacc_routine. OK for the moment; my idea has been to do it generally enough already now,

Update soft-fp from glibc (PR libgcc/77265)

2016-08-16 Thread Joseph Myers
This patch updates soft-fp from glibc, bringing in the fix for PR libgcc/77265, XFmode extension to TFmode wrongly turning an infinity into a NaN. A test for that bug is added. Bootstrapped with no regressions on x86_64-pc-linux-gnu. Applied to mainline. gcc/testsuite: 2016-08-16 Joseph

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

2016-08-16 Thread kugan
Hi, On 16/08/16 21:56, Richard Biener wrote: On Tue, Aug 16, 2016 at 10:09 AM, kugan wrote: On 23/07/16 20:12, kugan wrote: Hi Richard, As we had value_range_type in tree-ssanames.h why not put value_range there? For IPA_VRP, we now need value_range

Re: [v3 PATCH] Implement LWG 2758.

2016-08-16 Thread Jonathan Wakely
On 10/08/16 10:50 +0300, Ville Voutilainen wrote: diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index 59f1c64..89e2100 100644 --- a/libstdc++-v3/include/bits/basic_string.h +++ b/libstdc++-v3/include/bits/basic_string.h @@ -1227,9 +1227,13 @@

Re: [PATCH] gcov: add new option (--hash-names) (PR gcov-profile/36412).

2016-08-16 Thread Martin Liška
On 08/15/2016 02:18 PM, Nathan Sidwell wrote: > On 08/15/16 07:43, Martin Liška wrote: > >> All nits are applied in the second version of patch. >> >>> >>> don't seem to match? Why 'e'? >> >> I've renamed it to -x, well, a lot of letters are already occupied. > > I guess 'x' may be better. If

Re: [PATCH] gcov: add new option (--hash-names) (PR gcov-profile/36412).

2016-08-16 Thread Nathan Sidwell
On 08/16/16 08:41, Martin Liška wrote: Thank you for the improvement, all suggested changes are part of new version of the patch. Ready for trunk? ok, thanks nathan

Re: [PATCH] Detect whether target can use -fprofile-update=atomic

2016-08-16 Thread Nathan Sidwell
On 08/16/16 08:55, Martin Liška wrote: Hello. As reported in [1], m68k has been broken since I installed the patch. Reason is that the target does not support atomic operations (add, or) for a mode of gcov_type. Because of that, we see an undefined symbols. Proper fix contains of 2 parts: a)

Re: [wwwdocs] Improve example at https://gcc.gnu.org/gcc-6/porting_to.html#flifetime-dse

2016-08-16 Thread Jonathan Wakely
On 16/08/16 05:16 +, Bernd Edlinger wrote: Hi Jonathan, I think this would be an improvement, although I still can't get the assertion to fail: Probably because the memory is still initialized to zero, when it is used for the first time. Yes, I did try allocating the same size block,

Re: [PATCH] gcov: add new option (--hash-names) (PR gcov-profile/36412).

2016-08-16 Thread Martin Liška
On 08/16/2016 03:28 PM, Nathan Sidwell wrote: > On 08/16/16 08:41, Martin Liška wrote: > >> Thank you for the improvement, all suggested changes are part of new version >> of the patch. >> >> Ready for trunk? > > ok, thanks > > nathan > Installed as r239503. Well, the creator of the PR

Re: [BUILDROBOT] avr broken

2016-08-16 Thread Nathan Sidwell
On 08/16/16 10:23, Martin Liška wrote: On 08/16/2016 03:36 PM, Nathan Sidwell wrote: On 08/16/16 08:49, Martin Liška wrote: On 08/13/2016 02:14 PM, Jan-Benedict Glaw wrote: This doesn't work for AVR since their LONG_LONG_TYPE_SIZE depents on target flags (see eg. build

Re: Use verify_oacc_routine_clauses for C/C++

2016-08-16 Thread Thomas Schwinge
Hi! On Mon, 01 Aug 2016 17:21:37 +0200, I wrote: > Some checking of OpenACC clauses currently done in the front ends should > be moved later, and be unified. (Also, I suppose, for supporting of the > device_type clause, such checking actually *must* be moved later, into > the oaccdevlow pass, or

Re: [RFC][IPA-VRP] splits out the update_value_range calls from vrp_visit_stmt

2016-08-16 Thread kugan
Hi, On 16/08/16 20:58, Richard Biener wrote: On Tue, Aug 16, 2016 at 9:39 AM, kugan wrote: Hi, as said the refactoring that would be appreciated is to split out the update_value_range calls from the worker functions so you can call the respective functions

Re: Use correct location information for OpenACC shape and simple clauses in C/C++

2016-08-16 Thread Thomas Schwinge
Hi! On Wed, 27 Jul 2016 17:17:49 +0200, I wrote: > I found that for a lot of OpenACC (and potentially also OpenMP) clauses > (in C/C++ front ends; didn't look at Fortran), we use wrong location > information. The problem is [...] Haven't been able yet to allocate the time to incorporate David's

Re: Repeated use of the OpenACC routine directive

2016-08-16 Thread Thomas Schwinge
Hi! On Mon, 01 Aug 2016 17:51:24 +0200, I wrote: > We found that it's not correct that we currently unconditionally diagnose > an error for repeated use of the OpenACC routine directive on one > function/declaration. (For reference, it is also permissible for an > "ordinary" function to have

Re: [PR fortran/77260] Patch

2016-08-16 Thread Paul Richard Thomas
Hi Steve, Far from objecting, the patch is OK to apply before Saturday :-) Thanks for the patch. Paul On 16 August 2016 at 21:25, Steve Kargl wrote: > If no one objects before Saturday, I will commit the following patch. > > 2016-08-20 Steven G. Kargl

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

2016-08-16 Thread kugan
Hi Richard, On 17/08/16 08:20, kugan wrote: Hi, On 16/08/16 21:56, Richard Biener wrote: On Tue, Aug 16, 2016 at 10:09 AM, kugan wrote: On 23/07/16 20:12, kugan wrote: Hi Richard, As we had value_range_type in tree-ssanames.h why not put value_range

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

2016-08-16 Thread Andris Pavenis
On 08/15/2016 11:27 AM, Eric Botcazou wrote: Both '/' and '\' must be supported as directory separators. So DIR_SEPARATOR='/' is not OK in this case. Understood. Unconditional converting '/' to '\' in case of DJGPP native build causes gnatmake to break. Retested it today it with gcc-6.1.0.

Re: [PATCH, COMMITTED] Add branch_changer.py script to maintainer-scripts

2016-08-16 Thread Martin Liška
On 08/15/2016 05:40 PM, Gerald Pfeifer wrote: > Hi Martin, > > On Mon, 15 Aug 2016, Martin Liška wrote: >> Ready to be installed? > > you ignored (or I guess: missed) the updated patch that I > included in my previous message. Can you use that instead > of your original? Ah, sorry for not

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

2016-08-16 Thread Richard Biener
On Tue, Aug 16, 2016 at 10:09 AM, kugan wrote: > > > > On 23/07/16 20:12, kugan wrote: >> >> Hi Richard, >> As we had value_range_type in tree-ssanames.h why not put value_range there? >>> For IPA_VRP, we now need value_range used in ipa-prop.h

Re: Implement -Wimplicit-fallthrough: core

2016-08-16 Thread Marek Polacek
On Fri, Aug 12, 2016 at 03:58:51PM +, Joseph Myers wrote: > On Fri, 12 Aug 2016, Marek Polacek wrote: > > > Not sure if error is appropriate here, or whether I should downgrade the > > error to a warning and ignore the attribute. > > I'd say the semantics for uses of attributes that

[PATCH] [GCC] Don't use section anchors for declarations that don't fit in a single anchor range

2016-08-16 Thread Tamar Christina
Hi All, This patch turns off the usage of section anchors for declarations that do not fit in a single anchor range. A large enough object will use the full anchor range and also force the use of another anchor pointer. By not using an anchor for large objects more globals can share the same

Re: [PATCH] Add mark_spam.py script

2016-08-16 Thread Martin Liška
On 08/16/2016 12:02 AM, Joseph Myers wrote: > On Mon, 15 Aug 2016, Martin Liška wrote: > >> It can, currently we mark as spam just the first comment. If there's a spam >> PR >> which contains multiple comments, I'll extend the script. > > There certainly are spam bugs where the spammer pasted

Re: [doc] Document GNU make version for libjava on Solaris

2016-08-16 Thread Eric Botcazou
> 2016-08-15 Eric Botcazou > > * doc/install.texi (*-*-solaris2*): Fix version number and document > requirement on GNU make for building libjava with the Solaris linker. GNU make's version number changed to 3.81 after retesting on SPARC/Solaris. -- Eric

[PATCH] Detect whether target can use -fprofile-update=atomic

2016-08-16 Thread Martin Liška
Hello. As reported in [1], m68k has been broken since I installed the patch. Reason is that the target does not support atomic operations (add, or) for a mode of gcov_type. Because of that, we see an undefined symbols. Proper fix contains of 2 parts: a) compiler emission must verify that

Re: [v3 PATCH] Implement LWG 2758.

2016-08-16 Thread Jonathan Wakely
On 16/08/16 12:52 +0100, Jonathan Wakely wrote: On 10/08/16 10:50 +0300, Ville Voutilainen wrote: diff --git a/libstdc++-v3/include/bits/basic_string.h b/libstdc++-v3/include/bits/basic_string.h index 59f1c64..89e2100 100644 --- a/libstdc++-v3/include/bits/basic_string.h +++

Re: [RFC] ipa bitwise constant propagation

2016-08-16 Thread Prathamesh Kulkarni
On 12 August 2016 at 19:33, Jan Hubicka wrote: >> On 11 August 2016 at 18:25, Jan Hubicka wrote: >> >> @@ -266,6 +267,38 @@ private: >> >>bool meet_with_1 (unsigned new_align, unsigned new_misalign); >> >> }; >> >> >> >> +/* Lattice of known bits, only

Re: [v3 PATCH] Implement LWG 2758.

2016-08-16 Thread Ville Voutilainen
On 16 August 2016 at 15:58, Jonathan Wakely wrote: > This patch constrains the new overloads using: > > template >using _If_sv = enable_if_t< > __and_ __not_>::value, > _Res>; > > so that anything convertible to

Re: [BUILDROBOT] avr broken

2016-08-16 Thread Nathan Sidwell
On 08/16/16 08:49, Martin Liška wrote: On 08/13/2016 02:14 PM, Jan-Benedict Glaw wrote: This doesn't work for AVR since their LONG_LONG_TYPE_SIZE depents on target flags (see eg. build http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=602648) Hello. Sorry for the breakage, I

Re: [PATCH] gcov: add new option (--hash-names) (PR gcov-profile/36412).

2016-08-16 Thread Martin Liška
On 08/16/2016 04:58 PM, Nathan Sidwell wrote: > I see the 6 branch is now frozen, except for blocking regressions & docs. > > nathan Sure, I'm planning to commit after 6.2 will be released, thus the patch can land 6.3? Martin

Re: backward threading heuristics tweek

2016-08-16 Thread Jeff Law
On 08/15/2016 02:06 PM, Jan Hubicka wrote: So the threaded path lives fully inside loop1: 6->8->9->3->4->6 propagating that phi_inserted is 0 after the first iteration of the loop. This looks like useful loop peeling oppurtunity which does not garble loop structure. So perhaps threading paths

[PATCH] Fix UB in expand_mult_const (PR middle-end/67485)

2016-08-16 Thread Jakub Jelinek
Hi! When val_so_far is signed, we can end up in UB in various places, e.g. for the multiplication by 0x7fff, which is done as << 63 shift followed by subtracting one. Fixed by computing this in UHWI instead, and only cast at the end to SHWI. Bootstrapped/regtested on x86_64-linux

[PATCH] Fix ICE with FRE devirtualization (PR middle-end/77259)

2016-08-16 Thread Jakub Jelinek
Hi! The FRE devirtualization unlike gimple-fold or other places would transform some method call with TREE_ADDRESSABLE lhs into __builtin_unreachable call with the same lhs, which is invalid (__builtin_unreachable returns void). Also, gimple_call_fntype has not been adjusted in these cases.

Re: [PATCH] gcov: add new option (--hash-names) (PR gcov-profile/36412).

2016-08-16 Thread Nathan Sidwell
On 08/16/16 10:18, Martin Liška wrote: On 08/16/2016 03:28 PM, Nathan Sidwell wrote: On 08/16/16 08:41, Martin Liška wrote: Installed as r239503. Well, the creator of the PR reported that he's been using GCC 6.x, may I install the same patch to gcc-6 branch? I see the 6 branch is now

Re: Early jump threading

2016-08-16 Thread Jeff Law
On 08/16/2016 05:02 AM, Jan Hubicka wrote: I don't think the backwards/FSM threader tries to update the profile data at all right now. This seems to be cause of the regression andrew is speaking about. I wrote updating of profile after threading few times and there was also Theresa's patch.

Re: [PATCH] [GCC] Don't use section anchors for declarations that don't fit in a single anchor range

2016-08-16 Thread Jeff Law
On 08/16/2016 08:01 AM, Tamar Christina wrote: Hi All, This patch turns off the usage of section anchors for declarations that do not fit in a single anchor range. A large enough object will use the full anchor range and also force the use of another anchor pointer. By not using an anchor for

Re: [PATCH] Add cgraph edge for early fixup_cfg inserted __builtin_unreachable (PR target/71910)

2016-08-16 Thread Jeff Law
On 08/08/2016 01:00 PM, Jakub Jelinek wrote: Hi! In cross to mingw we ICE on the following testcase, because fixup_cfg pass adds __builtin_unreachable call without adding corresponding cgraph_edge (the body of the parallel region doesn't return, so while GOMP_parallel isn't a noreturn function,

Re: [PATCH] Move class temp_source_file from input.c to selftest.c/h

2016-08-16 Thread Jeff Law
On 08/09/2016 07:26 PM, David Malcolm wrote: I have followup patches that use this class in selftests in various places, so this patch moves it to selftest.h. Successfully bootstrapped on x86_64-pc-linux-gnu. OK for trunk? gcc/ChangeLog: * input.c (class selftest::temp_source_file):

[PATCH] Speed up ix86_expand_builtin

2016-08-16 Thread Jakub Jelinek
Hi! I've noticed today that ix86_expand_builtin is very inefficient, in order to expand each machine builtin (except for the ones handled in a switch), it searches up to 2300+ bdesc_* array elements in order to find the one it is looking for. Following patch is an attempt to speed this up, by

Re: protected alloca class for malloc fallback

2016-08-16 Thread Jeff Law
On 08/10/2016 12:33 PM, Richard Biener wrote: Why would you want to get rid of the alloca here? Do you know the range for LENGTH in the code above? Yes, it's a set of tree code names. Is it based on something the user could potentially control (like a variable name, typdef name, etc). If

Re: protected alloca class for malloc fallback

2016-08-16 Thread Jeff Law
On 08/16/2016 10:44 AM, Jakub Jelinek wrote: On Tue, Aug 16, 2016 at 10:27:58AM -0600, Jeff Law wrote: I think you're being rather short-sighed here. GCC is being used in ways we can't necessarily predict -- which might include compile servers, JITs, web services, etc. For compile server/web

Re: [PATCH] Fix UB in expand_mult_const (PR middle-end/67485)

2016-08-16 Thread Jeff Law
On 08/16/2016 09:57 AM, Jakub Jelinek wrote: Hi! When val_so_far is signed, we can end up in UB in various places, e.g. for the multiplication by 0x7fff, which is done as << 63 shift followed by subtracting one. Fixed by computing this in UHWI instead, and only cast at the end to

Re: [PATCH, i386]: Fix PR72867, incorrect optimization of VMINPS/VMAXPS at compile time

2016-08-16 Thread Jakub Jelinek
On Mon, Aug 15, 2016 at 08:53:35PM +0200, Uros Bizjak wrote: > 2016-08-15 Uros Bizjak > > PR target/72867 > * gcc.target/i386/pr72867.c: New test. The testcase fails on i686-linux, because -msse isn't provided. Fixed thusly, tested on i686-linux, committed as

Re: [PATCH] Fix caret locations in format_type_warning (PR c/72857)

2016-08-16 Thread Jeff Law
On 08/10/2016 02:10 PM, David Malcolm wrote: The patch generalizes class substring_loc from being just a range (pair of indices) to being a range plus a caret (three indices), updating c-format.c to use the appropriate caret location. Doing so means we have to pass a location_t around

Re: protected alloca class for malloc fallback

2016-08-16 Thread Jakub Jelinek
On Tue, Aug 16, 2016 at 10:27:58AM -0600, Jeff Law wrote: > I think you're being rather short-sighed here. GCC is being used in ways we > can't necessarily predict -- which might include compile servers, JITs, web > services, etc. For compile server/web services one needs to add the protection

Re: [Patch, testsuite] Skip tests that expect 4 byte alignment for avr

2016-08-16 Thread Jeff Law
On 08/11/2016 01:40 AM, Senthil Kumar Selvaraj wrote: Hi, The below patch adds the AVR target to the list of targets that don't have natural_alignment_32. It also skips ipa/propalign-*.c tests (which expect 4 byte alignment), if both natural_alignment_32 and natural_alignment_64 are

Re: [PATCH] Indicate minimum in-tree MPFR version handled

2016-08-16 Thread Jeff Law
On 08/11/2016 05:20 PM, Maciej W. Rozycki wrote: Hi, Commit 235763 removed support for versions of MPFR below 3.1.0 which have a flat directory structure, however it did not introduce any safety check for such an unhandled library version present in the tree. Consequently the system-installed

Re: Early jump threading

2016-08-16 Thread Jeff Law
On 08/12/2016 02:02 AM, Richard Biener wrote: On Thu, 11 Aug 2016, Jan Hubicka wrote: Hi, this patch adds early jump threading pass. Jump threading is one of most common cases where estimated profile becomes corrupted, because the branches are predicted independently beforehand. This patch

Re: [PATCH build/doc] Replacing libiberty with gnulib

2016-08-16 Thread Pedro Alves
Hi there, On 08/15/2016 01:50 PM, ayush goel wrote: > +# Where to find the gnulib library > +LIBGNU = ../gnulib/import/libgnu.a > +BUILD_LIBGNU= $(build_libobjdir)/gnulib/import/libgnu.a > +INCGNU = -I$(srcdir)/../gnulib/import > + I may be missing something, but I don't understand how can this

Re: RFC: A few more fallthrus

2016-08-16 Thread Marek Polacek
On Thu, Aug 11, 2016 at 04:49:30PM +0200, Marek Polacek wrote: > A few more cases where I'm unsure whether the fall through is intended. > Jason, can you please look at the cp/ part? Given Jason is on PTO this week, can I just commit the patch as-is, modulo the already-committed tree-complex.c

[v3 PATCH] Implement LWG 2729 for pair.

2016-08-16 Thread Ville Voutilainen
Tested on Linux-PPC64. 2016-08-16 Ville Voutilainen Implement LWG 2729 for pair. * include/bits/stl_pair.h (_PCC): New. (_ConstructiblePair, _ImplicitlyConvertiblePair): Turn into static member functions of _PCC. (_MoveConstructiblePair,

Re: [Patch, testsuite] Skip tests that expect 4 byte alignment for avr

2016-08-16 Thread Senthil Kumar Selvaraj
Jeff Law writes: > On 08/11/2016 01:40 AM, Senthil Kumar Selvaraj wrote: >> Hi, >> >> The below patch adds the AVR target to the list of targets that don't >> have natural_alignment_32. It also skips ipa/propalign-*.c >> tests (which expect 4 byte alignment), if both >>