C++ PATCH for C++17 class deduction issues US 19/20

2017-01-19 Thread Jason Merrill
wg21.link/p0512r0 proposes resolutions for some issues with class template argument deduction raised in national body comments against the C++17 draft; the paper hasn't been accepted yet, but the proposals seem sensible, so I'm implementing them here. The first makes deduction guides take priority

[PATCH] rs6000: Small varargs for BE SVR4 (PR61729, PR77850)

2017-01-19 Thread Segher Boessenkool
The varargs code for SVR4 puts all (integer) arguments in 4-byte slots. When it then reads an item from there as something not a multiple of 4 bytes, it needs to adjust the address if big endian. We didn't yet do that. This fixes the g++.dg/abi/scoped1.C, gcc.dg/compat/scalar-by-value-4, and gcc.

Re: [1/5][AArch64] Return address protection on AArch64

2017-01-19 Thread Andrew Pinski
On Fri, Jan 6, 2017 at 3:47 AM, Jiong Wang wrote: > On 11/11/16 18:22, Jiong Wang wrote: >> >> As described in the cover letter, this patch implements return address >> signing >> for AArch64, it's controlled by the new option: >> >>-msign-return-address=[none | non-leaf | all] >> >> "none" me

[PATCH] PR72792 PR72793 relax requirements on rebind members

2017-01-19 Thread Jonathan Wakely
I misread the specifications for pointer_traits::rebind and allocator_traits::rebind_alloc and was requiring them to be valid for any specialization of the class templates. In fact they're only needed if instantiated. This fixes the problem. PR libstdc++/72792 PR libstdc++/72793

libgo patch committed: Fix build on s390x GNU/Linux

2017-01-19 Thread Ian Lance Taylor
This patch to libgo fixes the build on s390x GNU/Linux by ignoring an s390x-specific file that only works in conjunction with s390x assembly code that has not (yet) been ported to gccgo. Bootstrapped and ran Go tests on x86_64-pc-linux-gnu, which admittedly proves little. Verified that the right f

[PATCH] PR69321 fix any_cast(any*) for non-copyable T

2017-01-19 Thread Jonathan Wakely
any_cast must not trigger the instantiation of the manager function for types which don't meet the requirements for being stored in an any object. PR libstdc++/69321 * include/experimental/any (__any_caster): Avoid instantiating manager function for types that can't be sto

RE: [patch mips/gcc] add build-time and runtime options to disable or set madd.fmt type

2017-01-19 Thread Moore, Catherine
> -Original Message- > From: Matthew Fortune [mailto:matthew.fort...@imgtec.com] > Sent: Thursday, January 19, 2017 5:30 PM > To: Moore, Catherine > Cc: 'Aurelien Jarno' ; 'Richard Sandiford' > ; Loosemore, Sandra > ; Yunqiang Su > ; 'gcc-patches' > Subject: RE: [patch mips/gcc] add bui

[PATCH] Fix PR c++/64382

2017-01-19 Thread Adam Butcher
Hi Jason, I've reopened 64382 and unhooked it from 61636 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64382#c6). This is a rebase of my original patch for 64382 from April 2015 against latest master. My query about caching parsing_default_capturing_generic_lambda_in_template() still applies. I

Re: [PATCH] PR64903 fix number of predicate tests in std::is_partitioned

2017-01-19 Thread Jonathan Wakely
On 20/01/17 00:11 +, Jonathan Wakely wrote: On 19/01/17 19:08 -0500, Tim Song wrote: On Thu, Jan 19, 2017 at 6:33 PM, Jonathan Wakely wrote: std::advance(__first, 1); Why not just ++__first;? Good question. I have no idea why I did it like that! Fixed like so. Committed to trunk. co

Re: [PATCH] rs6000: Fix the new SSP guard configuration code (PR79140)

2017-01-19 Thread David Edelsohn
On Thu, Jan 19, 2017 at 6:00 PM, Segher Boessenkool wrote: > I foolishly tested this with r241087 reverted. After that revision > default_stack_protect_guard is no longer called if the compiler defaults > to using the TLS guard, which of course is the wrong thing to do if > there is some other wa

Re: [PATCH] PR64903 fix number of predicate tests in std::is_partitioned

2017-01-19 Thread Jonathan Wakely
On 19/01/17 19:08 -0500, Tim Song wrote: On Thu, Jan 19, 2017 at 6:33 PM, Jonathan Wakely wrote: std::advance(__first, 1); Why not just ++__first;? Good question. I have no idea why I did it like that!

Re: [PATCH] PR64903 fix number of predicate tests in std::is_partitioned

2017-01-19 Thread Tim Song
On Thu, Jan 19, 2017 at 6:33 PM, Jonathan Wakely wrote: > std::advance(__first, 1); Why not just ++__first;?

[PATCH] PR79156 fix std::__enable_shared_from_this extension

2017-01-19 Thread Jonathan Wakely
A couple of silly bugs in the non-standard __enable_shared_from_this extension. PR libstdc++/79156 * include/bits/shared_ptr_base.h (__enable_shared_from_this_base): Fix return type. (__enable_shared_from_this): Declare __shared_ptr as a friend. * testsuite

[PATCH] PR64903 fix number of predicate tests in std::is_partitioned

2017-01-19 Thread Jonathan Wakely
PR libstdc++/64903 * include/bits/stl_algo.h (is_partioned): Don't retest the partition point. * testsuite/25_algorithms/is_partitioned/2.cc: New test. Tested powerpc64le-linux, committed to trunk. commit 5e9b690d27ac3cecf138bac904606f5728ca452f Author: Jonathan W

