Re: Clobbers and Scratch Registers

2017-08-21 Thread Alan Modra
On Tue, Aug 22, 2017 at 01:41:21PM +0930, Alan Modra wrote: > + "#n=%1 ap=%8=%12 lda=%13 x=%7=%10 y=%0=%2 alpha=%9 o16=%11\n" > + "#a0=%3 a1=%4 a2=%5 a3=%6" > + : > + "+m" (*(double (*)[n]) y), > + "+r" (n), // 1 Another small revision. That needs to be "+" (n), in

Re: Clobbers and Scratch Registers

2017-08-21 Thread Alan Modra
On Mon, Aug 21, 2017 at 06:33:09PM +0100, Richard Sandiford wrote: > I think it's worth emphasising that tying operands doesn't change > whether an output needs an earlyclobber or not. E.g. for: Thanks for noticing this. It turns out that my OpenBLAS example actually ought to have an

[PATCH] [i386] PR 81850 Don't ignore -mabi=sysv on Cygwin/MinGW

2017-08-21 Thread Daniel Santos
This is a problem that occured because of this code in ix86_option_override_internal: if (!opts_set->x_ix86_abi) opts->x_ix86_abi = DEFAULT_ABI; I tested this along with my other patches. OK for trunk? * config/i386/i386-opts.h (enum calling_abi): Modify so that no legal

[PATCH] [i386, testsuite] [PR 71958] Error on -mx32 with -mabi=ms

2017-08-21 Thread Daniel Santos
We currently error when -mx32 and -mabi=sysv and we encounter a function with attribute ms_abi, but we are not erroring on -mx32 and -mabi=ms (either explicitly or when it is the default on Windows). In fact, it generates code that runs, but is of an undfined ABI. I'm also changing pr64409.c

[PATCH] [docs] Explain how to use multiple file-name patterns in RUNTESTFLAGS

2017-08-21 Thread Daniel Santos
It took me a while to figure out how to do this so I figured that it should be in the docs. OK for trunk? * doc/install.texi: Add more details on selecting multiple tests. Thanks, Daniel Signed-off-by: Daniel Santos --- gcc/doc/install.texi | 10 ++ 1

[PING][PATCH][compare-elim] Merge zero-comparisons with normal ops

2017-08-21 Thread Michael Collison
Ping. Original patch here: https://gcc.gnu.org/ml/gcc-patches/2017-08/msg00766.html

