Re: Remove ca.mirror.babylon.network

2017-07-15 Thread Gerald Pfeifer
On Sun, 16 Jul 2017, Tim Semeijn wrote: > We will soon decommission our Canadian mirror due to restructuring. > Please remove the following server from the mirror list: > > ca.mirror.babylon.network/gcc Thank for you the head-up, Tim. I applied the patch below to make this change accordingly.

[PATCH 4/6] lra-assigns.c: give up on qsort checking in assign_by_spills

2017-07-15 Thread Alexander Monakov
The reload_pseudo_compare_func comparator, when used from assign_by_spills, can be non-transitive, indicating A < B < C < A if both A and C satisfy !bitmap_bit_p (_reload_pseudos, rAC), but B does not. This function was originally a proper comparator, and the problematic clause was added to fix

[PATCH 6/6] qsort comparator consistency checking

2017-07-15 Thread Alexander Monakov
This is the updated qsort comparator verifier. Since we have vec::qsort(cmp), the patch uses the macro argument counting trick to redirect only the four-argument invocations of qsort to qsort_chk. I realize that won't win much sympathies, but a patch doing mass-renaming of qsort in the whole GCC

[PATCH 0/6] qsort comparator consistency fixes

2017-07-15 Thread Alexander Monakov
Hello, (previous thread here: https://gcc.gnu.org/ml/gcc-patches/2016-07/msg00944.html ) we still have a few places in GCC where the comparator function passed to qsort is not actually a proper sorting predicate. Most commonly it fails to impose total ordering by lacking transitivity. It's

[PATCH 1/6] tree-vrp: fix compare_assert_loc qsort comparator

2017-07-15 Thread Alexander Monakov
Subtracting values to produce a -/0/+ comparison value only works when original values have limited range. Otherwise it leads to broken comparator that indicates 0 < 0x4000 < 0x8000 < 0. Yuri posted an equivalent patch just a few hours ago:

[PATCH 2/6] gimple-ssa-store-merging.c: fix sort_by_bitpos

2017-07-15 Thread Alexander Monakov
This qsort comparator lacks anti-commutativity and can indicate A < B < A if A and B have the same bitpos. Return 0 in that case. * gimple-ssa-store-merging.c (sort_by_bitpos): Return 0 on equal bitpos. --- gcc/gimple-ssa-store-merging.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH 5/6] haifa-sched.c: give up qsort checking when autoprefetch heuristic is in use

2017-07-15 Thread Alexander Monakov
The autopref_rank_for_schedule sub-comparator and its subroutine autopref_rank_data lack transitivity. Skip checking if they are in use. This heuristic is disabled by default everywhere except ARM and AArch64, so on other targets this does not suppress checking all the time. *

[PATCH 3/6] lra-assigns.c: fix pseudo_compare_func

