[PATCHv2][PR 57371] Remove useless floating point casts in comparisons

2017-07-06 Thread Yuri Gribov
Hi all, This is an updated version of patch in https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00034.html . It should be much more complete, both in functionality and in tests. Bootstrapped and regtested on x64. Ok for trunk? -Y pr57371-2.patch Description: Binary data

[PATCH] prevent -Wall from resetting -Wstringop-overflow=2 to 1 (pr 81345)

2017-07-06 Thread Martin Sebor
The -Wstringop-overflow option defaults to 2 (for Object Size Checking type 1). But when -Wall is used it resets the default value to 1. This happens because when I added the option to c.opt I assumed it would default to, well, the default value set by the Init() directive regardless of whether

Re: [PATCH] PR target/81313: Use DRAP only if there are outgoing arguments on stack

2017-07-06 Thread H.J. Lu
On Thu, Jul 6, 2017 at 12:08 PM, H.J. Lu wrote: > Since DRAP is needed only if there are outgoing arguments on stack, we > should track outgoing arguments on stack and avoid setting need_drap to > true when there are no outgoing arguments on stack. > > Tested on i686 and x86-64 with SSE2, AVX and

[PATCH, rs6000] Modify libgcc's float128 IFUNC resolver functions to use __builtin_cpu_supports()

2017-07-06 Thread Peter Bergner
Usage of getauxval() within the float128 libgcc IFUNC resolver functions is causing problems: https://sourceware.org/bugzilla/show_bug.cgi?id=21707 Alan describes why we can't have relocations in IFUNC resolver functions here: https://gcc.gnu.org/PR81193 With the addition of __builtin_c

Re: Ping [Patch, fortran] PR70071

2017-07-06 Thread Janus Weil
Applied to trunk as r250039. Thanks for the patch! Cheers, Janus 2017-07-05 22:03 GMT+02:00 Janus Weil : > Hi Harald, > > thanks for the reminder. I can take care of committing the patch for > you. Just give me a day or two ... > > Cheers, > Janus > > > > 2017-07-05 20:44 GMT+02:00 Harald Anlauf

[PATCH] PR target/81313: Use DRAP only if there are outgoing arguments on stack

2017-07-06 Thread H.J. Lu
Since DRAP is needed only if there are outgoing arguments on stack, we should track outgoing arguments on stack and avoid setting need_drap to true when there are no outgoing arguments on stack. Tested on i686 and x86-64 with SSE2, AVX and AVX2. There is no regression. OK for trunk? H.J. --- gc

Re: ToT build failure?

2017-07-06 Thread Jakub Jelinek
On Thu, Jul 06, 2017 at 01:45:42PM -0400, David Malcolm wrote: > Given that the previous status quo of the selftests was to require the > C frontend, I committed the attached patch (as r250036), under the > "obvious" rule, retaining the ability to optionally run the selftests > within the C++ front

Re: [PATCH, VAX] Correct ffs instruction constraint

2017-07-06 Thread Jeff Law
On 07/06/2017 10:59 AM, Felix Deichmann wrote: > Jeff, > > Am 29.06.2017 schrieb Jeff Law : >> Ideally we'd like to have a testcase for this in the regression suite. >> >> If you could provide the .i file and options used which generated the >> incorrect ffs instruction I can use the reduction too

Re: C++ PATCHes to dependent template-id parsing

2017-07-06 Thread Jason Merrill
On Wed, Jun 28, 2017 at 3:38 PM, Jason Merrill wrote: > 81204 is a regression whereby previously we would accidentally get the > parsing of res.template set right because when we did the lookup in > the surrounding context, we found the function template and then > ignored it. This patch partiall

Re: ToT build failure?

2017-07-06 Thread David Malcolm
On Thu, 2017-07-06 at 13:18 -0400, David Malcolm wrote: > On Thu, 2017-07-06 at 10:05 -0700, Steve Ellcey wrote: > > Is anyone else having problems building a cross-gcc where an intial > > gcc with C only is built first and used to build glibc? I am > > trying this (it worked before) and am gettin

Re: [PATCH] Add AddressSanitizer annotations to std::vector

2017-07-06 Thread Ivan Baravy
On 07/05/2017 10:00 PM, Jonathan Wakely wrote: > This patch adds AddressSanitizer annotations to std::vector, so that > ASan can detect out-of-bounds accesses to the unused capacity of a > vector. e.g. > > std::vector v(2); > int* p = v.data(); > v.pop_back(); > return p[1]; // ERROR > >

Re: ToT build failure?

2017-07-06 Thread David Malcolm
On Thu, 2017-07-06 at 10:05 -0700, Steve Ellcey wrote: > Is anyone else having problems building a cross-gcc where an intial > gcc with C only is built first and used to build glibc? I am > trying this (it worked before) and am getting: > > /local/sellcey/gcc-aarch64/obj/gcc_initial/./gcc/xgcc >