Re: Re: Fortran, committed: Forall-with-temporary problems(pr 50069 and pr 55086).

2017-01-19 Thread Louis Krupp
I was able to reproduce this on my x86 box by doing "make -k check". Apparently, "make check-fortran" wasn't enough to catch all of the consequences of changing gcc/fortran/lang.opt. The problem was the help text associated with the -ftest-forall-temp option; it needed to end with a period, and

Re: [PATCH] PR69699 document why __GLIBCXX__ macro is useless

2017-01-19 Thread Jonathan Wakely
On 17/01/17 15:36 +, Jonathan Wakely wrote: The closest thing we have to a version macro in libstdc++ is __GLIBCXX__ which holds the valid of gcc/DATESTAMP from the source tree. That's useless for version checking or feature testing because snapshots have arbitrary values and there's no total

Re: [PATCH] Introduce --with-gcc-major-version-only configure option (take 2)

2017-01-19 Thread Matthias Klose
On 19.01.2017 13:26, Jakub Jelinek wrote: > On Thu, Jan 19, 2017 at 01:13:14PM +0100, Franz Sirl wrote: >> Am 2017-01-12 um 21:16 schrieb Jakub Jelinek: >>> libmpx/ >>> * configure.ac: Add GCC_BASE_VER. >>> * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to >>> get ve

[PATCH,rs6000] Correct argument and result types for binary floating point built-in functions

2017-01-19 Thread Kelvin Nilsen
This patch corrects several errors in a patch originally committed on 2016-08-10. The following corrections are required to maintain compliance with "Power Architecture 64-Bit ELF V2 ABI Specification", also known as "OpenPOWER ABI for Linux Supplement". vector unsigned long long vec_extract_e

Re: [PATCH] PR67085 move comparison functions in heap operations