Re: [PING #2] [PATCH] enhance -Wrestrict to handle string built-ins (PR 78918)

2017-08-21 Thread Martin Sebor
On 08/09/2017 10:14 AM, Jeff Law wrote: On 08/06/2017 05:08 PM, Martin Sebor wrote: Well, simply because the way as implemented isn't a must-alias query but maybe one that's good enough for warnings (reduces false positives but surely doesn't eliminate them). I'm very interested in reducing

Re: [PATCH] Fix fallout from VRP strict-overflow changes

2017-08-21 Thread Martin Sebor
On 08/21/2017 01:51 AM, Richard Biener wrote: On Sat, 19 Aug 2017, Andreas Schwab wrote: On Aug 17 2017, Richard Biener wrote: I was notifed I broke proper handling of undefined overflow in multiplicative ops handling. The following resurrects previous behavior (and adds

Re: std::vector default default and move constructors

2017-08-21 Thread François Dumont
Following feedback on std::list patch this one had the same problem of unused code being deleted. So here is a new version. Ok to commit ? François On 28/07/2017 18:45, François Dumont wrote: Hi There was a little issue in this patch, here is the correct version. François On

Re: std::list optimizations

2017-08-21 Thread François Dumont
On 18/08/2017 22:04, Jonathan Wakely wrote: On 28/07/17 18:42 +0200, François Dumont wrote: Hi Completing execution of the testsuite revealed a bug. So here is the correct version of this patch. François On 21/07/2017 19:14, François Dumont wrote: Hi Here is a proposal for 2

Re: [patch,avr] Fir PR91910: ICE for bad attribute "address".

2017-08-21 Thread Denis Chertykov
2017-08-21 16:35 GMT+04:00 Georg-Johann Lay : > "address" attribute only must be specified with VARs, > yet the compiler dived into attribute analysis for > non-VARs, resulting in ICE. > > This patch also adds OPT_Wattributes as warning filter. > > Ok to apply? Approved. Please

Re: [PATCH] Don't override user alignment with the same value

2017-08-21 Thread Eric Botcazou
> According to Eric: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53037#c32 > > "if (mode_align >= TYPE_ALIGN (type))" was intentional. I am > not familiar with STRICT_ALIGNMENT target and there is no > testcase to show why it is needed. Yes, the mode promotion triggers the alignment

[C++ PATCH]: Dead code-ectomy

2017-08-21 Thread Nathan Sidwell
Some more dead code in class lookup. It's not been well formed to allow class fields to be the type-name for a very long time now. I booted with a gcc-unreachable inside the elided loop condition, before ripping the loop out completely. Again, applied to trunk to get wider exposure. nathan

Re: [PATCH] [Aarch64] Optimize subtract in shift counts

2017-08-21 Thread Richard Biener
On August 21, 2017 7:46:09 PM GMT+02:00, Richard Sandiford wrote: >Richard Biener writes: >> On Tue, Aug 8, 2017 at 10:20 PM, Richard Kenner >> wrote: Correct. It is truncated for integer shift, but not

Re: [PATCH] [Aarch64] Optimize subtract in shift counts

2017-08-21 Thread Richard Sandiford
Richard Biener writes: > On Tue, Aug 8, 2017 at 10:20 PM, Richard Kenner > wrote: >>> Correct. It is truncated for integer shift, but not simd shift >>> instructions. We generate a pattern in the split that only generates >>> the integer

Re: Clobbers and Scratch Registers

2017-08-21 Thread Richard Sandiford
Thanks for doing this. Alan Modra writes: > This is a revised version of > https://gcc.gnu.org/ml/gcc-patches/2017-03/msg01562.html limited to > showing just the scratch register aspect, as a followup to > https://gcc.gnu.org/ml/gcc-patches/2017-08/msg01174.html > > *

[C++ PATCH] class member lookup

2017-08-21 Thread Nathan Sidwell
This small patch adds asserts that we never get to look for a field in a non-class. I'm moving this code around on the name-lookup branch, but as Jakub found & fixed a previous suprise of this ilk, I thought I'd put this straight on trunk to get wider exposure of the invariant. I also

Re: [c++/81899] bound tpl-tpl-parm ICE

2017-08-21 Thread Nathan Sidwell
I missed a c++-03 requirement about friends. Fixed thusly. Also fixed the recent debug9 failure for stabs debugging. That test appears to be a dwarf test, but as there's no dg-requires-dwarf the simplest fix was turning off block partitioning optimization (enabled on x86 automatically at O2

Re: [PATCH, gcc-7-branch] Backport PR80038

2017-08-21 Thread Xi Ruoyao
On 2017-08-21 23:37 +0800, Xi Ruoyao wrote: > On 2017-04-25 09:30 -0600, Jeff Law wrote: > > On 04/14/2017 06:44 PM, Xi Ruoyao wrote: > > > On 2017-04-14 15:00 +0800, Xi Ruoyao wrote: > > > > On 2017-04-13 09:05 +0200, Richard Biener wrote: > > > > > > > > > Did you verify LTO bootstrap still

[PATCH, gcc-7-branch] Backport PR80038

2017-08-21 Thread Xi Ruoyao
On 2017-04-25 09:30 -0600, Jeff Law wrote: > On 04/14/2017 06:44 PM, Xi Ruoyao wrote: > > On 2017-04-14 15:00 +0800, Xi Ruoyao wrote: > > > On 2017-04-13 09:05 +0200, Richard Biener wrote: > > > > > > > Did you verify LTO bootstrap still works with the patch? > > > > > > I've just done a LTO

Re: [PATCH] Don't override user alignment with the same value

2017-08-21 Thread H.J. Lu
On Mon, Aug 21, 2017 at 12:59 AM, Richard Biener wrote: > On Sat, Aug 19, 2017 at 10:18 PM, H.J. Lu wrote: >> Don't override alignment specified by user with the same value to >> preserve TYPE_USER_ALIGN. This fixes PR 53037 tests on Sparc. >> >>

[PATCH, i386]: Use btr/bts/btc some more (PR target/46091)

2017-08-21 Thread Uros Bizjak
Hello! Attached patch adds btr/bts/btc patterns with variable count operands, so combine is able to synthesize these instructions from shift+logic operations. 2017-08-21 Uros Bizjak PR target/46091 * config/i386/i386.md (*btsq_imm): Rename from *btsq.

[PATCH] PR libstdc++/81912 make std::__iterator_category constexpr

2017-08-21 Thread Jonathan Wakely
We made the interator range access functions constexpr for C++17, but didn't test it, and so didn't notice that std::__iterator_category isn't constexpr. This fixes it, and improve tests a bit. PR libstdc++/81912 * include/bits/stl_iterator_base_types.h (__iterator_category): Add

[PATCH] Remove -feliminate-dwarf2-dups

2017-08-21 Thread Richard Biener
This was agreed upon and now that early LTO debug landed here it is. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. In case the gcc_unreachable () gets through I'll instead remove the if as noted in my followup TODO. Richard. 2017-08-21 Richard Biener

Re: [PATCH 2/2] C: use full locations within c_parser_expr_list's vec

2017-08-21 Thread Joseph Myers
These two patches are OK. -- Joseph S. Myers jos...@codesourcery.com

Add a partial_subreg_p predicate

2017-08-21 Thread Richard Sandiford
This patch adds a partial_subreg_p predicate to go alongside paradoxical_subreg_p. The first two changes to cse_insn preserve the current behaviour, but the condition seems strange. Shouldn't we be able to continue to cse if the inner modes of the two subregs have the same size? The patch also

[c++/81899] bound tpl-tpl-parm ICE

2017-08-21 Thread Nathan Sidwell
This patch fixes pr 81899. It was an underlying bug exposed by my removal of LANG_TYPE_SPECIFIC from BOUND_TEMPLATE_TEMPLATE_PARM. B_T_T_P happened to not set CLASSTYPE_USE_TEMPLATE, even though, by definition, they are template instantiations. However they also happened to not be

Make more use of paradoxical_subreg_p

2017-08-21 Thread Richard Sandiford
This patch makes more use of the existing paradoxical_subreg_p predicate and also adds a version that operates on outer and inner modes. Some of the affected tests were based on GET_MODE_SIZE rather than GET_MODE_PRECISION and so the patch could change the result for modes that have the same size

[PATCH] Fix PR81900

2017-08-21 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-08-21 Richard Biener PR tree-optimization/81900 * tree-ssa-pre.c (compute_antic_aux): Properly compute changed for blocks with abnormal predecessors.

Re: [PATCH GCC][02/06]New field in struct dependence_info indicating fixed length access

2017-08-21 Thread Richard Biener
On Mon, Aug 14, 2017 at 11:19 AM, Bin Cheng wrote: > Hi, > This simple patch adds new field in struct dependence_info. The new field > indicates if non-dependence information is only valid for fixed memory access > length of this reference. There is a concern that this costs

Re: [AArch64], patch] PR71727 fix -mstrict-align

2017-08-21 Thread Christophe Lyon
ping ? https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01063.html Christophe On 18 July 2017 at 14:50, Christophe Lyon wrote: > Hello, > > I've received a complaint that GCC for AArch64 would generate > vectorized code relying on unaligned memory accesses even when

Re: [PATCH GCC][01/06]New interface returning all adjacent vertices in graph

2017-08-21 Thread Richard Biener
On Mon, Aug 14, 2017 at 11:19 AM, Bin Cheng wrote: > Hi, > This simple patch adds new interface returning adjacent vertices for a vertex > in graph. > Bootstrap and test in series. Is it OK? The comment of the function doesn't match its implementation. Why did you choose to

Re: [PATCH] PR c++/80287 add new testcase

2017-08-21 Thread Nathan Sidwell
On 08/18/2017 04:28 AM, Yvan Roux wrote: https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00730.html Thanks, Yvan gcc/testsuite 2017-07-13 Yvan Roux PR c++/80287 * g++.dg/pr80287.C: New test. ok -- Nathan Sidwell

Re: Simplify pad_below implementation

2017-08-21 Thread Richard Biener
On Mon, Aug 21, 2017 at 1:14 PM, Richard Sandiford wrote: > This patch simplifies the alignment calculations in pad_below. > The first arm of the "if" was: > > - taking GET_MODE_BITSIZE (always equal to GET_MODE_SIZE * BITS_PER_UNIT), > - rounding up to the next

Re: Remove the frame size argument from function_prologue/epilogue

2017-08-21 Thread Richard Biener
On Mon, Aug 21, 2017 at 1:12 PM, Richard Sandiford wrote: > Later patches will add support for frame sizes that are a run-time > invariant but not a compile-time constant. This then raised the > question of whether the frame size argument to the function_prologue/ >

Re: Add a full_integral_type_p helper function

2017-08-21 Thread Richard Biener
On Mon, Aug 21, 2017 at 11:58 AM, Richard Sandiford wrote: > Richard Biener writes: >> On Fri, Aug 18, 2017 at 1:04 PM, Richard Sandiford >> wrote: >>> Richard Biener writes:

[PING][PATCH][PR sanitizer/77631] Support separate debug info in libbacktrace

2017-08-21 Thread Denis Khalikov
Hello, this is a ping for that patch: https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01958.html Thanks.

Re: RFC: [PATCH] Add warn_if_not_aligned attribute

2017-08-21 Thread H.J. Lu
On Mon, Aug 21, 2017 at 3:59 AM, Szabolcs Nagy wrote: > On 17/08/17 15:56, H.J. Lu wrote: >> On Thu, Aug 17, 2017 at 6:52 AM, Joseph Myers >> wrote: >>> On Sat, 8 Jul 2017, H.J. Lu wrote: >>> +@item -Wpacked-not-aligned @r{(C, C++,

Re: [patch, fortran] Bug 81296 - derived type I/o problem

2017-08-21 Thread Paul Richard Thomas
Hi Jerry, That looks good to me - OK for trunk and for backporting. Thanks for the patch. Paul PS Did you have time to think about that rather more difficult bug, involving a mix of DT descriptors and intrinsic descriptors for the declared type? On 21 August 2017 at 03:23, Jerry DeLisle

[patch,avr] Fir PR91910: ICE for bad attribute "address".

2017-08-21 Thread Georg-Johann Lay
"address" attribute only must be specified with VARs, yet the compiler dived into attribute analysis for non-VARs, resulting in ICE. This patch also adds OPT_Wattributes as warning filter. Ok to apply? Johann gcc/ PR target/81910 * config/avr/avr.c (avr_handle_addr_attribute):

[PATCH 2/2] Update expected alignment in pr53037-1.C/pr53037-1.c

2017-08-21 Thread H.J. Lu
Since alignment of int is 2 bytes for m68k, expect either 2 or 4 alignments in warning. OK for trunk? H.J. --- * g++.dg/pr53037-1.C: Expect either 2 or 4 alignments in warning. * gcc.dg/pr53037-1.c: Likewise. --- gcc/testsuite/g++.dg/pr53037-1.C | 6 +++---

[PATCH 1/2] Don't warn function alignment if warn_if_not_aligned_p is true

2017-08-21 Thread H.J. Lu
When warn_if_not_aligned_p is true, a warning will be issued on function declaration later. There is no need to warn function alignment when warn_if_not_aligned_p is true. OK for trunk? H.J. -- * c-attribs.c (common_handle_aligned_attribute): Don't warn function alignment if

Simplify pad_below implementation

2017-08-21 Thread Richard Sandiford
This patch simplifies the alignment calculations in pad_below. The first arm of the "if" was: - taking GET_MODE_BITSIZE (always equal to GET_MODE_SIZE * BITS_PER_UNIT), - rounding up to the next multiple of PARM_BOUNDARY - converting bits to bytes and - subtracting the GET_MODE_SIZE so was in

Remove the frame size argument from function_prologue/epilogue

2017-08-21 Thread Richard Sandiford
Later patches will add support for frame sizes that are a run-time invariant but not a compile-time constant. This then raised the question of whether the frame size argument to the function_prologue/ epilogue hooks should be updated accordingly. It turned out that only two targets actually used

Re: Move vector_type_mode to tree.c

2017-08-21 Thread Richard Biener
On Mon, Aug 21, 2017 at 11:54 AM, Richard Sandiford wrote: > ...so that it's possible to use TYPE_MODE in tree.h. > > Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Ok. Richard. > Richard > > > 2017-08-21 Richard Sandiford

Re: RFC: [PATCH] Add warn_if_not_aligned attribute

2017-08-21 Thread Szabolcs Nagy
On 17/08/17 15:56, H.J. Lu wrote: > On Thu, Aug 17, 2017 at 6:52 AM, Joseph Myers wrote: >> On Sat, 8 Jul 2017, H.J. Lu wrote: >> >>> +@item -Wpacked-not-aligned @r{(C, C++, Objective-C and Objective-C++ only)} >>> +@opindex Wpacked-not-aligned >>> +@opindex

Re: Heads-Up: early LTO debug to land, breaking Mach-O / [X]COFF

2017-08-21 Thread Richard Biener
On Fri, 12 May 2017, Richard Biener wrote: > > This is a heads-up that I am in the process of implementing the last > of Jasons review comments on the dwarf2out parts of early LTO debug > support. I hope to post final patches early next week after thoroughly > re-testing everything. > > Note

Re: Add a full_integral_type_p helper function

2017-08-21 Thread Richard Sandiford
Richard Biener writes: > On Fri, Aug 18, 2017 at 1:04 PM, Richard Sandiford > wrote: >> Richard Biener writes: >>> On Fri, Aug 18, 2017 at 10:10 AM, Richard Sandiford >>> wrote:

Move vector_type_mode to tree.c

2017-08-21 Thread Richard Sandiford
...so that it's possible to use TYPE_MODE in tree.h. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard 2017-08-21 Richard Sandiford gcc/ * stor-layout.h (vector_type_mode): Move to... * tree.h (vector_type_mode):

[committed] Pass rtx and index to read-md.c iterator routines

2017-08-21 Thread Richard Sandiford
The read-md.c iterator callbacks previously used a void * to record the position at which the iterator value should be installed. This doesn't scale easily to the SUBREG_BYTE representation used by a later patch, so this patch replaces the void * with both an rtx and an operand number. The

[committed] Fix bogus CONST_WIDE_INT hash

2017-08-21 Thread Richard Sandiford
The CONST_WIDE_INT case in const_rtx_hash_1 started the hash with the precision of the mode, but the mode is always VOIDmode. Tested on aarch64-linux-gnu and x86_64-linux-gnu. Applied as obvious. Richard 2017-08-21 Richard Sandiford Alan Hayward

Re: [PATCH] Don't override user alignment with the same value

2017-08-21 Thread Richard Biener
On Sat, Aug 19, 2017 at 10:18 PM, H.J. Lu wrote: > Don't override alignment specified by user with the same value to > preserve TYPE_USER_ALIGN. This fixes PR 53037 tests on Sparc. > > Does it look right? Doesn't match do_type_align so it introduces inconsistencies. The

Re: [PATCH] Fix fallout from VRP strict-overflow changes

2017-08-21 Thread Richard Biener
On Sat, 19 Aug 2017, Andreas Schwab wrote: > On Aug 17 2017, Richard Biener wrote: > > > I was notifed I broke proper handling of undefined overflow in > > multiplicative ops handling. The following resurrects previous > > behavior (and adds a testcase). > > > > Bootstrapped

Re: [PATCH] Fix PR81488

2017-08-21 Thread Richard Biener
On Fri, Aug 18, 2017 at 8:36 PM, Bill Schmidt wrote: > Hi, > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81488 reports a problem with > SLSR where > too many memory resources are required to complete SLSR processing of > conditional > candidates. The code in

[PATCH] Fix PR81884

2017-08-21 Thread Richard Biener
This PR shows an issue in the must-alias oracle (stmt_kills_ref_p) which when determining must-alias by finding a common base in two reference trees doesn't handle trailing arrays correctly. The fix is to do array-at-struct-end detection on-the-fly by recording the innermost ARRAY_REF we drop

[PATCH] Simplify/speedup LIM

2017-08-21 Thread Richard Biener
This avoids redundant ref finding. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-08-21 Richard Biener * tree-ssa-loop-im.c (struct lim_aux_data): Add ref index member. (mem_ref_in_stmt): Remove.