ToT build failure?

2017-07-06 Thread Steve Ellcey
Is anyone else having problems building a cross-gcc where an intial gcc with C only is built first and used to build glibc? I am trying this (it worked before) and am getting: /local/sellcey/gcc-aarch64/obj/gcc_initial/./gcc/xgcc -B/local/sellcey/gcc-aarch64/obj/gcc_initial/./gcc/ -xc++ -nostdin

Re: [PATCH, VAX] Correct ffs instruction constraint

2017-07-06 Thread Felix Deichmann
Jeff, Am 29.06.2017 schrieb Jeff Law : > Ideally we'd like to have a testcase for this in the regression suite. > > If you could provide the .i file and options used which generated the > incorrect ffs instruction I can use the reduction tools with a cross > compiler to produce a nice simple test

Unify no_reorder and !flag_toplevel_reorder code

2017-07-06 Thread Jan Hubicka
Hi, we have flag_topeleve_reorder and also no_reorder flag on the symbols. They do roughtly the same but implementation is not 100% shared. This makes problem with LTO where flag_toplevel_reorder is not very meaningful (as we don't really have meaningful toplevel args). This patch makes !flag_to

bb-reorder tweek

2017-07-06 Thread Jan Hubicka
Hi, while reading bb-reorder code I noticed that it now may pick edge with probability 0 as one preferred over edge with undefined probability. This is not quite intended. Also we never want to make the trace to go across abnormal/eh edge. Bootstrapped/regtested x86_64-linux, will commit it sho

Mark auto-FDO counters to afdo quality

2017-07-06 Thread Jan Hubicka
Hi, now when we actually have quality tracking, we should use it. Bootstrapped/regtested x86_64-linux, comitted. Honza * auto-profile.c (afdo_set_bb_count, afdo_propagate_edge, afdo_annotate_cfg): Set counts/probabilities as determined by afdo. Index: auto-profile.c =

Re: RFC: [PATCH] Add warn_if_not_aligned attribute

2017-07-06 Thread Joseph Myers
On Fri, 16 Jun 2017, H.J. Lu wrote: > +@code{warning: alignment 8 of 'struct foo' is less than 16}. I think @samp is better than @code for warnings, throughout, since they aren't pieces of program code. > +This warning can be disabled by @option{-Wno-if-not-aligned}. > +The @code{warn_if_not_al

Re: [ping] don't complain about undefined env vars in self specs on gcc -v

2017-07-06 Thread Olivier Hainque
Hi Joseph, > On 05 Jul 2017, at 18:09, Joseph Myers wrote: >> Ping for patch proposed here: >> https://gcc.gnu.org/ml/gcc-patches/2017-06/msg00579.html > > This patch is OK. Just checked-in then :) Thanks for your review! With Kind Regards, Olivier

[PATCH, rs6000] 1/2 Add x86 MMX intrinsics to GCC PPC64LE taget

2017-07-06 Thread Steven Munroe
These is the second major contribution of X86 intrinsic equivalent headers for PPC64LE. X86 MMX technology was the earlest integer SIMD and 64-bit scalar extension for IA32. MMX should have largely been replaced by now with X86_64 64-bit scalars and SSE 128-bit SIMD operation in modern application

[committed] v2: diagnostics: fix end-points of ranges within macros (PR c++/79300)

2017-07-06 Thread David Malcolm
On Mon, 2017-07-03 at 10:07 -0600, Jeff Law wrote: > On 02/02/2017 01:53 PM, David Malcolm wrote: > > PR c++/79300 identifies an issue in which diagnostics_show_locus > > prints the wrong end-point for a range within a macro: > > > >assert ((p + val_size) - buf == encoded_len); > >

[PATCH v11] add -fpatchable-function-entry=N,M option

2017-07-06 Thread Torsten Duwe
Permit A 38 gcc/c-family/ChangeLog 2017-07-06 Torsten Duwe * c-attribs.c (c_common_attribute_table): Add entry for "patchable_function_entry". gcc/lto/ChangeLog 2017-07-06 Torsten Duwe * lto-lang.c (lto_attribute_table): Add entry for "patchable_function_en

Re: [PATCH][ASAN] Switch off by default allocas/VLA sanitization for KASAN

2017-07-06 Thread Jakub Jelinek
On Thu, Jul 06, 2017 at 04:31:49PM +0300, Maxim Ostapenko wrote: > Hi, > > since kernel doesn't support __asan_alloca_poison and > __asan_allocas_unpoison runtime calls so far, the allocas/VLAs sanitization > patch (https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00258.html) will break > KASan build

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

2017-07-06 Thread Matthias Klose
As seen in PR81295, the bootstrap is broken on powerpc-linux-gnu with --enable-default-pie. Using that patch the bootstrap succeeds. The bootstrap works fine on both powerpc64 be and le targets. Matthias On 22.06.2017 17:28, Alan Modra wrote: > PR80044 notes that -static and -pie together behave

[PATCH][ASAN] Switch off by default allocas/VLA sanitization for KASAN

2017-07-06 Thread Maxim Ostapenko
Hi, since kernel doesn't support __asan_alloca_poison and __asan_allocas_unpoison runtime calls so far, the allocas/VLAs sanitization patch (https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00258.html) will break KASan builds. So it was decided to introduce an option --param asan-instrument-all

[PATCH] gcc/doc: list what version each attribute was introduced in

2017-07-06 Thread Daniel P. Berrange
There are several hundred named attribute keys that have been introduced over many GCC releases. Applications typically need to be compilable with multiple GCC versions, so it is important for developers to know when GCC introduced support for each attribute. This augments the texi docs that list

Re: [PATCH 2/3, GCC/ARM] Add support for ARMv8-R architecture

2017-07-06 Thread Richard Earnshaw (lists)
On 06/07/17 13:40, Thomas Preudhomme wrote: > Please find an updated patch in attachment. ChangeLog entry are now as > follows: > > *** gcc/ChangeLog *** > > 2017-07-06 Thomas Preud'homme > > * config/arm/arm-cpus.in (armv8-r): Add new entry. > * config/arm/arm-isa.h (ISA_ARMv8r): Def

[PATCH] Fix memory leaks in libstdc++ tests

2017-07-06 Thread Jonathan Wakely
This fixes some more ASan errors in the testsuite. The first one is a simple leak. The second one is mroe complicated, the test created loads of variables to hold either a strup'd string or "", in order to restore the original environment. Since the test exits after that function, we don't care ab

[PATCH] Fix memory leaks in libstdc++ ABI tests

2017-07-06 Thread Jonathan Wakely
These tests don't bother to free memory before exit, but that means we get ASan errors for them. Fixed like so. * testsuite/abi/pr42230.cc: Free memory. * testsuite/util/testsuite_abi.cc (demangle): Return std::string instead of pointer that might need freeing. * t

Re: [PATCH 2/3, GCC/ARM] Add support for ARMv8-R architecture

2017-07-06 Thread Thomas Preudhomme
Please find an updated patch in attachment. ChangeLog entry are now as follows: *** gcc/ChangeLog *** 2017-07-06 Thomas Preud'homme * config/arm/arm-cpus.in (armv8-r): Add new entry. * config/arm/arm-isa.h (ISA_ARMv8r): Define macro. * config/arm/arm-tables.opt: Regen

RE: Add support for use_hazard_barrier_return function attribute

2017-07-06 Thread Maciej W. Rozycki
On Thu, 6 Jul 2017, Matthew Fortune wrote: > > Nothing wrong with your proposed change, but overall I wonder if (as a > > follow-up change) we could find a nonintrusive way to have this pattern > > (and `clear_hazard_' as well) produce JRS.HB rather than JR.HB in > > microMIPS compilations, as us

Re: [PATCH, GCC/ARM] Remove ARMv8-M code for D17-D31

2017-07-06 Thread Thomas Preudhomme
Hi Richard, On 28/06/17 16:56, Richard Earnshaw (lists) wrote: This is silently baking in dangerous assumptions about GCC's internal numbering of the registers. That's not a good idea from a long-term portability perspective. At the very least you need to assert that all the interesting re

[PATCH] Prevent __uses_alloc from holding dangling references

2017-07-06 Thread Jonathan Wakely
The polymorphic_allocator::construct functions create dangling pointers to rvalues of type memory_resource* and then dereference them, leading to undefined behaviour. This fixes those functions to use lvalues, and then adds a deleted overload of __use_alloc to prevent this happening again. This

Re: [PATCH][x86] Add missing intrinsics for VGETMANT[SD,SS] and VGETEXP[SD,SS]

2017-07-06 Thread Kirill Yukhin
On 06 Jul 09:35, Peryt, Sebastian wrote: > Hi, > > This patch adds missing intrinsics for VGETEXPSD, VGETEXPSS, VGETMANTSD, > VGETMANTSS. > > 2017-07-06 Sebastian Peryt > > gcc/ > * config/i386/avx512fintrin.h (_mm_mask_getexp_round_ss, > _mm_maskz_getexp_round_ss, _mm_mask

Re: [patch][x86] Remove old rounding code

2017-07-06 Thread Kirill Yukhin
Hello Julia, On 21 Jun 08:41, Koval, Julia wrote: > Hi, > This patch removes old parallel code for avx512er. Parallel in this case > can't be generated anymore, because all existing patterns were reworked to > unspec in r249423 and r249009. Ok for trunk? Your patch is OK for trunk. I've comitted

Re: [Arm] Obsoleting Command line option -mstructure-size-boundary in eabi configurations

2017-07-06 Thread Richard Earnshaw (lists)
On 06/07/17 06:46, Michael Collison wrote: > NetBSD/Arm requires that DEFAULT_STRUCTURE_SIZE_BOUNDARY (see > config/arm/netbsd-elf.h for details). This patch disallows > -mstructure-size-boundary on netbsd if the value is not equal to the > DEFAULT_STRUCTURE_SIZE_BOUNDARY. > > Okay for trunk? >

[arm] Fix warning in parsecpu.awk

2017-07-06 Thread Richard Earnshaw (lists)
In awk, single quotes within a quoted string do not need escaping. The existing code causes awk to grumble in the build logs. * config/arm/parsecpu.awk (gen_comm_data): Do not escape single quotes in quoted strings. Committed. R. diff --git a/gcc/config/arm/parsecpu.awk b/gcc/co

[arm] Fix cross-native builds

2017-07-06 Thread Richard Earnshaw (lists)
The patch I committed yesterday to remove some generated headers from the source tree unfortunately has a dependency missing that is only revealed when doing a cross-native or full Canadian cross build. The gen* programs were missing a dependency on one of the generated headers. Fixed by adding a

[PATCH][x86] Add missing intrinsics for VGETMANT[SD,SS] and VGETEXP[SD,SS]

2017-07-06 Thread Peryt, Sebastian
Hi, This patch adds missing intrinsics for VGETEXPSD, VGETEXPSS, VGETMANTSD, VGETMANTSS. 2017-07-06 Sebastian Peryt gcc/ * config/i386/avx512fintrin.h (_mm_mask_getexp_round_ss, _mm_maskz_getexp_round_ss, _mm_mask_getexp_round_sd, _mm_maskz_getexp_round_sd, _mm

Re: [PATCH] [AArch64] Fix PR71112

2017-07-06 Thread Hurugalawadi, Naveen
Hi Ramana, >> PR71112 is still open - should this be backported to GCC-6 ? Ported the patch to gcc-6-branch and committed as:- https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=250014 Bootstrapped and Regression Tested gcc-6-branch for AArch64 on aarch64-thunder-linux. Thanks, Naveen

Re: [Arm] Obsoleting Command line option -mstructure-size-boundary in eabi configurations

2017-07-06 Thread Kyrill Tkachov
Hi Michael, On 06/07/17 06:46, Michael Collison wrote: NetBSD/Arm requires that DEFAULT_STRUCTURE_SIZE_BOUNDARY (see config/arm/netbsd-elf.h for details). This patch disallows -mstructure-size-boundary on netbsd if the value is not equal to the DEFAULT_STRUCTURE_SIZE_BOUNDARY. Okay for trunk

RE: Add support for use_hazard_barrier_return function attribute

2017-07-06 Thread Matthew Fortune
Maciej Rozycki writes: > On Fri, 23 Jun 2017, Prachi Godbole wrote: > > > Index: gcc/config/mips/mips.md > > === > > --- gcc/config/mips/mips.md (revision 246899) > > +++ gcc/config/mips/mips.md (working copy) > > @@ -6578,6 +6581,20

RE: Add support for use_hazard_barrier_return function attribute

2017-07-06 Thread Matthew Fortune
Prachi Godbole writes: > Please find the updated patch below. I hope I've covered everything. > I've added the test for inline restriction, could you check if I got all > the options correct? I think the test is probably good enough. It is a little too forgiving due to handling the indirect call

Re: [PATCH][Aarch64] Add support for overflow add and sub operations

2017-07-06 Thread Richard Earnshaw (lists)
On 06/07/17 08:29, Michael Collison wrote: > Richard, > > Can you explain "Use of ne is wrong here. The condition register should > be set to the result of a compare rtl construct. The same applies > elsewhere within this patch. NE is then used on the result of the > comparison. The mode of th

RE: [PATCH][Aarch64] Add support for overflow add and sub operations

2017-07-06 Thread Michael Collison
Richard, Can you explain "Use of ne is wrong here. The condition register should be set to the result of a compare rtl construct. The same applies elsewhere within this patch. NE is then used on the result of the comparison. The mode of the compare then indicates what might or might not be

Re: [gomp4, nvptx, committed] Fix assert in nvptx_propagate_unified

2017-07-06 Thread Thomas Schwinge
Hi Tom! On Fri, 30 Jun 2017 17:15:24 +0200, Tom de Vries wrote: > with the openacc test-case in attached patch, I ran into an assert here: Using your test case, in my build with "--enable-checking=yes,df,fold,rtl", I already earlier run into an ICE... > static void > nvptx_propagate_unified (rt