Re: [WIP C++ PATCH] P0217R3 - C++17 structured bindings

2016-11-13 Thread Jakub Jelinek
On Mon, Nov 14, 2016 at 08:11:25AM +0100, Jakub Jelinek wrote: > On Sun, Nov 13, 2016 at 11:53:10PM -0500, Jason Merrill wrote: > > On Wed, Nov 9, 2016 at 8:05 AM, Jakub Jelinek wrote: > > > On Wed, Nov 09, 2016 at 01:24:22PM +0100, Jakub Jelinek wrote: > > >> The following

Re: [WIP C++ PATCH] P0217R3 - C++17 structured bindings

2016-11-13 Thread Jakub Jelinek
On Sun, Nov 13, 2016 at 11:53:10PM -0500, Jason Merrill wrote: > On Wed, Nov 9, 2016 at 8:05 AM, Jakub Jelinek wrote: > > On Wed, Nov 09, 2016 at 01:24:22PM +0100, Jakub Jelinek wrote: > >> The following patch is a WIP on P0217R3 - decomposition declarations. > >> It contains

Re: [patch,libgfortran] PR51119 - MATMUL slow for large matrices

2016-11-13 Thread Thomas Koenig
Hi Jerry, I think this + /* Parameter adjustments */ + c_dim1 = m; + c_offset = 1 + c_dim1; should be + /* Parameter adjustments */ + c_dim1 = rystride; + c_offset = 1 + c_dim1; Regarding options for matmul: It is possible to add the options to the lines in

Re: [WIP C++ PATCH] P0217R3 - C++17 structured bindings

2016-11-13 Thread Jason Merrill
On Wed, Nov 9, 2016 at 7:24 AM, Jakub Jelinek wrote: > The match.pd hunk is needed, otherwise the generic folding happily folds > int arr[2]; > ... > auto [ x, y ] = arr; > == [0] > into 0, because it thinks x and arr are distinct VAR_DECLs. Though, if > such comparisons are

Re: Fix PR77881: combine improvement

2016-11-13 Thread Michael Matz
Hi, On Sat, 12 Nov 2016, Segher Boessenkool wrote: > Hi Michael, > > On Thu, Oct 20, 2016 at 04:20:09PM +0200, Michael Matz wrote: > > PR missed-optimization/77881 > > * combine.c (simplify_comparison): Remove useless subregs > > also inside the loop, not just after it. > > > >

C++ PATCH to improve various small diagnostic issues

2016-11-13 Thread Jason Merrill
A few things I noticed while working on C++17 decomposition. * We were omitting any explicit template arguments in the "no match" error. * We were complaining about a missing nested type rather than an incomplete enclosing type. * We weren't printing the new type when an alias-declaration is

Re: [WIP C++ PATCH] P0217R3 - C++17 structured bindings

2016-11-13 Thread Jason Merrill
On Wed, Nov 9, 2016 at 8:05 AM, Jakub Jelinek wrote: > On Wed, Nov 09, 2016 at 01:24:22PM +0100, Jakub Jelinek wrote: >> The following patch is a WIP on P0217R3 - decomposition declarations. >> It contains various FIXMEs, Jason, do you think you could finish it up? Here's what

Unroll and Jam loop transformation

