Re: Add support to trace comparison instructions and switch statements

2017-07-15 Thread Dmitry Vyukov via gcc
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: gcc-6-branch snapshots disabled?

2017-07-15 Thread Mikael Pettersson
Gerald Pfeifer writes: > On Fri, 14 Jul 2017, Mikael Pettersson wrote: > > Seems like the weekly snapshots from gcc-6-branch were disabled before > > the 6.4.0 release but not re-enabled afterwards. The snapshots from > > trunk and gcc-{7,5}-branch are being generated as usual. > > You are

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: gcc-6-branch snapshots disabled?

2017-07-15 Thread Gerald Pfeifer
On Fri, 14 Jul 2017, Mikael Pettersson wrote: > Seems like the weekly snapshots from gcc-6-branch were disabled before > the 6.4.0 release but not re-enabled afterwards. The snapshots from > trunk and gcc-{7,5}-branch are being generated as usual. You are right, I observed the same and just

Re: Linux and Windows generate different binaries

2017-07-15 Thread Yuri Gribov
On Fri, Jul 14, 2017 at 8:45 AM, Yuri Gribov wrote: > FWIW I've done a quick analysis of recent gcc source code using > https://github.com/yugr/sortcheck and found lots of comparison > functions which can return 0 for different objects. > > All these may cause arrays to be

Re: Linux and Windows generate different binaries

2017-07-15 Thread Segher Boessenkool
On Sat, Jul 15, 2017 at 07:40:13PM +0100, Yuri Gribov wrote: > Looked at generators, we have three comparison routines which return 0 > for different objects but all seem to be safe i.e. can't influence > code generated by GCC. > > alt_state_cmp (genautomata.c) - intentional, duplicates are

Re: Linux and Windows generate different binaries

2017-07-15 Thread Alexander Monakov
On Fri, 14 Jul 2017, Yuri Gribov wrote: > I've also detect transitiveness violation compare_assert_loc > (tree-vrp.c), will send fix once tests are done. There are more issues still, see the thread starting at https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00899.html Alexander

Remove ca.mirror.babylon.network

2017-07-15 Thread Tim Semeijn
We will soon decommission our Canadian mirror due to restructuring. Please remove the following server from the mirror list: ca.mirror.babylon.network/gcc Our French mirrors will remain active. Thanks! -- Tim Semeijn Babylon Network PGP: 0x2A540FA5 / 3DF3 13FA 4B60 E48A E755 9663 B187 0310

Re: [patch] RFC: Hook for insn costs?

2017-07-15 Thread Segher Boessenkool
Hi! On Wed, Jul 12, 2017 at 03:15:09PM +0200, Georg-Johann Lay wrote: > the current cost computations in rtlanal.c and maybe other places > suffer from the fact that they are hiding parts of the expressions > from the back-end, like SET_DESTs of single_set or the anatomy of > PARALELLs. > >

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.

Re: Linux and Windows generate different binaries

2017-07-15 Thread Yuri Gribov
On Sat, Jul 15, 2017 at 10:01 PM, Alexander Monakov wrote: > On Fri, 14 Jul 2017, Yuri Gribov wrote: >> I've also detect transitiveness violation compare_assert_loc >> (tree-vrp.c), will send fix once tests are done. > > There are more issues still, see the thread starting at

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

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,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: 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

[Bug middle-end/81030] [8 Regression] ICE on valid code at -O1 (only) on x86_64-linux-gnu: verify_flow_info failed

2017-07-15 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81030 --- Comment #6 from Tom de Vries --- There's a call to compute_outgoing_frequencies in find_many_sub_basic_blocks. But it's not reached for bb4, because STATE(bb4) == BLOCK_TO_SPLIT, and we trigger the continue here: ... else

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

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.

[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

[Bug tree-optimization/81450] Typedef with assume aligned builtin yields segmentation fault in nested loop

2017-07-15 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81450 Andrew Pinski changed: What|Removed |Added Keywords||wrong-code Target|

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] 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] 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

[Bug target/69401] gcc 5.3.0/6.1.0 on microblaze: internal compiler error: in gen_reg_rtx, at emit-rtl.c:1027

2017-07-15 Thread thomas.petazz...@free-electrons.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69401 --- Comment #4 from Thomas Petazzoni --- Any input? I'm facing a similar problem with the gpsd software: on gcc 6.x and gcc 7.x, one file fails to build with an ICE: rtcm2_json.c: In function

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

[Bug target/69401] gcc 5.3.0/6.1.0 on microblaze: internal compiler error: in gen_reg_rtx, at emit-rtl.c:1027

2017-07-15 Thread thomas.petazz...@free-electrons.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69401 --- Comment #5 from Thomas Petazzoni --- Created attachment 41764 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41764=edit Pre-processed code from gpsd Code from gpsd that triggers an ICE on

[Bug go/81451] New: missing futex check - libgo/runtime/thread-linux.c:12:0 futex.h:13:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘long’

2017-07-15 Thread mfe at live dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81451 Bug ID: 81451 Summary: missing futex check - libgo/runtime/thread-linux.c:12:0 futex.h:13:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘long’

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

[Bug ada/81446] Building Ada on Linux m68k fails due to missing No_Elaboration_Code_All

