[PATCH] Plugin support on Windows/MinGW

2017-11-14 Thread Boris Kolpackov
Hi, The below patch implements GCC plugin support on MinGW. Some notes on the functionality and the patch: 1. Due to the way dynamic libraries work on Windows there are limitations. Specifically, we have to produce import libraries for backend executables (cc1, cc1plus) and plugins have to

[PATCH] Fix __VA_OPT__ testsuite fallout

2017-11-14 Thread Jakub Jelinek
Hi! On Sun, Nov 12, 2017 at 12:33:03AM -0700, Tom Tromey wrote: >if (argc < macro->paramc) > { > - /* As an extension, variadic arguments are allowed to not appear in > + /* In C++2a (here the va_opt flag is used), and also as a GNU > + extension, variadic arguments are all

Re: [PATCH] enhance -Warray-bounds to detect out-of-bounds offsets (PR 82455)

2017-11-14 Thread Richard Biener
On Mon, 13 Nov 2017, Jeff Law wrote: > On 11/10/2017 01:00 AM, Richard Biener wrote: > > > > It's the usual issue with an optimizing compiler vs. a static analyzer. > > We try to get rid of the little semantic details of the input languages > > that in the end do not matter for code-generation bu

Re: [PATCH] enhance -Warray-bounds to detect out-of-bounds offsets (PR 82455)

2017-11-14 Thread Richard Biener
On Mon, 13 Nov 2017, Martin Sebor wrote: > On 11/10/2017 01:00 AM, Richard Biener wrote: > > On Thu, 9 Nov 2017, Jeff Law wrote: > > > > > On 11/02/2017 05:48 AM, Richard Biener wrote: > > > > > > > > > > > There were elaborate transforms of ptr + CST to ptr->a.b.c[3] in the > > > > past. We h

More transition to profile-counts for bb-reorder

2017-11-14 Thread Jan Hubicka
Hi, this patch removes most of uses of frequencies in bb reorder. The last remaining case is the heap of traces which needs to be ordered by integer or turned into the fibheap. I think integer frequencies works pretty well there. I also noticed that while connecting traces bacwards we use proba

Cleanup ipa-inline inlined time estimates

2017-11-14 Thread Jan Hubicka
Hi, there is no longer need to use counts because the path using frequencies does precisely the same. Bootstrapped/regtested x86_64-linux, comitted. * ipa-inline.c (compute_uninlined_call_time, compute_inlined_call_time): always use frequencies. Index: ipa-inline.c ==

[testsuite, committed] Require alloca for c-c++-common/Wstringop-truncation.c

2017-11-14 Thread Tom de Vries
[ was: Re: [PATCH 3/4] enhance overflow and truncation detection in strncpy and strncat (PR 81117) ] On 08/06/2017 10:07 PM, Martin Sebor wrote: * c-c++-common/Wstringop-truncation.c: Same. +/* Verify warnings for VLAs. */ + +void test_strncpy_vla (unsigned n, const char* s) +{ +

Cleanup predict.c

2017-11-14 Thread Jan Hubicka
Hi, this patch moves predict.c away from frequencies and also updates name of counts_to_freqs to update_max_bb_count because it no longer does any conversion just determines max count in function. Bootstrapped/regtested x86_64-linux, comitted. 2017-11-14 Jan Hubicka * auto-profile.c (

[libgomp, testsuite, committed] Allow asyncwait-1.c to run for non-nvidia devices

2017-11-14 Thread Tom de Vries
Hi, this patch allows openacc test-case asyncwait-1.c to run for non-nvidia devices. Committed as obvious. Thanks, - Tom Allow asyncwait-1.c to run for non-nvidia devices 2017-11-14 Tom de Vries * testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Allow to run for non-nvidia devices.

More frequency removal

2017-11-14 Thread Jan Hubicka
Hi, this patch updates tracer, reg-stack and shrink wrap. Bootstrapped/regtested x86_64-linux, comitted. Honza * tracer.c (better_p): Do not compare frequencies. * reg-stack.c (better_edge): Likewise. * shrink-wrap.c (try_shrink_wrapping): Do not convert to gcov counts

Re: PR82808

2017-11-14 Thread Prathamesh Kulkarni
On 3 November 2017 at 15:38, Richard Biener wrote: > On Fri, Nov 3, 2017 at 6:15 AM, Prathamesh Kulkarni > wrote: >> Hi Martin, >> As mentioned in PR, the issue here for propagating value of 'm' from >> f_c1 to foo() is that the jump function operation is FLOAT_EXPR, and >> the type of input para

Re: [001/nnn] poly_int: add poly-int.h

2017-11-14 Thread Richard Sandiford
Martin Sebor writes: > On 11/13/2017 04:36 PM, Richard Sandiford wrote: >> Jeff Law writes: >>> On 11/09/2017 04:06 AM, Richard Sandiford wrote: >>> > Let me say at the outset that I struggle to comprehend that a few > instructions is even a consideration when not optimizing, especially >

[PATCH][i386] PR82941/PR82942 - Adding vzeroupper generation for SKX

2017-11-14 Thread Peryt, Sebastian
Hi, This patch fixes PR82941 and PR82942 by adding vzeroupper generation on SKX. Bootstrapped and tested. 14.11.2017 Sebastian Peryt gcc/ * config/i386/i386.c (pass_insert_vzeroupper): Modify gate condition to return true on Xeon and not on Xeon Phi. (ix86_check_avx256

RE: [x86,avx][patch] Fix PR82983

2017-11-14 Thread Koval, Julia
Didn't get in the list for some reason. > -Original Message- > From: Koval, Julia > Sent: Tuesday, November 14, 2017 10:29 AM > To: GCC Patches > Cc: Kirill Yukhin > Subject: [x86,avx][patch] Fix PR82983 > > Hi, this patch fix GFNI check which didn't work properly in gfni+sse case. > >

[patch][i386, AVX] Adding missing mask[z]_scalef_round_s[d,s] intrinsics

2017-11-14 Thread Makhotina, Olga
Hi, This patch adds missing intrinsics for _mm_mask[z]_scalef_round_[sd,ss]. 14.11.2017 Olga Makhotina gcc/ * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd, _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss, _mm_maskz_scalef_round_ss): New intrinsics.

Re: [PATCH][i386] PR82941/PR82942 - Adding vzeroupper generation for SKX

2017-11-14 Thread Jakub Jelinek
On Tue, Nov 14, 2017 at 09:45:12AM +, Peryt, Sebastian wrote: > Hi, > > This patch fixes PR82941 and PR82942 by adding vzeroupper generation on SKX. > Bootstrapped and tested. > > 14.11.2017 Sebastian Peryt > > gcc/ In that case the ChangeLog entry should list the PRs, i.e. PR ta

RE: [patch][i386, AVX] Adding missing mask[z]_scalef_round_s[d,s] intrinsics

2017-11-14 Thread Makhotina, Olga
Hi, Attachment got lost by accident. Attaching it again. Thanks, Olga -Original Message- From: Makhotina, Olga Sent: Tuesday, November 14, 2017 10:49 AM To: gcc-patches@gcc.gnu.org Cc: Uros Bizjak ; Kirill Yukhin ; Makhotina, Olga ; Peryt, Sebastian Subject: [patch][i386, AVX] Adding

Re: [RFC, PR 80689] Copy small aggregates element-wise

2017-11-14 Thread Martin Jambor
Hi, I thought I sent the following email last Friday but found it in my drafts folder right now, so let me send it now so that anybody interested can see what the patch does on Haswell. I have only skimmed through new messages in the thread. I am now looking into something else right now but wil

Re: [build, libgcc, libgo] Adapt Solaris 12 references

2017-11-14 Thread Rainer Orth
Hi Ian, > With the change in the Solaris release model (no more major releases > like Solaris 12 but only minor ones like 11.4), the Solaris 12 > references in GCC need to be adapted. > > The following patch does this, consisting mostly of comment changes. > > Only a few changes bear comment: > >

[testsuite] Fix -Wreturn-type fallout in g++.dg/cpp0x/rv-trivial-bug.C on Solaris 10

2017-11-14 Thread Rainer Orth
Currently, g++.dg/cpp0x/rv-trivial-bug.C FAILs on Solaris 10 only: +FAIL: g++.dg/cpp0x/rv-trivial-bug.C -std=c++11 (test for excess errors) +FAIL: g++.dg/cpp0x/rv-trivial-bug.C -std=c++14 (test for excess errors) /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/cpp0x/rv-trivial-bug.C:27:1: war

[x86,avx][patch] Fix PR82983

2017-11-14 Thread Koval, Julia
Hi, this patch fix GFNI check which didn't work properly in gfni+sse case. gcc/ * config/i386/gfniintrin.h: Add sse check. * config/i386/i386.c (ix86_expand_builtin): Fix gfni check. 0001-fix-gfni.patch Description: 0001-fix-gfni.patch

[libsanitizer] Fix Mac OS X 10.7 bootstrap (PR sanitizer/82824)

2017-11-14 Thread Rainer Orth
Mac OS X 10.7 bootstrap is currently broken in libsanitizer since lsan/lsan_common_mac.cc uses VM_MEMORY_OS_ALLOC_ONCE which was only introduced in Mac OS X 10.9. Upstream rejected the trivial patch to make the use conditional since that's likely to be unreliable: https://reviews.llvm.org

Re: [libsanitizer] Fix Mac OS X 10.7 bootstrap (PR sanitizer/82824)

2017-11-14 Thread Jakub Jelinek
On Tue, Nov 14, 2017 at 11:44:34AM +0100, Rainer Orth wrote: > 2017-11-13 Rainer Orth > > PR sanitizer/82824 > * configure.ac (LSAN_COMMON_SUPPORTED): New conditional. Disable > before *-*-darwin13*. > (WEAK_HOOKS_SUPPORT): New conditional. > * configure: Regenera

RE: [PATCH][i386] PR82941/PR82942 - Adding vzeroupper generation for SKX

2017-11-14 Thread Peryt, Sebastian
I have updated tests and changelog according to Jakub's suggestions. Please find attached v2 of my patch. 14.11.2017 Sebastian Peryt gcc/ PR target/82941 PR target/82942 * config/i386/i386.c (pass_insert_vzeroupper): Modify gate condition to return true on Xeo

Re: [PATCH] Fixes for PR68356, PR81210, and PR81693

2017-11-14 Thread Dominique d'Humières
> Le 13 nov. 2017 à 18:40, Mike Stump a écrit : > > On Nov 12, 2017, at 6:58 AM, H.J. Lu wrote: >> >> On Sun, Nov 12, 2017 at 6:22 AM, Dominique d'Humières >> wrote: >>> The following patch fixes PR68356, PR81210, and PR81693 on darwin. >>> ... >> >> I wrote these tests. These tests don't

Re: [PATCH][i386] PR82941/PR82942 - Adding vzeroupper generation for SKX

2017-11-14 Thread H.J. Lu
On Tue, Nov 14, 2017 at 3:18 AM, Peryt, Sebastian wrote: > I have updated tests and changelog according to Jakub's suggestions. > Please find attached v2 of my patch. > > > 14.11.2017 Sebastian Peryt > > gcc/ > > PR target/82941 > PR target/82942 > * config/i386/i386.c (

Re: [PATCH] enhance -Warray-bounds to handle strings and excessive indices

2017-11-14 Thread Richard Biener
On Mon, Nov 13, 2017 at 6:37 PM, Martin Sebor wrote: > Richard, this thread may have been conflated with the one Re: > [PATCH] enhance -Warray-bounds to detect out-of-bounds offsets > (PR 82455) They are about different things. > > I'm still looking for approval of: > > https://gcc.gnu.org/ml/gc

[PATCH] New lang hook

2017-11-14 Thread Nathan Sidwell
This patch addresses c++/82836 & c++/82737. The root cause was a bad assumption I made when moving the mangling alias machinery to its own hash table. I had thought that once we SET_DECL_ASSEMBLER_NAME, it never becomes unset (or changed). That is false. There are paths in the compiler tha

Re: RFA (hash-map): PATCH to support GTY((cache)) with hash_map

2017-11-14 Thread Richard Biener
On Fri, Sep 15, 2017 at 11:45 PM, Jason Merrill wrote: > The hash_map interface is a lot more convenient than that of > hash_table for cases where it makes sense, but there hasn't been a way > to get the ggc_cache_remove behavior with a hash_map. In other words, > not marking elements during the

Re: PR82808

2017-11-14 Thread Richard Biener
On Tue, Nov 14, 2017 at 10:31 AM, Prathamesh Kulkarni wrote: > On 3 November 2017 at 15:38, Richard Biener > wrote: >> On Fri, Nov 3, 2017 at 6:15 AM, Prathamesh Kulkarni >> wrote: >>> Hi Martin, >>> As mentioned in PR, the issue here for propagating value of 'm' from >>> f_c1 to foo() is that

Re: [RFA][PATCH] 3/n Refactoring tree-vrp.c, step #3 introduce vr-values.c

2017-11-14 Thread Richard Biener
On Fri, Nov 10, 2017 at 11:57 PM, Jeff Law wrote: > > And here's the monster that pulls the vr_values class out of tree-vrp.c. > I've also pulled out the transitive closure of free routines that are > used strictly by vr-values.c. > > Like the gimple-ssa-evrp.c change, this exposes various functi

Re: [libsanitizer] Fix Mac OS X 10.7 bootstrap (PR sanitizer/82824)

2017-11-14 Thread Rainer Orth
Hi Jakub, >> --- a/libsanitizer/configure.ac >> +++ b/libsanitizer/configure.ac >> @@ -140,6 +140,24 @@ case "$host" in >> esac >> AM_CONDITIONAL(USING_MAC_INTERPOSE, $MAC_INTERPOSE) >> >> +# lsan_common_mac.cc needs VM_MEMORY_OS_ALLOC_ONCE which was only >> +# introduced in Mac OS X 10.9/Darw

[PATCH] Fix CFG cleanup iteration order

2017-11-14 Thread Richard Biener
This fixes a latent bug I ran into with RPO value-numbering work which similar to all SSA propagators and existing FRE/PRE do not perform elimination in unreachable code-regions. Those unreachable code-regions are controlled by if (0 != 0) style conditions and CFG cleanup is supposed to deal with

Re: [libsanitizer] Fix Mac OS X 10.7 bootstrap (PR sanitizer/82824)

2017-11-14 Thread Jakub Jelinek
On Tue, Nov 14, 2017 at 01:57:21PM +0100, Rainer Orth wrote: > >> --- a/libsanitizer/configure.ac > >> +++ b/libsanitizer/configure.ac > >> @@ -140,6 +140,24 @@ case "$host" in > >> esac > >> AM_CONDITIONAL(USING_MAC_INTERPOSE, $MAC_INTERPOSE) > >> > >> +# lsan_common_mac.cc needs VM_MEMORY_OS_

[PATCH] Fix usage of REG_BR_PROBs (PR target/82927).

2017-11-14 Thread Martin Liška
Hello. Quite obvious fix for SH target. Joseph can you please continue with testing? I don't have a machine to test the patch. Ready for trunk? Thanks, Martin gcc/ChangeLog: 2017-11-14 Martin Liska PR target/82927 * config/sh/sh-mem.cc: Initialize probabilities. (sh_

Re: [PATCH] Fix usage of REG_BR_PROBs (PR target/82927).

2017-11-14 Thread Joseph Myers
On Tue, 14 Nov 2017, Martin Liška wrote: > Hello. > > Quite obvious fix for SH target. Joseph can you please continue with testing? > I don't have a machine to test the patch. I don't have SH hardware, but can confirm that, in conjunction with Martin's glibc patch to work around strncpy warning

Re: [PATCH, rs6000] Repair vec_xl, vec_xst, vec_xl_be, vec_xst_be built-in functions

2017-11-14 Thread Bill Schmidt
Please hold review on this until I investigate something that Carl brought up. Thanks, and sorry for the noise! -- Bill > On Nov 13, 2017, at 10:30 AM, Bill Schmidt > wrote: > > Hi, > > Some previous patches to add support for vec_xl_be and fill in gaps in testing > for vec_xl and vec_xst

Re: [Patch AArch64] Stop generating BSL for simple integer code

2017-11-14 Thread James Greenhalgh
On Wed, Oct 04, 2017 at 05:44:07PM +0100, James Greenhalgh wrote: > > On Thu, Jul 27, 2017 at 06:49:01PM +0100, James Greenhalgh wrote: > > > > On Mon, Jun 12, 2017 at 02:44:40PM +0100, James Greenhalgh wrote: > > > [Sorry for the re-send. I spotted that the attributes were not right for > > > th

Re: [PATCH][i386] PR82941/PR82942 - Adding vzeroupper generation for SKX

2017-11-14 Thread H.J. Lu
On Tue, Nov 14, 2017 at 4:17 AM, H.J. Lu wrote: > On Tue, Nov 14, 2017 at 3:18 AM, Peryt, Sebastian > wrote: >> I have updated tests and changelog according to Jakub's suggestions. >> Please find attached v2 of my patch. >> >> >> 14.11.2017 Sebastian Peryt >> >> gcc/ >> >> PR target/82

Re: [PATCH][i386] PR82941/PR82942 - Adding vzeroupper generation for SKX

2017-11-14 Thread Jakub Jelinek
On Tue, Nov 14, 2017 at 06:14:10AM -0800, H.J. Lu wrote: > Just a thought, should we have a separate patch to add -mprefer-vzeroupper > to cover all bases in the future, like > > /* opt_pass methods: */ > virtual bool gate (function *) > { > return TARGET_AVX && (!TARGET_AVX512ER ||

RE: [PATCH][i386] PR82941/PR82942 - Adding vzeroupper generation for SKX

2017-11-14 Thread Peryt, Sebastian
Attached is fixed patch. Sebastian > -Original Message- > From: H.J. Lu [mailto:hjl.to...@gmail.com] > Sent: Tuesday, November 14, 2017 1:18 PM > To: Peryt, Sebastian > Cc: Jakub Jelinek ; gcc-patches@gcc.gnu.org; Uros Bizjak > ; Kirill Yukhin ; Lu, Hongjiu > > Subject: Re: [PATCH][i38

Re: [build, libgcc, libgo] Adapt Solaris 12 references

2017-11-14 Thread Ian Lance Taylor via gcc-patches
On Tue, Nov 14, 2017 at 2:09 AM, Rainer Orth wrote: > >> With the change in the Solaris release model (no more major releases >> like Solaris 12 but only minor ones like 11.4), the Solaris 12 >> references in GCC need to be adapted. >> >> The following patch does this, consisting mostly of comment

Re: [PATCH][i386] PR82941/PR82942 - Adding vzeroupper generation for SKX

2017-11-14 Thread H.J. Lu
On Tue, Nov 14, 2017 at 6:20 AM, Jakub Jelinek wrote: > On Tue, Nov 14, 2017 at 06:14:10AM -0800, H.J. Lu wrote: >> Just a thought, should we have a separate patch to add -mprefer-vzeroupper >> to cover all bases in the future, like >> >> /* opt_pass methods: */ >> virtual bool gate (function

Re: [RFC PATCH] Merge libsanitizer from upstream

2017-11-14 Thread Maxim Ostapenko
Hi, On 13/11/17 15:47, Christophe Lyon wrote: On 30 October 2017 at 16:21, Maxim Ostapenko wrote: On 30/10/17 17:08, Christophe Lyon wrote: On 30/10/2017 11:12, Maxim Ostapenko wrote: Hi, sorry for the late response. On 20/10/17 13:45, Christophe Lyon wrote: Hi, On 19 October 2017 at 13:

Re: [RFC PATCH] Merge libsanitizer from upstream

2017-11-14 Thread Jakub Jelinek
On Tue, Nov 14, 2017 at 06:40:32PM +0300, Maxim Ostapenko wrote: > > But on the upstream sanitizer repo, > > sanitizer_common/sanitizer_syscall_linux_arm.inc was added on Nov 8th, > > and also checks for retval >= -4095, hence handling the clone() error > > gracefully. So... can we merge again our

[PATCH][GCC][ARM] Restrict TARGET_DOTPROD to baseline Armv8.2-a.

2017-11-14 Thread Tamar Christina
Hi All, Dot Product is intended to only be available for Armv8.2-a and newer. While this restriction is reflected in the intrinsics, the patterns themselves were missing the Armv8.2-a bit. While GCC would prevent invalid options e.g. `-march=armv8.1-a+dotprod` we should prevent the pattern from b

[PATCH][GCC][ARM] Add Armv8.3-a to AArch32.

2017-11-14 Thread Tamar Christina
Hi All, This patch adds Armv8.3-a as an architecture to the compiler with the feature set inherited from Armv8.2-a. Bootstrapped regtested on arm-none-linux-gnueabihf and no issues. gcc/ 2017-11-14 Tamar Christina * config/arm/arm-cpus.in (armv8_3, ARMv8_3a, armv8.3-a): New *

[GCC][PATCH][AArch64] Add negative tests for dotprod and set minimum version to v8.2 in the target bit.

2017-11-14 Thread Tamar Christina
Hi All, Dot Product is intended to only be available for Armv8.2-a and newer. While this restriction is reflected in the intrinsics, the patterns themselves were missing the Armv8.2-a bit. This means that using -march=armv8.1-a+dotprod incorrectly got the auto-vectorizer to generate dot product i

[PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2017-11-14 Thread Tamar Christina
Hi All, This patch allows larger bitsizes to be used as copy size when the target does not have SLOW_UNALIGNED_ACCESS. fun3: adrpx2, .LANCHOR0 add x2, x2, :lo12:.LANCHOR0 mov x0, 0 sub sp, sp, #16 ldrhw1, [x2, 16] ldrbw2, [x2

RE: [PATCH][GCC][AARCH64]Bad code-gen for structure/block/unaligned memory access

2017-11-14 Thread Tamar Christina
Hi James, I have split off the aarch64 bit off from the generic parts and processed your feedback. Attached is the reworked patch. Ok for Tunk? Thanks, Tamar Thanks, Tamar gcc/ 2017-11-14 Tamar Christina * config/aarch64/aarch64.c (aarch64_expand_movmem): Add MEM to REG o

Re: Cleanup predict.c

2017-11-14 Thread Martin Liška
On 11/14/2017 10:20 AM, Jan Hubicka wrote: @@ -4670,11 +4671,12 @@ expand_call_inline (basic_block bb, gimp if (dump_file && (dump_flags & TDF_DETAILS)) { - fprintf (dump_file, "Inlining "); - print_generic_expr (dump_file, id->src_fn); - fprintf (dump_file, " to ");

Re: [PATCH] Zero vptr in dtor for -fsanitize=vptr.

2017-11-14 Thread Martin Liška
PING^1 On 11/06/2017 09:27 AM, Martin Liška wrote: On 11/03/2017 04:21 PM, Jason Merrill wrote: On Fri, Nov 3, 2017 at 10:25 AM, Martin Liška wrote: On 10/27/2017 09:44 PM, Nathan Sidwell wrote: On 10/27/2017 02:34 PM, Jakub Jelinek wrote: But when singly inheriting a polymorphic base and

[v3 PATCH] Implement LWG 2733 and LWG 2759

2017-11-14 Thread Ville Voutilainen
Tested on Linux-x64. 2017-11-14 Ville Voutilainen Implement LWG 2733 and LWG 2759 * include/experimental/numeric (gcd): Reject cv-qualified bool. (lcm): Likewise. * include/std/numeric (gcd): Likewise. (lcm): Likewise. * testsuite/26_numerics/gcd/gcd_neg.cc: Add tests a

Re: [PATCH] Zero vptr in dtor for -fsanitize=vptr.

2017-11-14 Thread Jason Merrill
OK. On Mon, Nov 6, 2017 at 3:27 AM, Martin Liška wrote: > On 11/03/2017 04:21 PM, Jason Merrill wrote: >> On Fri, Nov 3, 2017 at 10:25 AM, Martin Liška wrote: >>> On 10/27/2017 09:44 PM, Nathan Sidwell wrote: On 10/27/2017 02:34 PM, Jakub Jelinek wrote: > But when singly inheriting

Patch ping^2

2017-11-14 Thread Jakub Jelinek
On Mon, Nov 06, 2017 at 05:22:36PM +0100, Jakub Jelinek wrote: > I'd like to ping the: > > http://gcc.gnu.org/ml/gcc-patches/2017-10/msg01895.html > PR debug/82718 > Fix DWARF5 .debug_loclist handling with hot/cold partitioning > > patch. Thanks Ping^2. Jakub

Re: [PATCH], make Float128 built-in functions work with -mabi=ieeelongdouble

2017-11-14 Thread Segher Boessenkool
Hi! On Fri, Nov 10, 2017 at 06:13:19PM -0500, Michael Meissner wrote: > This patch updates the float128 built-in functions that get/set exponents, get > mantissa, and do tests to work with _Float128 on the current system, and with > long double when -mabi=ieeelongdouble is used. > > The issue is

Re: [v3 PATCH] Implement LWG 2733 and LWG 2759

2017-11-14 Thread Jonathan Wakely
On 14/11/17 18:14 +0200, Ville Voutilainen wrote: Implement LWG 2733 and LWG 2759 * include/experimental/numeric (gcd): Reject cv-qualified bool. (lcm): Likewise. * include/std/numeric (gcd): Likewise. (lcm): Likewise. * testsuite/26_numerics/gcd/gcd_neg.cc: Add tests and adjust

Re: Tweak vector::_M_realloc_insert for code size

2017-11-14 Thread Jonathan Wakely
On 11/11/17 19:14 +0100, Marc Glisse wrote: Hello, operator new can clobber memory, it is hard to teach the compiler otherwise since it is replaceable. Here I cache a couple values before the call to the allocator. I checked the result on this simple example: #include void f(std::vector&v)

Re: [PATCH][i386] PR82941/PR82942 - Adding vzeroupper generation for SKX

2017-11-14 Thread Uros Bizjak
On Tue, Nov 14, 2017 at 3:26 PM, Peryt, Sebastian wrote: > Attached is fixed patch. > > Sebastian > > >> -Original Message- >> From: H.J. Lu [mailto:hjl.to...@gmail.com] >> Sent: Tuesday, November 14, 2017 1:18 PM >> To: Peryt, Sebastian >> Cc: Jakub Jelinek ; gcc-patches@gcc.gnu.org; Uro

Re: [PATCH] enhance -Warray-bounds to handle strings and excessive indices

2017-11-14 Thread Martin Sebor
On 11/14/2017 05:28 AM, Richard Biener wrote: On Mon, Nov 13, 2017 at 6:37 PM, Martin Sebor wrote: Richard, this thread may have been conflated with the one Re: [PATCH] enhance -Warray-bounds to detect out-of-bounds offsets (PR 82455) They are about different things. I'm still looking for appr

Re: [PATCH][GCC][AARCH64]Bad code-gen for structure/block/unaligned memory access

2017-11-14 Thread James Greenhalgh
On Tue, Nov 14, 2017 at 04:05:12PM +, Tamar Christina wrote: > Hi James, > > I have split off the aarch64 bit off from the generic parts and processed > your feedback. > > Attached is the reworked patch. > > Ok for Tunk? Thanks for the respin, I'm a bit confused by this comment. > diff --

Re: [v3 PATCH] Implement LWG 2733 and LWG 2759

2017-11-14 Thread Ville Voutilainen
On 14 November 2017 at 19:06, Jonathan Wakely wrote: > Both files can use remove_cv_t instead of remove_cv::type (and there's > no need to std-qualify it in std::gcd). > > They could also use is_integral_v and is_same_v but that's > pre-existing, and less important because there's no 'typename' th

Re: potential bug in libstc++ ?

2017-11-14 Thread Jonathan Wakely
On 14/11/17 15:04 +, Jonathan Wakely wrote: On 14 November 2017 at 14:35, Sergey Nenakhov wrote: Hello. Excuse me if I'm posting to the wrong mailing list. libstdc++ has its own mailing list (which Richard CC'd). I've grabbed gcc-7.2.0 sources and noticed strange statement in the file g

Re: [v3 PATCH] Implement LWG 2733 and LWG 2759

2017-11-14 Thread Jonathan Wakely
On 14/11/17 19:51 +0200, Ville Voutilainen wrote: On 14 November 2017 at 19:06, Jonathan Wakely wrote: Both files can use remove_cv_t instead of remove_cv::type (and there's no need to std-qualify it in std::gcd). They could also use is_integral_v and is_same_v but that's pre-existing, and les

Re: [PATCH libquadmath, pr68686] tgammaq(x) is always negative for noninteger x < 0

2017-11-14 Thread Steve Kargl
Ed, gfortran uses libquadmath for support of its REAL(16) intrinsic subprograms. I checked the list of intrinsics and tgamma is current not in the list. I don't have time to try Fortran's C interop feature to see if an ordinary user can access __float128. While your patch is probably useful for

Re: [PATCH][GCC][AARCH64]Bad code-gen for structure/block/unaligned memory access

2017-11-14 Thread Tamar Christina
Th 11/14/2017 17:48, James Greenhalgh wrote: > On Tue, Nov 14, 2017 at 04:05:12PM +, Tamar Christina wrote: > > Hi James, > > > > I have split off the aarch64 bit off from the generic parts and processed > > your feedback. > > > > Attached is the reworked patch. > > > > Ok for Tunk? > > Th

libstdc++ PATCH to harmonize noexcept

2017-11-14 Thread Jason Merrill
While working on an unrelated issue I noticed that the compiler didn't like some of these declarations after preprocessing, when they aren't protected by system-header permissiveness. I thought about limiting the permissiveness to only extern "C" functions, but I believe that system headers are ad

[Patch] Don't call linker when creating pre-compiled header just because you saw a linker option

2017-11-14 Thread Steve Ellcey
I am building GCC (and binutils) with --with-sysroot and I build glibc in that sysroot too.  I want to test GCC using the glibc libraries I just built, but by default GCC uses the dynamic linker that is in /lib and that is loading the "normal" libraries from /lib or /lib64 at runtime and not the on

Re: [Patch] Don't call linker when creating pre-compiled header just because you saw a linker option

2017-11-14 Thread Richard Biener
On November 14, 2017 7:59:18 PM GMT+01:00, Steve Ellcey wrote: >I am building GCC (and binutils) with --with-sysroot and I build glibc >in >that sysroot too.  I want to test GCC using the glibc libraries I just >built, but by default GCC uses the dynamic linker that is in /lib and >that >is loadi

[patch] backwards threader cleanups

2017-11-14 Thread Aldy Hernandez
Howdy! For some upcoming work I need some pass local data that I don't want to be passing around as an argument. We have enough of those in the threader as it is. So I moved the current pass local data into its own class, and basically classified the entire pass, thus avoiding a lot of argu

Fix accounting of call edges in inliner

2017-11-14 Thread Jan Hubicka
Hi, this patch makes call time computations consistent again. Bootstrapped/regtested x86_64-linux, comitted. Honza * ipa-inline.c (edge_badness): Dump sreal frequency. (compute_inlined_call_time): Match natural implementaiton ... * ipa-fnsummary.c (estimate_edge_size_and_ti

PING: [PATCH] Use rcrt1.o%s/grcrt1.o%s to relocate static PIE

2017-11-14 Thread H.J. Lu
On Fri, Nov 3, 2017 at 10:48 AM, H.J. Lu wrote: > On Wed, Nov 1, 2017 at 9:39 AM, H.J. Lu wrote: >> On Wed, Nov 1, 2017 at 9:32 AM, Rich Felker wrote: >>> On Sun, Oct 15, 2017 at 06:16:57AM -0700, H.J. Lu wrote: crt1.o is used to create dynamic and non-PIE static executables. Static P

Re: [PATCH, i386] Refactor -mprefer-avx[128|256] options into common -mprefer-vector-width=[none|128|256|512]

2017-11-14 Thread Sandra Loosemore
On 11/13/2017 10:25 AM, Shalnov, Sergey wrote: diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 4427328..bc9eb85 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -26087,15 +26087,24 @@ before a transfer of control flow out of the function to minimize the AVX to SSE tra

Remove computation of path_in_freq in tree-ssa-threadupdate

2017-11-14 Thread Jan Hubicka
Hi, this patch removes now unused variable. Bootstrapped/regtested x86_64-linux, comitted. Honza * tree-ssa-threadupdate.c (compute_path_counts): Remove unused path_in_freq_ptr parameter. (ssa_fix_duplicate_block_edges): Do not pass around path_in_freq Index: tree-ssa-thr

Re: [patch] backwards threader cleanups

2017-11-14 Thread David Malcolm
On Tue, 2017-11-14 at 14:08 -0500, Aldy Hernandez wrote: > Howdy! > > For some upcoming work I need some pass local data that I don't want > to > be passing around as an argument. We have enough of those in the > threader as it is. So I moved the current pass local data into its > own > class

[PR c++/82878] pass-by-invisiref in lambda

2017-11-14 Thread Nathan Sidwell
This patch fixes 82878, which turned out to be a problem in genericizing the call inside a __closure::_FUN () that we synthesize when we're providing a non-member fn pointer for a non-capturing lambda. That call is marked as CALL_FROM_THUNK_P, but I elided the check for that when fixing 78495.

Re: [PATCH, rs6000] Repair vec_xl, vec_xst, vec_xl_be, vec_xst_be built-in functions

2017-11-14 Thread Bill Schmidt
Hi, I had a pasto in the function prototype for vec_xst_be. Fixed patch is below. Thanks, Bill On 11/14/17 8:11 AM, Bill Schmidt wrote: > Please hold review on this until I investigate something that Carl brought > up. Thanks, > and sorry for the noise! > > -- Bill >> On Nov 13, 2017, at 10:

[PATCH] Fix use-after-free in the strlen pass (PR tree-optimization/82977)

2017-11-14 Thread Jakub Jelinek
Hi! strlen_to_stridx.get (rhs1) returns an address into the hash_map, and strlen_to_stridx.put (lhs, *ps); (in order to be efficient) doesn't make a copy of the argument just in case, first inserts the slot into it which may cause reallocation, and only afterwards runs the copy ctor to assign the

Re: [PATCH] Fix use-after-free in the strlen pass (PR tree-optimization/82977)

2017-11-14 Thread Jeff Law
On 11/14/2017 02:04 PM, Jakub Jelinek wrote: > Hi! > > strlen_to_stridx.get (rhs1) returns an address into the hash_map, and > strlen_to_stridx.put (lhs, *ps); (in order to be efficient) doesn't make a > copy of the argument just in case, first inserts the slot into it which > may cause reallocati

[PATCH] Small expand_mul_overflow improvement (PR target/82981)

2017-11-14 Thread Jakub Jelinek
Hi! For targets that don't have {,u}mulv4 insn we try 3 different expansions of the basic signed * signed -> signed or unsigned * unsigned -> unsigned overflow computation. The first one is done if if (GET_MODE_2XWIDER_MODE (mode).exists (&wmode) && targetm.scalar_mode_supporte

Re: [PATCH] Fix use-after-free in the strlen pass (PR tree-optimization/82977)

2017-11-14 Thread Martin Sebor
On 11/14/2017 02:04 PM, Jakub Jelinek wrote: Hi! strlen_to_stridx.get (rhs1) returns an address into the hash_map, and strlen_to_stridx.put (lhs, *ps); (in order to be efficient) doesn't make a copy of the argument just in case, first inserts the slot into it which may cause reallocation, and on

[PATCH] Move bswap pass into gimple-ssa-store-merging.c

2017-11-14 Thread Jakub Jelinek
Hi! I'll be working on further store-merging improvements next two days and hope to use some of the bswap pass APIs to handle stuff like: void foo (char *__restrict p, char *__restrict q) { p[0] = q[3]; p[1] = q[2]; p[2] = q[1]; p[3] = q[0]; } or p[4] = data >> 8; p[5] = data; etc. As

Re: [PATCH] Fix use-after-free in the strlen pass (PR tree-optimization/82977)

2017-11-14 Thread Jakub Jelinek
On Tue, Nov 14, 2017 at 02:24:28PM -0700, Martin Sebor wrote: > On 11/14/2017 02:04 PM, Jakub Jelinek wrote: > > Hi! > > > > strlen_to_stridx.get (rhs1) returns an address into the hash_map, and > > strlen_to_stridx.put (lhs, *ps); (in order to be efficient) doesn't make a > > copy of the argument

Re: [PATCH] Fix use-after-free in the strlen pass (PR tree-optimization/82977)

2017-11-14 Thread Martin Sebor
On 11/14/2017 02:10 PM, Jeff Law wrote: On 11/14/2017 02:04 PM, Jakub Jelinek wrote: Hi! strlen_to_stridx.get (rhs1) returns an address into the hash_map, and strlen_to_stridx.put (lhs, *ps); (in order to be efficient) doesn't make a copy of the argument just in case, first inserts the slot int

Re: [PATCH] PR fortran/78240 -- kludge of the day

2017-11-14 Thread Janus Weil
Hi guys, I see this new test case failing on x86_64-linux-gnu: FAIL: gfortran.dg/pr78240.f90 -O (test for excess errors) $ gfortran-8 pr78240.f90 pr78240.f90:11:12: integer x(n)/1/ ! { dg-error "Nonconstant array" } 1 Error: Variable ‘n’ cannot appear in the expression

Re: [PATCH] Fixes for PR68356, PR81210, and PR81693

2017-11-14 Thread Mike Stump
On Nov 14, 2017, at 3:33 AM, Dominique d'Humières wrote: > >> Le 13 nov. 2017 à 18:40, Mike Stump a écrit : >> On Nov 12, 2017, at 6:58 AM, H.J. Lu wrote: >>> >>> On Sun, Nov 12, 2017 at 6:22 AM, Dominique d'Humières >>> wrote: The following patch fixes PR68356, PR81210, and PR81693 on d

[PATCH, rs6000] (v2) GIMPLE folding for vector compares

2017-11-14 Thread Will Schmidt
Hi, Add support for gimple folding of vec_cmp_{eq,ge,gt,le,ne} for the integer data types. As part of this change, several define_insn stanzas have been added/updated in vsx.md that specify the "ne: -> not: + eq: " combinations to allow for the generation of the desired vcmpne[bhw] ins

Re: [PATCH] PR fortran/78240 -- kludge of the day

2017-11-14 Thread Fritz Reese
On Tue, Nov 14, 2017 at 4:58 PM, Janus Weil wrote: > Hi guys, > > I see this new test case failing on x86_64-linux-gnu: > > FAIL: gfortran.dg/pr78240.f90 -O (test for excess errors) > > > $ gfortran-8 pr78240.f90 > pr78240.f90:11:12: > >integer x(n)/1/ ! { dg-error "Nonconstant array"

Re: [PATCH] PR fortran/78240 -- kludge of the day

2017-11-14 Thread Janus Weil
2017-11-14 23:21 GMT+01:00 Fritz Reese : > On Tue, Nov 14, 2017 at 4:58 PM, Janus Weil wrote: >> Hi guys, >> >> I see this new test case failing on x86_64-linux-gnu: >> >> FAIL: gfortran.dg/pr78240.f90 -O (test for excess errors) >> >> >> $ gfortran-8 pr78240.f90 >> pr78240.f90:11:12: >> >>

Re: [PATCH] PR fortran/78240 -- kludge of the day

2017-11-14 Thread Steve Kargl
On Tue, Nov 14, 2017 at 05:21:41PM -0500, Fritz Reese wrote: > On Tue, Nov 14, 2017 at 4:58 PM, Janus Weil wrote: > > Error: The module or main program array ‘x’ at (1) must have constant shape > > pr78240.f90:11:19: > > > >integer x(n)/1/ ! { dg-error "Nonconstant array" } > >

[Ping] [C++ Patch/RFC] PR 82593 ("Internal compiler error: in process_init_constructor_array, at cp/typeck2.c:1294")

2017-11-14 Thread Paolo Carlini
Hi, any feedback about this - apparently rather simple - issue? On 03/11/2017 18:33, Paolo Carlini wrote: Hi, this ICE on valid (given GNU's designated initializers) is rather simple to analyze: for the testcase, the gcc_assert in process_init_constructor_array triggers because at that time

Re: [Patch] Don't call linker when creating pre-compiled header just because you saw a linker option

2017-11-14 Thread Steve Ellcey
On Tue, 2017-11-14 at 20:04 +0100, Richard Biener wrote: >  > I think the intent is to link even for just - lfoo while it makes > sense to ignore -L/path - Wl,... Certainly counts as possible input.  > > It seems you even break - lfoo.  > > Richard.  Good point.  I guess I need to take a differe

Re: [PATCH] Fix use-after-free in the strlen pass (PR tree-optimization/82977)

2017-11-14 Thread Martin Sebor
On 11/14/2017 02:30 PM, Jakub Jelinek wrote: On Tue, Nov 14, 2017 at 02:24:28PM -0700, Martin Sebor wrote: On 11/14/2017 02:04 PM, Jakub Jelinek wrote: Hi! strlen_to_stridx.get (rhs1) returns an address into the hash_map, and strlen_to_stridx.put (lhs, *ps); (in order to be efficient) doesn't

[C++ Patch] PR 82235 (Copy ctor is not found for copying array of an object when it's marked explicit)

2017-11-14 Thread Mukesh Kapoor
Hi, This patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82235 For the following test case struct Foo {     Foo() {}     explicit Foo(const Foo& aOther) {} }; struct Bar {     Foo m[1]; }; void test() {     Bar a;     Bar b = a; } the compiler issues an error when the compiler generate

Re: libstdc++ PATCH to harmonize noexcept

2017-11-14 Thread Jonathan Wakely
On 14/11/17 13:56 -0500, Jason Merrill wrote: While working on an unrelated issue I noticed that the compiler didn't like some of these declarations after preprocessing, when they aren't protected by system-header permissiveness. I thought about limiting the permissiveness to only extern "C" fun

Re: [AARCH64] implements neon vld1_*_x2 intrinsics

2017-11-14 Thread Kugan Vivekanandarajah
Ping? Thanks, Kugan On 7 November 2017 at 15:10, Kugan Vivekanandarajah wrote: > Hi, > > Attached patch implements the vld1_*_x2 intrinsics as defined by the > neon document. > > Bootstrap for the latest patch is ongoing on aarch64-linux-gnu. Is > this OK for trunk if no regressions? > > Thanks

Re: [PATCH] Fix use-after-free in the strlen pass (PR tree-optimization/82977)

2017-11-14 Thread Jeff Law
On 11/14/2017 02:30 PM, Martin Sebor wrote: > On 11/14/2017 02:10 PM, Jeff Law wrote: >> On 11/14/2017 02:04 PM, Jakub Jelinek wrote: >>> Hi! >>> >>> strlen_to_stridx.get (rhs1) returns an address into the hash_map, and >>> strlen_to_stridx.put (lhs, *ps); (in order to be efficient) doesn't >>> mak

Re: [PATCH] enhance -Warray-bounds to detect out-of-bounds offsets (PR 82455)

2017-11-14 Thread Jeff Law
On 11/14/2017 01:42 AM, Richard Biener wrote: > > I suspect once you're dealing with C++ code you run into the issue > that even early inlining exposes code with forwprop run on it > before running forwprop again on the inlined-into body. > > So the IPA issues start very early. Of course if you

Re: [PATCH] enhance -Warray-bounds to detect out-of-bounds offsets (PR 82455)

2017-11-14 Thread Jeff Law
On 11/13/2017 06:21 PM, Martin Sebor wrote: > I have a different concern with the general idea of moving these > kinds of warnings into passes of their own.  It would unavoidably > result in duplicating some code from the optimization passes (at > a minimum, the GIMPLE traversal, but likely more th

Go patch committed: Remove LHS/RHS setting for variables

2017-11-14 Thread Ian Lance Taylor
This patch to the Go frontend by Than McIntosh removes the LHS/RHS context determination for variable references. It used to be needed for a different backend but it's no longer necessary. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian 2017-11-14 Than M

  1   2   >