2017-07-15 Thread Alexander Monakov
This comparator lacks anti-commutativity and can indicate A < B < A if both A and B satisfy non_spilled_static_chain_regno_p. Proceed to following tie-breakers in that case. (it looks like the code incorrectly assumes that at most one register in the array will satisfy

Re: [DOC PATCH, i386] Fix PR 81294, _subborrow_u64 argument order inconsistent with intrinsic reference

2017-07-15 Thread Gerald Pfeifer
On Thu, 13 Jul 2017, Jakub Jelinek wrote: > Ok for wwwdocs, with a nit: Thanks for the review, Jakub, and the patch, Uros. I applied the small follow-up below which uses for the intrinsics. Gerald Index: changes.html === RCS

gotools patch committed: Set GOROOT in tests

2017-07-15 Thread Ian Lance Taylor
This patch to the gotools Makefile sets GOROOT while running tests. Otherwise some of the tests that invoke the go tool may use an installed go tool, if there is one, rather than the one that was just built. Bootstrapped and ran gotools tests on x86_64-pc-linux-gnu. Committed to mainline. Ian

Re: [PATCH] match.pd: reassociate multiplications with constants

2017-07-15 Thread Alexander Monakov
On Thu, 13 Jul 2017, Marc Glisse wrote: > X*big*big where abs(big*big)>abs(INT_MIN) can be optimized to 0 I'm not sure that would be a win, eliminating X prevents the compiler from deducing that X must be zero (if overflow invokes undefined behavior). > the only hard case is when the product of

Re: [PATCH] match.pd: reassociate multiplications with constants

2017-07-15 Thread Alexander Monakov
On Thu, 13 Jul 2017, Marc Glisse wrote: > I notice that we do not turn (X*10)*10 into X*100 in GIMPLE [...] I've completely missed that. Posting another patch to address that. > Relying on inner expressions being folded can be slightly dangerous, > especially for generic IIRC. It seems easy

Re: [PATCH 2/6] New warnings -Wstring-plus-{char, int} (PR c++/62181)

2017-07-15 Thread Gerald Pfeifer
On Thu, 22 Jun 2017, Xi Ruoyao wrote: > I created PR 81172. For const char *p = "123" + 'c' we should have: > > warning: offset 99 is above array bounds, the behaviour is > undefined [-Warray-bounds] > const char *p = "123" + 'c'; > > and perhaps (for the case the pointer

[PATCH] Reorder std::scoped_lock parameters as per P0739R0 DR status

2017-07-15 Thread Jonathan Wakely
WG21 just approved this change as a DR for C++17, so that class template argument deduction works when using std::adopt_lock with a std::scoped_lock. * include/std/mutex (scoped_lock): Reorder std::adopt_lock_t parameter as per P0739R0. *

Re: [PATCH] Fix pr80044, -static and -pie insanity, and pr81170

2017-07-15 Thread H.J. Lu
On Thu, Jun 22, 2017 at 8:28 AM, Alan Modra wrote: > PR80044 notes that -static and -pie together behave differently when > gcc is configured with --enable-default-pie as compared to configuring > without (or --disable-default-pie). This patch removes that > difference. In

Re: [PATCH] Fix pr80044, -static and -pie insanity, and pr81170

2017-07-15 Thread Alan Modra
On Thu, Jun 29, 2017 at 11:03:56PM +0930, Alan Modra wrote: > Ping? Linux startfile and endfile specs. > https://gcc.gnu.org/ml/gcc-patches/2017-06/msg01678.html 3 week ping. Also fixes PR81295. -- Alan Modra Australia Development Lab, IBM

Re: [PATCH] Kill TYPE_METHODS rtl 3/9

2017-07-15 Thread Nathan Sidwell
On 07/15/2017 12:43 AM, Jeff Law wrote: On 07/14/2017 10:54 AM, Nathan Sidwell wrote: This was the most surprising check of TYPE_METHODS. When not optimizing we use the non-nullness of TYPE_METHODS to figure out if we want to place a non BLKmode structure into a register. On the grounds that

Re: [PATCH 2/3] Simplify wrapped binops

2017-07-15 Thread Marc Glisse
On Wed, 5 Jul 2017, Robin Dapp wrote: While the initialization value doesn't matter (wi::add will overwrite it) better initialize both to false ;) Ah, you mean because we want to transform only if get_range_info returned VR_RANGE. Indeed somewhat unintuitive (but still the best variant for

[PATCH] Fix qsort ordering violation in tree-vrp.c

2017-07-15 Thread Yuri Gribov
Hi, This is a follow-up on https://gcc.gnu.org/ml/gcc/2017-07/msg00078.html compare_assert_loc in tree-vrp.c could return unpredictable results due to implicit conversion of unsigned subtraction to int here: return ha - hb; This could return inconsistent results for objects with the following

Re: Add support to trace comparison instructions and switch statements

2017-07-15 Thread Dmitry Vyukov via gcc-patches
On Sat, Jul 15, 2017 at 9:21 AM, 吴潍浠(此彼) wrote: > Hi > > Implementing __sanitizer_cov_trace_cmp[1248]_const is OK . > And I will try to find some determinate way to judge this comparison is for > loop or not. > Because all the loops(for() or while()) seem to be transformed

Re: [PATCH] Remove Java references in source code.

2017-07-15 Thread Eric Botcazou
verywhere: +===GNAT BUG DETECTED==+ | 8.0.0 20170715 (experimental) [trunk revision 250221] (x86_64-suse-linux) GCC error:| | in gimplify_save_expr, at gimplify.c:5805| | Error detected around /home/eric/svn/gcc/gcc/ada/butil.

Re: Add support to trace comparison instructions and switch statements

2017-07-15 Thread 吴潍浠(此彼)
Hi Implementing __sanitizer_cov_trace_cmp[1248]_const is OK . And I will try to find some determinate way to judge this comparison is for loop or not. Because all the loops(for() or while()) seem to be transformed to "if" and "goto" before running sancov pass. Does it necessary to include APIs

Re: [patch,avr] Fix PR80929, work around middle-end PR81444

2017-07-15 Thread Denis Chertykov
2017-07-14 18:16 GMT+04:00 Georg-Johann Lay : > Hi, this patch restores some of the divmod handling. > > It addresses two issues: > > 1) rtx_costs might be called with code = LSHIFTRT for a mul_highpart. This > is the case when outer_code = TRUNCATE. This patch uses a new function

Re: [PATCH/AARCH64] Decimal floating point support for AARCH64

2017-07-15 Thread Andrew Pinski
On Thu, Jul 13, 2017 at 5:12 PM, Andrew Pinski wrote: > Hi, > This patch adds Decimal floating point support to aarch64. It is > the base support in that since there is no hardware support for DFP, > it just defines the ABI. The ABI I chose is that _Decimal32 is > treated

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

2017-07-15 Thread Jim Wilson
On Fri, Jul 14, 2017 at 12:59 PM, Jim Wilson wrote: > On Fri, Jul 14, 2017 at 1:35 AM, Martin Liška wrote: >> May I ask Jim to test the patch? >> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > > I started an aarch64 bootstrap