2017-01-19 Thread Jonathan Wakely
On 19/01/17 20:24 +, Jonathan Wakely wrote: On 19/01/17 18:50 +, Jonathan Wakely wrote: On 19/01/17 18:28 +, Jonathan Wakely wrote: @@ -397,7 +401,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION while (__last - __first > 1) { --__last; - std::__pop_heap(__first,

[PATCH] rs6000: Fix the new SSP guard configuration code (PR79140)

2017-01-19 Thread Segher Boessenkool
I foolishly tested this with r241087 reverted. After that revision default_stack_protect_guard is no longer called if the compiler defaults to using the TLS guard, which of course is the wrong thing to do if there is some other way to enable the global guard. This fixes it. Is this okay for trun

[PATCH, pr63256] update powerpc dg options

2017-01-19 Thread Aaron Sawdey
SMS does process the loop in sms-8.c on powerpc now so I have updated the options to reflect that. Test now passes on powerpc -m64/-m32/-m32 -mpowerpc64. Ok for trunk? testsuite/ChangeLog 2017-01-19  Aaron Sawdey   * gcc.dg/sms-8.c: Update options for powerpc*-*-*. -- Aaron Sawdey, Ph.D.

Re: [RS6000] Don't expand strcmp and strncmp inline when -Os

2017-01-19 Thread Segher Boessenkool
On Thu, Jan 19, 2017 at 10:47:12PM +1030, Alan Modra wrote: > --- a/gcc/config/rs6000/rs6000.md > +++ b/gcc/config/rs6000/rs6000.md > @@ -9102,7 +9102,8 @@ (define_expand "cmpstrnsi" > (use (match_operand:SI 4))])] >"TARGET_CMPB && (BYTES_BIG_ENDIAN || TARGET_LDBRX)" > { > - if (e

Re: [RS6000] PR79144, cmpstrnsi optimization breaks glibc

2017-01-19 Thread Segher Boessenkool
On Thu, Jan 19, 2017 at 10:44:27PM +1030, Alan Modra wrote: > glibc compiled with current gcc-7 fails one test due to strcmp and > strncmp appearing in the PLT. This is because the inline expansion of > those functions falls back to a function call, but not using the asm > name for the call. Fixe

RE: [patch mips/gcc] add build-time and runtime options to disable or set madd.fmt type

2017-01-19 Thread Matthew Fortune
Matthew Fortune writes: > I've rewritten/simplified this patch as it provides far too much control > to end users who will undoubtedly shoot themselves in the foot so to > speak. The option I intend to support is simply --with-madd4 --without-madd4 > and -mmadd4 -mno-madd4. This is a simple enable

Re: [PATCH], PowerPC ISA 3.0 defaults + IEEE 128-bit floating point test

2017-01-19 Thread Segher Boessenkool
On Wed, Jan 18, 2017 at 08:35:05PM -0500, Michael Meissner wrote: > This patch changes the default options enabled for the PowerPC -mcpu=power9 > option to include the undocumented -mpower9-minmax option. This option > enables > MIN/MAX instructions that do not require -ffast-math or -fhonor-nans

[PATCH, i386]: Remove config/i386/rtems-64.h

2017-01-19 Thread Uros Bizjak
Hello! This file is now the same as config/i386/rtemself.h. Remove one copy. 2017-01-19 Uros Bizjak * config.gcc (x86_64-*-rtems*): Use i386/rtemself.h instead of i386/rtems-64.h. * config/i386/rtems-64.h: Remove. Committed as obvious. Uros. Index: config/i386/rtems-64.h ===

[PATCH, i386] Fix PR78478, Compile Error for i386-rtems

2017-01-19 Thread Uros Bizjak
Hello! This patch (partially) reverts my change from 2013-11-05. Apparently, LONG_DOUBLE_TYPE_SIZE interferes with soft-float handling. 2017-01-19 Uros Bizjak PR target/78478 Revert: 2013-11-05 Uros Bizjak * config/i386/rtemself.h (LONG_DOUBLE_TYPE_SIZE): New define. Test

Re: Pretty printers for versioned namespace

2017-01-19 Thread Jonathan Wakely
On 19/01/17 22:01 +0100, François Dumont wrote: On 10/01/2017 13:39, Jonathan Wakely wrote: I've committed the attached patch, which passes the tests for the default configuration and the versioned namespace configuration. I added another helper function, strip_versioned_namespace, which is mor

Re: Pretty printers for versioned namespace

2017-01-19 Thread François Dumont
On 10/01/2017 13:39, Jonathan Wakely wrote: I've committed the attached patch, which passes the tests for the default configuration and the versioned namespace configuration. I added another helper function, strip_versioned_namespace, which is more expressive than doing typename.replace(vers_nsp

Re: [PATCH, configure, libgfortran]: PR78478: Use fpu-generic for x86 when _SOFT_FLOAT is defined

2017-01-19 Thread Janne Blomqvist
On Thu, Jan 19, 2017 at 10:43 PM, Uros Bizjak wrote: > Hello! > > Attached patch avoids bootstrap error when building libgfortran for > soft-float x86 targets. Configure detects when _SOFT_FLOAT is defined > and uses fpu-generic.h instead of fpu-387.h header. > > The patch also imports ax_check_d

Re: [PATCH] C++: fix fix-it hints for misspellings within explicit namespaces (v2)

2017-01-19 Thread David Malcolm
On Thu, 2017-01-19 at 13:15 -0500, Jason Merrill wrote: > On Wed, Jan 18, 2017 at 5:29 PM, David Malcolm > wrote: > > Here's a version of the patch which simply tweaks > > cp_parser_primary_expression's call to finish_id_expression so that > > it passes the location of the id_expression, rather th

[PATCH, configure, libgfortran]: PR78478: Use fpu-generic for x86 when _SOFT_FLOAT is defined

2017-01-19 Thread Uros Bizjak
Hello! Attached patch avoids bootstrap error when building libgfortran for soft-float x86 targets. Configure detects when _SOFT_FLOAT is defined and uses fpu-generic.h instead of fpu-387.h header. The patch also imports ax_check_define.m4 from autoconf archive [1] - the macro is really handy, an

Re: [PATCH] PR67085 move comparison functions in heap operations

2017-01-19 Thread Jonathan Wakely
On 19/01/17 18:50 +, Jonathan Wakely wrote: On 19/01/17 18:28 +, Jonathan Wakely wrote: @@ -397,7 +401,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION while (__last - __first > 1) { --__last; - std::__pop_heap(__first, __last, __last, __comp); + std::__pop_he

Re: [Ping~]Re: [5/5][libgcc] Runtime support for AArch64 return address signing (needs new target macros)

2017-01-19 Thread Richard Earnshaw (lists)
On 19/01/17 14:46, Jiong Wang wrote: > Thanks for the review. > > On 19/01/17 14:18, Richard Earnshaw (lists) wrote: >> >>> >>> >>> diff --git a/libgcc/unwind-dw2.c b/libgcc/unwind-dw2.c >>> index >>> 8085a42ace15d53f4cb0c6681717012d906a6d47..cf640135275deb76b820f8209fa51eacfd64c4a2 >>> 100644 >>>

Re: [PATCH] PR67085 move comparison functions in heap operations

2017-01-19 Thread Jonathan Wakely
On 19/01/17 18:28 +, Jonathan Wakely wrote: @@ -397,7 +401,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION while (__last - __first > 1) { --__last; - std::__pop_heap(__first, __last, __last, __comp); + std::__pop_heap(__first, __last, __last, _GLIBCXX_MOVE(__comp

[PATCH] PR67085 move comparison functions in heap operations

2017-01-19 Thread Jonathan Wakely
This turns lots and lots of copies into moves, which can make a huge difference to performance (consider a std::function which has to allocate on every copy). PR libstdc++/67085 * include/bits/stl_heap.h (push_heap, __adjust_heap, __pop_heap) (pop_heap, __make_heap, make_h

Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2017-01-19 Thread Joseph Myers
On Thu, 19 Jan 2017, Tamar Christina wrote: > Hi Joseph, > > I made the requested changes and did a quick pass over the rest > of the fp cases. I've no further comments, but watch out for any related test failures being reported. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH][GCC][Aarch64] Add vectorize patten for copysign.

2017-01-19 Thread James Greenhalgh
On Thu, Jan 19, 2017 at 06:05:52PM +, Tamar Christina wrote: > Hi James, > > I have corrected the testsuite changes and attached is the new file and > changelog. > > Ok for trunk? > > Tamar > > Hi All, > > This patch vectorizes the copysign builtin for Aarch64 > similar to how it is done

Re: [PATCH] C++: fix fix-it hints for misspellings within explicit namespaces (v2)

2017-01-19 Thread Jason Merrill
On Wed, Jan 18, 2017 at 5:29 PM, David Malcolm wrote: > Here's a version of the patch which simply tweaks > cp_parser_primary_expression's call to finish_id_expression so that > it passes the location of the id_expression, rather than that of > id_expr_token. > > The id_expression in question came

Re: [PATCH][GCC][Aarch64] Add vectorize patten for copysign.

2017-01-19 Thread Tamar Christina
Hi James, I have corrected the testsuite changes and attached is the new file and changelog. Ok for trunk? Tamar Hi All, This patch vectorizes the copysign builtin for Aarch64 similar to how it is done for Arm. AArch64 now generates: ... .L4: ldr q1, [x6, x3] add w4,

Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2017-01-19 Thread Tamar Christina
Hi Joseph, I made the requested changes and did a quick pass over the rest of the fp cases. Regards, Tamar From: Joseph Myers Sent: Thursday, January 19, 2017 4:33:13 PM To: Tamar Christina Cc: Jeff Law; GCC Patches; Wilco Dijkstra; rguent...@suse.de; Mi

Re: [PATCH] Add AVX512 k-mask intrinsics

2017-01-19 Thread Kirill Yukhin
On 19 Jan 19:42, Andrew Senkevich wrote: > 2017-01-19 13:39 GMT+03:00 Kirill Yukhin : > > Hi Andrew, > > On 18 Jan 15:45, Andrew Senkevich wrote: > >> 2017-01-17 16:51 GMT+03:00 Jakub Jelinek : > >> > On Tue, Jan 17, 2017 at 04:03:08PM +0300, Andrew Senkevich wrote: > >> >> > I've played a bit w/ S

[testsuite] Fix gcc.dg/attr-alloc_size-4.c on i?86 (PR testsuite/79051)

2017-01-19 Thread Rainer Orth
As described in the PR, gcc.dg/attr-alloc_size-4.c was FAILing on 32-bit x86 targets. Fixed as follows by removing the mismatch between #if conditions and target selectors. Tested with the appropriate runtest invocations on i386-pc-solaris2.12 and amd64-pc-solaris2.12, installed on mainline.

Re: [PATCH] BRIG frontend: request for a global review

2017-01-19 Thread Pekka Jääskeläinen
Hi Jakub and Richard, Attached is an updated BRIG FE patch which adds the HSAIL related builtins only internally in the BRIG FE. I didn't add LTO support as I believe it's not useful for BRIG FE due to it always inputting fully linked BRIGs and not mixing with other frontends. BR, Pekka On Mon

RE: [patch mips/gcc] add build-time and runtime options to disable or set madd.fmt type

2017-01-19 Thread Matthew Fortune
Hi, I've rewritten/simplified this patch as it provides far too much control to end users who will undoubtedly shoot themselves in the foot so to speak. The option I intend to support is simply --with-madd4 --without-madd4 and -mmadd4 -mno-madd4. This is a simple enable/disable on top of architect

Re: [PATCH] Make LTO's implementation of LANG_HOOKS_TYPE_FOR_SIZE the default

2017-01-19 Thread Richard Biener
On January 19, 2017 5:37:09 PM GMT+01:00, David Malcolm wrote: >On Thu, 2017-01-19 at 10:36 +0100, Richard Biener wrote: >> On Wed, Jan 18, 2017 at 10:45 PM, David Malcolm >> wrote: >> > The jit testcase test-nested-loops.c was crashing. >> > >> > Root cause is that deep inside loop optimizatio

Re: [committed] libitm: Disable TSX on processors on which it may be broken.

2017-01-19 Thread Uros Bizjak
On Wed, Jan 18, 2017 at 11:08 PM, Uros Bizjak wrote: > On Wed, Jan 18, 2017 at 10:48 PM, Uros Bizjak wrote: >> Hello! >> >>> This fix follows the same approach that glibc uses to disable TSX on >>> processors on which it is broken. TSX can also be disabled through a >>> microcode update on these

Re: [PATCH][GCC][Aarch64] Add vectorize patten for copysign.

2017-01-19 Thread James Greenhalgh
On Thu, Jan 19, 2017 at 03:55:36PM +, Tamar Christina wrote: > > It seems I can drop even more: The AArch64 parts of this look fine to me, and based on benchmarking of the patch they are low risk for high reward (and other targets have had a vectorized copysign for a while without issue). Ho

Re: Implement -Wduplicated-branches (PR c/64279) (v3)

2017-01-19 Thread Jakub Jelinek
On Thu, Jan 19, 2017 at 05:52:14PM +0100, Marek Polacek wrote: > > I agree that not warning for > > if (foo) > > return NULL; > > else > > return NULL; > > is bad. But how can I compare those expressions side-by-side? I'm not > > finding > > anything. :( > > Seems like ENOTIME to a

Re: [PR middle-end/79123] cast false positive in -Walloca-larger-than=

2017-01-19 Thread Martin Sebor
On 01/19/2017 05:45 AM, Richard Biener wrote: On Thu, Jan 19, 2017 at 1:17 PM, Aldy Hernandez wrote: In the attached testcase, we have a clearly bounded case of alloca which is being incorrectly reported: void g (int *p, int *q) { size_t n = (size_t)(p - q); if (n < 10) f (__builti

Re: Implement -Wduplicated-branches (PR c/64279) (v3)

2017-01-19 Thread Marek Polacek
On Mon, Jan 09, 2017 at 02:39:30PM +0100, Marek Polacek wrote: > On Mon, Jan 09, 2017 at 12:18:01PM +0100, Jakub Jelinek wrote: > > On Mon, Jan 09, 2017 at 10:21:47AM +0100, Marek Polacek wrote: > > > +/* Callback function to determine whether an expression TP or one of its > > > + subexpressions

Re: [PATCH] Add AVX512 k-mask intrinsics

2017-01-19 Thread Andrew Senkevich
2017-01-19 13:39 GMT+03:00 Kirill Yukhin : > Hi Andrew, > On 18 Jan 15:45, Andrew Senkevich wrote: >> 2017-01-17 16:51 GMT+03:00 Jakub Jelinek : >> > On Tue, Jan 17, 2017 at 04:03:08PM +0300, Andrew Senkevich wrote: >> >> > I've played a bit w/ SDE. And looks like operands are not early clobber: >>

[PATCH, v2] (9e) Update "startwith" logic for pass-skipping to handle __RTL functions

2017-01-19 Thread David Malcolm
On Mon, 2017-01-16 at 14:42 -0700, Jeff Law wrote: > On 01/09/2017 07:38 PM, David Malcolm wrote: > > gcc/ChangeLog: > > * passes.c: Include "insn-addr.h". > > (should_skip_pass_p): Add logging. Update logic for running > > "expand" to be compatible with both __GIMPLE and __RTL. Guard

Re: [PATCH][AArch64] Purge leftover occurrences of aarch64_nopcrelative_literal_loads

2017-01-19 Thread James Greenhalgh
On Thu, Jan 19, 2017 at 12:17:40PM +, Kyrill Tkachov wrote: > Hi all, > > The patch that renamed all uses of aarch64_nopcrelative_literal_loads into > aarch64_pcrelative_literal_loads missed out its extern declaration in > aarch64-protos.h and a couple of its uses in aarch64.md. > The aarch64_

Re: [PATCH] Speed-up use-after-scope (re-writing to SSA) (version 2)

2017-01-19 Thread Jakub Jelinek
On Wed, Jan 18, 2017 at 04:34:48PM +0100, Martin Liška wrote: > Hello. > > During bootstrap, I came to following test-case: > > struct A > { > int regno; > }; > struct > { > A base; > } typedef *df_ref; > int *a; > void > fn1 (int N) > { > for (int i = 0; i < N; i++) > { > df_ref

Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2017-01-19 Thread Joseph Myers
On Thu, 19 Jan 2017, Tamar Christina wrote: > > The old code set orig_arg before converting IBM long double to double. > > Your code sets it after the conversion. The old code set min_exp based on > > a string set from REAL_MODE_FORMAT (orig_mode)->emin - 1; your code uses > > the adjusted mode.

RE: [PATCH,gcc/MIPS] Make loongson3a use fused madd.d

2017-01-19 Thread Matthew Fortune
Hi Paul, Your latest version of the patch is now committed. I have been doing some work on the recursive build failure but the issue is complex and involves LRA so I went ahead with committing your change independently. It also turns out that (at least when targeting loongson3a) there are stage2

RE: [PATCH, MIPS] Target flag and build option to disable indexed memory OPs.

2017-01-19 Thread Matthew Fortune
Hi Doug, I've committed this on your behalf to get the testcases in and also add the description of when this feature is required. Thanks for the patch. Committed code inline below. r244640 gcc/ PR target/78176 * config.gcc (supported_defaults): Add lxc1-sxc1. (with_lx

Re: [PATCH 0/5] OpenMP/PTX: improve correctness in SIMD regions

2017-01-19 Thread Alexander Monakov
On Thu, 19 Jan 2017, Jakub Jelinek wrote: > On Thu, Jan 19, 2017 at 04:36:25PM +0300, Alexander Monakov wrote: > > > One of the problems with that is that it means that you can't easily turn > > > addressable private variables into non-addressable ones once you force > > > them > > > into such str

[PATCH] Make LTO's implementation of LANG_HOOKS_TYPE_FOR_SIZE the default

2017-01-19 Thread David Malcolm
On Thu, 2017-01-19 at 10:36 +0100, Richard Biener wrote: > On Wed, Jan 18, 2017 at 10:45 PM, David Malcolm > wrote: > > The jit testcase test-nested-loops.c was crashing. > > > > Root cause is that deep inside loop optimization we're now exposing > > this call within fold-const.c which wasn't bei

Re: C++ PATCH for c++/79130 (direct-initialization of arrays with decomposition)

2017-01-19 Thread Jason Merrill
On Thu, Jan 19, 2017 at 9:43 AM, Jason Merrill wrote: > Jakub pointed out that parenthesized decomposition of an array wasn't > properly using direct-initialization. Rather than pass the flags down > into build_vec_init at this point in GCC 7 development, let's turn the > initializer into somethi

Re: [PATCH][GCC][Aarch64] Add vectorize patten for copysign.

2017-01-19 Thread Tamar Christina
It seems I can drop even more: gcc/ 2017-01-19 Tamar Christina * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup): Changed int to HOST_WIDE_INT. * config/aarch64/aarch64-protos.h (aarch64_simd_gen_const_vector_dup): Likewise. * config/aarch6

Re: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-01-19 Thread Jakub Jelinek
On Thu, Jan 19, 2017 at 06:09:35PM +0300, Alexander Monakov wrote: > > -#ifdef __LP64__ > > +#if defined(__LP64__) || defined(_WIN64) > > > > (is that the right define for 64-bit MingW, right?). > > Yes, _WIN64; libsanitizer has a similar test. Alternatively, I guess, > > #if __SIZEOF_POINTER

Re: [PATCH, Fortran, pr70696, v2] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray

2017-01-19 Thread Andre Vehreschild
Hi Steve, thanks for the review. Committed as r244637. Regards, Andre On Thu, 19 Jan 2017 06:51:19 -0800 Steve Kargl wrote: > On Thu, Jan 19, 2017 at 01:07:50PM +0100, Andre Vehreschild wrote: > > Hi all, > > > > unfortunately triggered this patch a regression in the opencoarray's > >

Re: libgo patch committed: Update to Go1.8rc1

2017-01-19 Thread Rainer Orth
Hi Ian, > On Mon, Jan 16, 2017 at 7:21 AM, Rainer Orth > wrote: >> >> I'm getting further on Solaris now, but the build still fails: > > I committed this patch to fix the remaining build problems on Solaris. > Bootstrapped and ran some of the Go tests on i386-sun-solaris11 and > x86_64-pc-linux-g

Re: [PATCH][GCC][Aarch64] Add vectorize patten for copysign.

2017-01-19 Thread Tamar Christina
Hi All, It seems the entry in config/aarch64/aarch64-builtins.c isn't needed, as such I've simplified the patch and the changelog. Ok for trunk? Tamar gcc/ 2017-01-19 Tamar Christina * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup): Changed int to HOST_WIDE_I

Re: [WPA PATCH] Comdat group splitting

2017-01-19 Thread Jan Hubicka
> honza, > this is the fix for the partitioned WPA bug I was tracking down. > > We have base and complete dtors sharing a comdat group (one's an alias for > the other). The linker tells us the complete dtor is PREVAILING_DEF, as > it's referenced from some other library. The base dtor is UNKNOWN

[PATCH] Fix further -fdebug-types-section bugs (PR debug/79129)

2017-01-19 Thread Jakub Jelinek
Hi! This is on top of the PR78835 patch I've posted yesterday. We ICE on the following testcase reduced from libstdc++ ios_failure.cc. If there are nested comdat types, as B (outer type) and A (inner type) in the testcase, we first move A to a type unit and add there copies of its children, and pr

Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2017-01-19 Thread Tamar Christina
> > The calls to is_zero and is_subnormal were incorrect indeed. I've > > corrected them by not calling the fixup code and to instead make sure it > > falls through into the old fp based code which did normal floating point > > operations on the number. This is the same code as was before in > > f

Re: Re: [PATCH 0/5] OpenMP/PTX: improve correctness in SIMD regions

2017-01-19 Thread Cesar Philippidis
On 01/18/2017 06:22 AM, Richard Biener wrote: > On Wed, Jan 18, 2017 at 3:11 PM, Alexander Monakov wrote: >> On Wed, 18 Jan 2017, Richard Biener wrote: After OpenMP lowering, inlining might break this by inlining functions with address-taken locals into SIMD regions. For now, such inlin

Re: [PATCH] Fix IPA CP where it forgot to add a reference in cgraph

2017-01-19 Thread Jan Hubicka
> >> 2016-12-19 Martin Liska > >> > >>* cgraphclones.c (cgraph_node::create_virtual_clone): > >>Create either IPA_REF_LOAD of IPA_REF_READ depending on > >>whether new_tree is a VAR_DECL or an ADDR_EXPR. > >>* ipa-cp.c (create_specialized_node): Add reference just for > >>ADD

Re: [PATCH] Allow building GCC with PTX offloading even without CUDA being installed (gcc and nvptx-tools patches)

2017-01-19 Thread Alexander Monakov
On Wed, 18 Jan 2017, Jakub Jelinek wrote: > On Wed, Jan 18, 2017 at 10:52:32PM +0300, Alexander Monakov wrote: > > Sorry for not noticing this earlier, but ... > > > > > +#ifdef __LP64__ > > > +typedef unsigned long long CUdeviceptr; > > > +#else > > > +typedef unsigned CUdeviceptr; > > > +#endif

Re: [PATCH] Fix IPA CP where it forgot to add a reference in cgraph

2017-01-19 Thread Martin Liška
On 01/18/2017 11:18 PM, Jan Hubicka wrote: >> >> 2016-12-19 Martin Liska >> >> * cgraphclones.c (cgraph_node::create_virtual_clone): >> Create either IPA_REF_LOAD of IPA_REF_READ depending on >> whether new_tree is a VAR_DECL or an ADDR_EXPR. >> * ipa-cp.c (create_specialized

Re: [PATCH, Fortran, pr70696, v2] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray

2017-01-19 Thread Steve Kargl
On Thu, Jan 19, 2017 at 01:07:50PM +0100, Andre Vehreschild wrote: > Hi all, > > unfortunately triggered this patch a regression in the opencoarray's > testsuite, > which also occurs outside of opencoarray, when a caf-function is used in a > block in the main-program. This patch fixes the error a

Re: [Ping~]Re: [5/5][libgcc] Runtime support for AArch64 return address signing (needs new target macros)

2017-01-19 Thread Jiong Wang
Thanks for the review. On 19/01/17 14:18, Richard Earnshaw (lists) wrote: diff --git a/libgcc/unwind-dw2.c b/libgcc/unwind-dw2.c index 8085a42ace15d53f4cb0c6681717012d906a6d47..cf640135275deb76b820f8209fa51eacfd64c4a2 100644 --- a/libgcc/unwind-dw2.c +++ b/libgcc/unwind-dw2.c @@ -136,6 +13

Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2017-01-19 Thread Joseph Myers
On Thu, 19 Jan 2017, Tamar Christina wrote: > > Also, I don't think the call to perform_ibm_extended_fixups in > > is_subnormal is correct. Subnormal for IBM long double is *not* the same > > as subnormal double high part. Likewise it's incorrect in is_normal as > > well. > > The calls to is_ze

Re: [expand] Fix for PR rtl-optimization/79121 incorrect expansion of extend plus left shift

2017-01-19 Thread Jeff Law
On 01/19/2017 03:37 AM, Richard Earnshaw (lists) wrote: On 18/01/17 21:07, Jeff Law wrote: On 01/18/2017 11:08 AM, Richard Earnshaw (lists) wrote: PR 79121 is a silent wrong code regression where, when generating a shift from an extended value moving from one to two machine registers, the type

C++ PATCH for c++/79130 (direct-initialization of arrays with decomposition)

2017-01-19 Thread Jason Merrill
Jakub pointed out that parenthesized decomposition of an array wasn't properly using direct-initialization. Rather than pass the flags down into build_vec_init at this point in GCC 7 development, let's turn the initializer into something that build_vec_init recognizes as direct-initialization. Te

Re: [PATCH][GCC][PATCHv3] Improve fpclassify w.r.t IEEE like numbers in GIMPLE.

2017-01-19 Thread Tamar Christina
Hi Joseph & Jeff, Thanks for the feedback! > > Generally, I don't see tests added that these new functions are correct > > for float, double and long double, which would detect such issues if run > > for a target with IBM long double. > > Specifically, I think gcc.dg/tg-tests.h should have tests

Re: [PATCH 0/5] OpenMP/PTX: improve correctness in SIMD regions

2017-01-19 Thread Jakub Jelinek
On Thu, Jan 19, 2017 at 04:36:25PM +0300, Alexander Monakov wrote: > On Wed, 18 Jan 2017, Jakub Jelinek wrote: > > > Inlining needs to do just like omp-low; if we take the current framework, > > > it > > > would need to collect addressable locals into one struct, replace > > > references to > > >

Re: [Ping~]Re: [5/5][libgcc] Runtime support for AArch64 return address signing (needs new target macros)

2017-01-19 Thread Richard Earnshaw (lists)
On 18/01/17 17:07, Jiong Wang wrote: > On 12/01/17 18:10, Jiong Wang wrote: >> On 06/01/17 11:47, Jiong Wang wrote: >>> This is the update on libgcc unwinder support according to new DWARF >>> proposal. >>> >>> As Joseph commented, duplication of unwind-dw2.c is not encouraged in >>> libgcc, >>> Bu

Re: [2/5][DWARF] Generate dwarf information for -msign-return-address by introducing new DWARF mapping hook

2017-01-19 Thread Richard Earnshaw (lists)
On 17/01/17 15:11, Jiong Wang wrote: > > > On 17/01/17 13:57, Richard Earnshaw (lists) wrote: >> On 16/01/17 14:29, Jiong Wang wrote: >>> I can see the reason for doing this is if you want to seperate the interpretion of GCC CFA reg-note and the final DWARF CFA operation. My

Re: [PR middle-end/79123] cast false positive in -Walloca-larger-than=

2017-01-19 Thread Richard Biener
On Thu, Jan 19, 2017 at 2:02 PM, Aldy Hernandez wrote: > On 01/19/2017 07:45 AM, Richard Biener wrote: >> >> On Thu, Jan 19, 2017 at 1:17 PM, Aldy Hernandez wrote: >>> >>> In the attached testcase, we have a clearly bounded case of alloca which >>> is >>> being incorrectly reported: >>> >>> void

Re: [PATCH 0/5] OpenMP/PTX: improve correctness in SIMD regions

2017-01-19 Thread Alexander Monakov
On Wed, 18 Jan 2017, Jakub Jelinek wrote: > > Inlining needs to do just like omp-low; if we take the current framework, it > > would need to collect addressable locals into one struct, replace > > references to > > those locals by field references in the inlined body. Then it needs to > > appropr

Re: [PATCH] Fix libgfortran bootstrap error on x86_64-mingw32 (PR target/79127)

2017-01-19 Thread FX
> 2017-01-19 Jakub Jelinek > > PR target/79127 > * acinclude.m4 (LIBGFOR_CHECK_AVX512F): Ensure the test clobbers > some zmm16+ registers to verify they are handled by unwind info > properly if needed. > * configure: Regenerated. OK to commit, with an additional c

Re: [PR middle-end/79123] cast false positive in -Walloca-larger-than=

2017-01-19 Thread Aldy Hernandez
On 01/19/2017 07:45 AM, Richard Biener wrote: On Thu, Jan 19, 2017 at 1:17 PM, Aldy Hernandez wrote: In the attached testcase, we have a clearly bounded case of alloca which is being incorrectly reported: void g (int *p, int *q) { size_t n = (size_t)(p - q); if (n < 10) f (__builti

Re: Fortran, committed: Forall-with-temporary problems(pr 50069 and pr 55086).

2017-01-19 Thread Christophe Lyon
Hi, On 18 January 2017 at 22:45, Louis Krupp wrote: > Fixed in revision 244601. > I've noticed a new failure on arm/aarch64: compiler driver --help=fortran option(s): "^ +-.*[^:.]$" absent from output: " -ftest-forall-temp Force creation of temporary to test infrequently-executed fo

Re: [PR middle-end/79123] cast false positive in -Walloca-larger-than=

2017-01-19 Thread Richard Biener
On Thu, Jan 19, 2017 at 1:17 PM, Aldy Hernandez wrote: > In the attached testcase, we have a clearly bounded case of alloca which is > being incorrectly reported: > > void g (int *p, int *q) > { >size_t n = (size_t)(p - q); > >if (n < 10) > f (__builtin_alloca (n)); > } > > The proble

Re: [PATCH] Introduce --with-gcc-major-version-only configure option (take 2)

2017-01-19 Thread Jakub Jelinek
On Thu, Jan 19, 2017 at 01:13:14PM +0100, Franz Sirl wrote: > Am 2017-01-12 um 21:16 schrieb Jakub Jelinek: > > libmpx/ > > * configure.ac: Add GCC_BASE_VER. > > * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to > > get version from BASE-VER file. > > * configure

[PR middle-end/79123] cast false positive in -Walloca-larger-than=

2017-01-19 Thread Aldy Hernandez
In the attached testcase, we have a clearly bounded case of alloca which is being incorrectly reported: void g (int *p, int *q) { size_t n = (size_t)(p - q); if (n < 10) f (__builtin_alloca (n)); } The problem is that VRP gives us an anti-range for `n' which may be out of range:

[PATCH][AArch64] Purge leftover occurrences of aarch64_nopcrelative_literal_loads

2017-01-19 Thread Kyrill Tkachov
Hi all, The patch that renamed all uses of aarch64_nopcrelative_literal_loads into aarch64_pcrelative_literal_loads missed out its extern declaration in aarch64-protos.h and a couple of its uses in aarch64.md. The aarch64_nopcrelative_literal_loads doesn't get initialised anywhere (since it's

[RS6000] Don't expand strcmp and strncmp inline when -Os

2017-01-19 Thread Alan Modra
The inline expansions are non-trivial, so aren't really appropriate for -Os. Bootstrapped and regression tested powerpc64le-linux. OK to apply? * config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if optimizing for size. diff --git a/gcc/config/rs6000/rs6000.md b/gcc/config/rs6

[RS6000] PR79144, cmpstrnsi optimization breaks glibc

2017-01-19 Thread Alan Modra
glibc compiled with current gcc-7 fails one test due to strcmp and strncmp appearing in the PLT. This is because the inline expansion of those functions falls back to a function call, but not using the asm name for the call. Fixed by retrieving the asm name from the builtin decl. I used the buil

Re: [PATCH] Introduce --with-gcc-major-version-only configure option (take 2)

2017-01-19 Thread Franz Sirl
Am 2017-01-12 um 21:16 schrieb Jakub Jelinek: libmpx/ * configure.ac: Add GCC_BASE_VER. * Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to get version from BASE-VER file. * configure: Regenerated. Hi, it seems libmpx/configure.ac is missing th

Re: [PATCH, Fortran, pr70696, v2] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray

2017-01-19 Thread Andre Vehreschild
Hi all, unfortunately triggered this patch a regression in the opencoarray's testsuite, which also occurs outside of opencoarray, when a caf-function is used in a block in the main-program. This patch fixes the error and adds a testcase. Bootstrapped and regtested ok on x86_64-linux/f25. Ok for t

Re: [PATCH] Be careful about combined chain with length == 0 (PR, tree-optimization/70754).

2017-01-19 Thread Bin.Cheng
On Thu, Jan 19, 2017 at 11:22 AM, Richard Biener wrote: > On Thu, Jan 19, 2017 at 11:25 AM, Bin.Cheng wrote: >> On Thu, Jan 19, 2017 at 9:42 AM, Richard Biener >> wrote: >>> On Wed, Jan 18, 2017 at 4:32 PM, Bin.Cheng wrote: On Wed, Jan 18, 2017 at 2:54 PM, Richard Biener wrote: >

Re: transaction_safe exceptions prevent libstdc++ building for some targets

2017-01-19 Thread Joe Seymour
On 18/01/2017 19:24, DJ Delorie wrote: > Joe Seymour writes: >>> the msp430 -mlarge multilib failing to build with... configure: error: Unknown underlying type for size_t make[1]: *** [configure-target-libstdc++-v3] Error 1 >> >> This is still reproducible. > > FYI the underlying type i

[Ada] Missing invariant procedure body in SPARK mode

2017-01-19 Thread Arnaud Charlet
This patch modifies the generation of the invariant procedure body as follows: * The body of the "partial" invariant procedure is still generated at the end of the visible declarations. * The body of the "full" invariant procedure is generated when the related type is frozen or at the

[PATCH] Fix false positive for -Walloc-size-larger-than (PR, bootstrap/79132).

2017-01-19 Thread Martin Liška
Hello. Following patch fixes asan bootstrap, as mentioned in the PR. Ready to be installed? Thanks, Martin >From 6a3d1b85e124751fdb804ae86596d30ea98b54af Mon Sep 17 00:00:00 2001 From: marxin Date: Thu, 19 Jan 2017 10:25:55 +0100 Subject: [PATCH] Fix false positive for -Walloc-size-larger-than (

[Ada] Better error message on illegal selected component with overloaded prefix.

2017-01-19 Thread Arnaud Charlet
This patch inproves the error report produced on a selected component Nam.Comp which appears in an object declaration, when Nam has seeveral interpretations as a function, and there is non-visible package with the same name. Compiling pqi.adb must yield: pqi.adb:15:07: no legal interpretation

  1   2   >