2017-07-15 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81446 --- Comment #2 from Eric Botcazou --- Author: ebotcazou Date: Sat Jul 15 17:01:03 2017 New Revision: 250224 URL: https://gcc.gnu.org/viewcvs?rev=250224=gcc=rev Log: PR ada/81446 * system-linux-m68k.ads: Add pragma

[Bug ada/81446] Building Ada on Linux m68k fails due to missing No_Elaboration_Code_All

2017-07-15 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81446 --- Comment #2 from Eric Botcazou --- Author: ebotcazou Date: Sat Jul 15 17:01:03 2017 New Revision: 250224 URL: https://gcc.gnu.org/viewcvs?rev=250224=gcc=rev Log: PR ada/81446 * system-linux-m68k.ads: Add pragma

[Bug regression/81331] [8 Regression] FAIL: 21_strings/basic_string/modifiers/insert/char/1.cc execution test

2017-07-15 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81331 --- Comment #9 from Jan Hubicka --- OK, found it. The problem is in EH table entries like: .uleb128 .LEHB8-.LCOLDB1 .uleb128 .LEHE8-.LEHB8 .uleb128 .L16-.LCOLDB1 .uleb128 0x1 Now the third entry is landing pad.

[Bug ada/81446] building Ada fails due to missing No_Elaboration_Code_All

2017-07-15 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81446 Eric Botcazou changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

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

[Bug regression/81331] [8 Regression] FAIL: 21_strings/basic_string/modifiers/insert/char/1.cc execution test

2017-07-15 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81331 Eric Botcazou changed: What|Removed |Added CC||ebotcazou at gcc dot gnu.org ---

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

[Bug sanitizer/63361] Test case c-c++-common/ubsan/float-cast-overflow-1.c fails on Pentium2

2017-07-15 Thread bernd.edlinger at hotmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63361 --- Comment #8 from Bernd Edlinger --- It looks like -m32 simply generates less diagnostics than with -m64, this has probably nothing to do with pentium2. gcc -m32 -fsanitize=float-cast-overflow -O2 float-cast-overflow-1.c ./a.out 2>

[Bug tree-optimization/81452] warn on realloc(p, 0)

2017-07-15 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81452 Martin Sebor changed: What|Removed |Added Keywords||diagnostic URL|

[Bug tree-optimization/81452] New: warn on realloc(p, 0)

2017-07-15 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81452 Bug ID: 81452 Summary: warn on realloc(p, 0) Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization

[Bug go/56827] Building Go support for gcc 4.8.0 fails on Linux: undefined type ‘SockFilter’

2017-07-15 Thread mfe at live dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56827 martin changed: What|Removed |Added CC||mfe at live dot de --- Comment #3 from martin

[Bug regression/81331] [8 Regression] FAIL: 21_strings/basic_string/modifiers/insert/char/1.cc execution test

2017-07-15 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81331 --- Comment #11 from Jan Hubicka --- Created attachment 41766 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41766=edit Patch I am testing Hi, this patch adds sanity check that turns the nasty wrong code issue into ICE and a hack to

[Bug c/81453] New: relational expression involving null pointer not diagnosed with -Wall

2017-07-15 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81453 Bug ID: 81453 Summary: relational expression involving null pointer not diagnosed with -Wall Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal

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

[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 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

[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 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 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 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 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

[Bug libstdc++/79162] [7 Regression] [C++17] ambiguity in string assignment due to string_view overload

2017-07-15 Thread daniel.kruegler at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79162 --- Comment #14 from Daniel Krügler --- (In reply to Jonathan Wakely from comment #10) > (In reply to Jonathan Wakely from comment #8) > > Richard also says the overload shouldn't exist and is a bug, but the > > overload has to exist, because

[Bug ada/81424] [7 regression] internal error on GPRbuild with -O2

2017-07-15 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81424 Eric Botcazou changed: What|Removed |Added Target||i686-*-* Status|UNCONFIRMED

[Bug go/81451] missing futex check - libgo/runtime/thread-linux.c:12:0 futex.h:13:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘long’

2017-07-15 Thread sch...@linux-m68k.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81451 --- Comment #2 from Andreas Schwab --- That's a stone-age version from linux 2.5.70.

[Bug c++/79180] Nested lambda-capture causes segfault for parameter pack

2017-07-15 Thread vittorio.romeo at outlook dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79180 Vittorio Romeo changed: What|Removed |Added CC||vittorio.romeo at outlook dot com ---

[Bug go/81451] missing futex check - libgo/runtime/thread-linux.c:12:0 futex.h:13:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘long’

2017-07-15 Thread ian at airs dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81451 --- Comment #1 from Ian Lance Taylor --- There does seem to be something wrong with your linux/futex.h, which is much shorter than the one on my system. But it is also true that the file where the error occurs no longer needs to #include . You

[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. *

[Bug go/81451] missing futex check - libgo/runtime/thread-linux.c:12:0 futex.h:13:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘long’

2017-07-15 Thread mfe at live dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81451 --- Comment #3 from martin --- >You should just remove the #include and carry on. Thanks, that worked for me.

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

[Bug tree-optimization/81454] New: missing strcmp optimization on duplicate call with an unknown string

2017-07-15 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81454 Bug ID: 81454 Summary: missing strcmp optimization on duplicate call with an unknown string Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal

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.