2016-11-13 Thread Michael Matz
Hi, I'm working on this since some time; I have various extensions to it in the works (hinted at in the comments), but haven't yet stabilized them. But this is useful on its own as is, so lets get it out before midnight at UTC-12 (hey, that's still 7 hours to go) ;) Basically unroll-and-jam

[PATCH 4/4] MIPS16/GCC: Emit explicit JRC from`casesi_internal_mips16_' insn

2016-11-13 Thread Maciej W. Rozycki
Explicitly switch between the JR and JRC instructions for the table jump in `casesi_internal_mips16_', depending on their availability in the ISA level chosen, taking away the reliance on assembler relaxation. Adjust the instruction count accordingly now that we control the length of this code

[PATCH 3/4] MIPS16/GCC: Improve `casesi_internal_mips16_'s instruction count estimate

2016-11-13 Thread Maciej W. Rozycki
A typical code sequence produced by the `casesi_internal_mips16_' insn is like this: sltu$3, 11 # 16 casesi_internal_mips16_si [length = 32] bteqz $L2 sll $5, $3, 1 la $3, $L4 addu$5, $3, $5 lh $5, 0($5)

[PATCH] Delete addressof for temporaries (LWG 2598)

2016-11-13 Thread Jonathan Wakely
* include/bits/move.h (addressof(const _Tp&&)): Add deleted overload, as per LWG 2598. Tested powerpc64le-linux, committed to trunk. commit 5eb75d53b4575e736bf295dbdad313a66839bd9b Author: Jonathan Wakely Date: Mon Nov 14 03:28:38 2016 + Delete

[PATCH 2/4] MIPS16/GCC: Correct `casesi_internal_mips16_'s RTL pattern

2016-11-13 Thread Maciej W. Rozycki
The machine operation performed in `casesi_internal_mips16_'s assembly is SLTU, which just like the `ltu' RTL operation expresses the less-than operation rather than less-than-or-equal usually performed by `casesi' patterns. This is because there is no suitable single MIPS16 hardware

[PATCH] Make std::future::share() noexcept (LWG 2556)

2016-11-13 Thread Jonathan Wakely
* include/std/future (future::share(), future::share()) (future::share()): Add noexcept, as per LWG 2556. Tested powerpc64le-linux, committed to trunk. commit a1f6a58629e8ebb02366266790bf5ab748846f4f Author: Jonathan Wakely Date: Mon Nov 14 03:17:50

[PATCH 1/4] MIPS16/GCC: Fix DImode `casesi_internal_mips16_' assembly instructions

2016-11-13 Thread Maciej W. Rozycki
Use 64-bit operations consistently for jump table address calculations across the assembly produced by the `casesi_internal_mips16_' insn where Pmode and consequently is DImode. Currently we have a mixture of 64-bit and 32-bit operations, which causes address truncation or undefined

[PATCH 0/4] MIPS16/GCC: `casesi_internal_mips16_' insn fixes and improvements

2016-11-13 Thread Maciej W. Rozycki
Hi, This small patch series addresses a small number of issues around the `casesi_internal_mips16_' insn discovered in the course of recent development. I have also made an attempt to factor the preparatory comparison and branch out as proper RTL operations from this insn, which is a

[PATCH] warn on overflow in calls to allocation functions (bugs 77531 and 78284)

2016-11-13 Thread Martin Sebor
Bug 77531 requests a new warning for calls to allocation functions (those declared with attribute alloc_size(X, Y)) that overflow the computation X * Z of the size of the allocated object. Bug 78284 suggests that detecting and diagnosing other common errors in calls to allocation functions, such

Re: [v3 PATCH] Implement P0513R0, Poisoning the Hash.

2016-11-13 Thread Jonathan Wakely
On 14/11/16 00:55 +0200, Ville Voutilainen wrote: Implement P0513R0, Poisoning the Hash. * include/bits/functional_hash.h (__poison_hash): New. * include/bits/unique_ptr.h (hash>): Derive from __poison_hash. * include/std/optional (hash>):

Re: [patch,libgfortran] PR51119 - MATMUL slow for large matrices

2016-11-13 Thread Jerry DeLisle
On 11/13/2016 04:55 PM, Steve Kargl wrote: On Sun, Nov 13, 2016 at 04:08:50PM -0800, Jerry DeLisle wrote: Hi all, Attached patch implements a fast blocked matrix multiply. The basic algorithm is derived from netlib.org tuned blas dgemm. See matmul.m4 for reference. The matmul() function is

Re: [patch,libgfortran] PR51119 - MATMUL slow for large matrices

2016-11-13 Thread Steve Kargl
On Sun, Nov 13, 2016 at 04:08:50PM -0800, Jerry DeLisle wrote: > Hi all, > > Attached patch implements a fast blocked matrix multiply. The basic algorithm > is > derived from netlib.org tuned blas dgemm. See matmul.m4 for reference. > > The matmul() function is compiled with -Ofast

[PATCH] PR78326 fix incorrect access of data member in base class

2016-11-13 Thread Jonathan Wakely
PR libstdc++/78326 * include/experimental/memory_resource (memory_resource::_S_max_align): Change access to protected. Tested powerpc64le-linux, committed to trunk. Will backport to gcc-6-branch too. commit 8d23f8efca6d181b26f8766a96b081c0e280e434 Author: Jonathan

[PATCH 4/4] Back-end and IPA bits of hsa branch merge

2016-11-13 Thread Martin Jambor
Hi, so this patch bundles together all the various fixes, cleanups and improvements to the HSAIL generation itself which are far too many to list here individually, more details can be found in the email messages that i sent when committing a given change to the branch. As the HSA maintainer I

[PATCH 3/4] OpenMP lowering changes from the hsa branch

2016-11-13 Thread Martin Jambor
Hello, this email contains the OpenMP bits of the HSA branch merge. I have covered the new functionality in my talk at cauldron and in the email messages announcing commits to the branch, but in short, the patch below allows gridification standalone distribute constructs if their step is as big

[PATCH 2/4] HSA specific built-ins

2016-11-13 Thread Martin Jambor
Hello, this patch adds a small file hsa-builtins.def which defines a few builtins that I then use in OpenMP lowering and expansion. After we split gridification stuff in omp-low.c to a separate file, we should be able to only conditionally include the file and remove the weird conditional ifdef.

[PATCH 1/4] Remove build dependence on HSA run-time

2016-11-13 Thread Martin Jambor
Hi, over the last year there have been only two changes to the HSA libgomp plugin, both are in the following patch. The first change allows running kernels in HSA grid with multiple dimensions. The second one changes the way the plugin calls hsa run-time to dynamic shared object loading, which

[PATCH 0/4] Merge from HSA branch to trunk

2016-11-13 Thread Martin Jambor
Hello, this series is a merge from what is ready for trunk in the HSA branch. The first patch is self-contained and I intend to commit it separately, the other three need to be committed together but I split the change into these pieces, because I believe they will be easier to review that way

Re: [PATCH] Prepare shared_ptr for array support

2016-11-13 Thread Jonathan Wakely
On 20/10/16 15:41 +0100, Jonathan Wakely wrote: On 20/10/16 13:08 +0100, Jonathan Wakely wrote: This patch doesn't change very much, except for adding std::reinterpret_pointer_cast, but it makes it very easy to add array support to shared_ptr, as defined for the Library Fundamentals TS by

Re: [v3 PATCH] Implement P0513R0, Poisoning the Hash.

2016-11-13 Thread Ville Voutilainen
On 14 November 2016 at 00:49, Ville Voutilainen wrote: > On 14 November 2016 at 00:48, Ville Voutilainen > wrote: >> Tested on Linux-x64. > > > Ah, negative tests incomplete, sending a follow-up soon... Here: 2016-11-13 Ville

Re: [v3 PATCH] Implement P0513R0, Poisoning the Hash.

2016-11-13 Thread Ville Voutilainen
On 14 November 2016 at 00:48, Ville Voutilainen wrote: > Tested on Linux-x64. Ah, negative tests incomplete, sending a follow-up soon...

[v3 PATCH] Implement P0513R0, Poisoning the Hash.

2016-11-13 Thread Ville Voutilainen
Tested on Linux-x64. 2016-11-13 Ville Voutilainen Implement P0513R0, Poisoning the Hash. * include/bits/functional_hash.h (__poison_hash): New. * include/bits/unique_ptr.h (hash>): Derive from __poison_hash. *

Re: [v3 PATCH] Implement P0504R0 (Revisiting in-place tag types for any/optional/variant).

2016-11-13 Thread Jonathan Wakely
On 13/11/16 21:10 +, Jonathan Wakely wrote: On 13/11/16 21:02 +, Jonathan Wakely wrote: On 12/11/16 21:24 +0200, Ville Voutilainen wrote: + inline in_place_t in_place{}; + + template struct in_place_type_t + { +explicit in_place_type_t() = default; + }; + + template +

[patch] Disable LTO note about strict aliasing

2016-11-13 Thread Eric Botcazou
It's the note issued by the -Wlto-type-mismatch warning: q.ads:7:13: warning: type of 'q__proc' does not match original declaration [- Wlto-type-mismatch] procedure Proc (A : Arr); ^ q.adb:7:3: note: 'q__proc' was previously declared here procedure Proc (A : Arr) is begin null;

[MIPS] Enable descriptors for nested functions in Ada

2016-11-13 Thread Eric Botcazou
Similarly to x86, PowerPC and SPARC, this enables the use of custom run-time descriptors in Ada, thus eliminating the need for trampolines and executable stack in presence of pointers to nested functions. Unfortunately I don't have access to MIPS hardware any more, but the scheme was tested on

[ARM] Enable descriptors for nested functions in Ada

2016-11-13 Thread Eric Botcazou
Similarly to x86, PowerPC and SPARC, this enables the use of custom run-time descriptors in Ada, thus eliminating the need for trampolines and executable stack in presence of pointers to nested functions. This still uses bit 1 for the run-time identification scheme because bumping the function

[Aarch64] Enable descriptors for nested functions in Ada

2016-11-13 Thread Eric Botcazou
Similarly to x86, PowerPC and SPARC, this enables the use of custom run-time descriptors in Ada, thus eliminating the need for trampolines and executable stack in presence of pointers to nested functions. Tested on Aarch64/Linux, OK for the mainline? 2016-11-13 Eric Botcazou

[PATCH] PR fortran/78300 -- class procedure as actual arg

2016-11-13 Thread Steve Kargl
The attach patch allows a procedure with a class result to be an actual argument to subprogram where the dummy argument expected to be a class. OK to commit? 2016-11-14 Steven G. Kargl PR fortran/78300 * resolve.c (resolve_fl_var_and_proc): Allow class

Re: [v3 PATCH] Implement P0504R0 (Revisiting in-place tag types for any/optional/variant).

2016-11-13 Thread Jonathan Wakely
On 13/11/16 21:02 +, Jonathan Wakely wrote: On 12/11/16 21:24 +0200, Ville Voutilainen wrote: + inline in_place_t in_place{}; + + template struct in_place_type_t + { +explicit in_place_type_t() = default; + }; + + template +in_place_type_t<_Tp> in_place_type{}; + + template

Re: [v3 PATCH] Use constexpr addressof in optional, SFINAE housekeeping for any, optional and tuple.

2016-11-13 Thread Jonathan Wakely
On 26/10/16 20:10 +0300, Ville Voutilainen wrote: Use constexpr addressof in optional, SFINAE housekeeping for any, optional and tuple. * include/std/any (__do_emplace(_Args&&...)): New. (__do_emplace(initializer_list<_Up>, _Args&&...)): Likewise. (__any_constructible): Likewise.

Re: [v3 PATCH] Implement P0504R0 (Revisiting in-place tag types for any/optional/variant).

2016-11-13 Thread Jonathan Wakely
On 12/11/16 21:24 +0200, Ville Voutilainen wrote: + inline in_place_t in_place{}; + + template struct in_place_type_t + { +explicit in_place_type_t() = default; + }; + + template +in_place_type_t<_Tp> in_place_type{}; + + template struct in_place_index_t + { +explicit

Re: [v3 PATCH] Implement P0403R1, Literal suffixes for basic_string_view.

2016-11-13 Thread Jonathan Wakely
On 13/11/16 22:41 +0200, Ville Voutilainen wrote: Implement P0403R1, Literal suffixes for basic_string_view. * include/std/string_view (operator""sv(const char*, size_t)): New. (operator""sv(const wchar_t*, size_t)): Likewise. (operator""sv(const char16_t*, size_t)): Likewise.

[v3 PATCH] Implement P0403R1, Literal suffixes for basic_string_view.

2016-11-13 Thread Ville Voutilainen
Tested on Linux-x64. 2016-11-13 Ville Voutilainen Implement P0403R1, Literal suffixes for basic_string_view. * include/std/string_view (operator""sv(const char*, size_t)): New. (operator""sv(const wchar_t*, size_t)): Likewise.

Re: [ping * 4] PR35503 - warn for restrict

2016-11-13 Thread Prathamesh Kulkarni
On 2 November 2016 at 23:17, Prathamesh Kulkarni wrote: > On 2 November 2016 at 23:07, Jason Merrill wrote: >> On Wed, Nov 2, 2016 at 1:08 PM, Prathamesh Kulkarni >> wrote: >>> On 2 November 2016 at 18:29, Jason

[Ada] Fix problematic assertion

2016-11-13 Thread Eric Botcazou
Tested on x86_64-suse-linux, applied on all active branches. 2016-11-13 Bob Duff * gcc-interface/decl.c (gnat_to_gnu_entity): In assertion about known Esize, protect with !is_type and change !Unknown_Esize to Known_Esize. -- Eric BotcazouIndex:

PATCH, testsuite]: Add test for PR 78248 (aka 78232)

2016-11-13 Thread Uros Bizjak
Attached patch adds the testcase from (fixed) PR 78248. 2016-11-13 Uros Bizjak PR rtl-optimization/78232 PR rtl-optimization/78248 * gcc.dg/ubsan/pr78248.c: New test. Tested on x86_64-linux-gnu {,-m32} and committed to mainline SVN. Uros. Index:

[Ada] Fix bogus warning on address conversion

2016-11-13 Thread Eric Botcazou
This occurs because System.Address is a private type so you need to invoke Underlying_Type before testing whether it is unsigned. Fixed thusly, tested on x86_64-suse-linux, applied on the mainline. 2016-11-13 Eric Botcazou * gcc-interface/decl.c

Fwd: [fixincludes] Fix macOS 10.12 and (PR sanitizer/78267)

2016-11-13 Thread Jack Howarth
stem /sw/lib/gcc7/x86_64-apple-darwin15.6.0/sys-include -D_GNU_SOURCE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DHAVE_RPC_XDR_H=0 -DHAVE_TIRPC_RPC_XDR_H=0 -I. -I../../../../gcc-7-20161113/libsanitizer/sanitizer_common -I.. -I ../../../../gcc-7-20161113/libsanit

[Ada] Correctly annotate negative values for the front-end

2016-11-13 Thread Eric Botcazou
gigi cannot back-annotate negative values in expressions for the front-end directly because only non-negative values are supported directly. Fixed thusly, tested on x86_64-suse-linux, applied on the mainline. 2016-11-13 Eric Botcazou * gcc-interface/decl.c

[Ada] Fix ICE on double renaming with chain of access types

2016-11-13 Thread Eric Botcazou
This is a regression present on the mainline and 6 branch: the compiler ICEs in the gimplifier on a double renaming with a chain of access types because there is a orphaned PLACEHOLDER_EXPR. Tested on x86_64-suse-linux, applied on the mainline and 6 branch. 2016-11-13 Eric Botcazou

Re: [PATCH] Fix -Wshadow warning in libiberty/cp-demangle.c

2016-11-13 Thread Mark Wielaard
On Sun, Nov 06, 2016 at 07:03:34PM +0100, Mark Wielaard wrote: > On Sat, 2016-09-10 at 09:51 -0400, Eric Gallager wrote: > > On 9/10/16, Ian Lance Taylor wrote: > > > I'm not sure about the patch to configure.ac/configure. The last I > > > looked -Wshadow would warn if a local

Re: [www-patch] Document new -Wshadow= variants in gcc-7/changes.html

2016-11-13 Thread Mark Wielaard
On Sat, Nov 05, 2016 at 10:50:57PM +0100, Mark Wielaard wrote: > The attached patch adds an explanation of the new > -Wshadow=(global|local|compatible-local) to gcc-7/changes.html. > > OK to commit? Ping? > Index: htdocs/gcc-7/changes.html >

Fix segfault on double typedef for enum with -fdump-ada-spec

2016-11-13 Thread Eric Botcazou
This happens with the C++ compiler only. Tested on x86_64-suse-linux, applied on the mainline. 2016-11-13 Eric Botcazou c-family/ * c-ada-spec.c (print_ada_declaration): For typedef declarations, look for nested types only if the type is a record or

Fix ICE in initialize_inlined_parameters with LTO

2016-11-13 Thread Eric Botcazou
This is a regression present on the mainline and 6 branch: for the attached Ada testcase compiled in LTO mode, the following assertion triggers in initialize_inlined_parameters during inlining: if (p) { /* No static chain? Seems like a bug in tree-nested.c. */ gcc_assert

Re: [PATCH], Add PowerPC ISA 3.0 support for xxinsertw, vinserth, and vinsertb instructions

2016-11-13 Thread Segher Boessenkool
Hi Mike, On Sun, Nov 13, 2016 at 01:03:29AM -0500, Michael Meissner wrote: > * gcc.target/powerpc/vec-set-short.c: Likesie. Typo here. > --- gcc/config/rs6000/rs6000.c > (svn+ssh://meiss...@gcc.gnu.org/svn/gcc/trunk/gcc/config/rs6000) > (revision 242318) > +++

Re: [RFC] Handle unary pass-through jump functions for ipa-vrp

2016-11-13 Thread Jan Hubicka
> Hi Honza, > > I reverted this patch after it was reported that it resulted in > bootstrap compare failure in some targets. > > I reproduced it and tracked to a mistake in the patch that introduced it. > > That is, in propagate_vr_accross_jump_function, I had: > > if

[Patch, Fortran, committed] PR 60952: [F03] Problem using "end" as a type bound procedure and contained procedures

2016-11-13 Thread Janus Weil
Hi all, I have just committed an obvious fix for a rejects-valid problem, where a procedure named 'end' was not properly flagged as a procedure: https://gcc.gnu.org/viewcvs?rev=242352=gcc=rev Cheers, Janus Index: gcc/fortran/decl.c

Re: [fixincludes] Fix macOS 10.12 and (PR sanitizer/78267)

2016-11-13 Thread Rainer Orth
Hi Jack, > On darwin15, the proposed patch is insufficient to restore the bootstrap > (after running genfixes in the fixincludes directory) unless I also apply > the previously proposed change... no wonder: it's only been tested on darwin16. Care to explain what error you're seeing?

Re: [Patch, Fortran, OOP] PR 66366: ICE on invalid with non-allocatable CLASS variable

2016-11-13 Thread Janus Weil
2016-11-13 0:57 GMT+01:00 Steve Kargl : > On Sat, Nov 12, 2016 at 09:13:26PM +0100, Janus Weil wrote: >> >> this patch fixes an ICE on invalid code involving class component >> declarations. The ICE is avoided by moving forward the error check >> from resolution

Re: [RFC] Handle unary pass-through jump functions for ipa-vrp

2016-11-13 Thread kugan
Hi Honza, I reverted this patch after it was reported that it resulted in bootstrap compare failure in some targets. I reproduced it and tracked to a mistake in the patch that introduced it. That is, in propagate_vr_accross_jump_function, I had: if