Re: [PATCH] Replace Yoda conditions in gcc/

2017-12-20 Thread Eric Botcazou
> If some port maintainer used 1 <= x && x <= 24 style and doesn't like > x >= 1 && x <= 24 for some reason, there is always IN_RANGE macro and > IN_RANGE (x, 1, 24) can be used instead (though, such a change requires > double checking the type of x, it shouldn't be wider than HOST_WIDE_INT). Yes,

Re: [SFN] Bootstrap broken

2017-12-20 Thread Jakub Jelinek
On Wed, Dec 20, 2017 at 04:57:43AM -0200, Alexandre Oliva wrote: > for gcc/ChangeLog > > PR bootstrap/83396 > * cfgexpand.c (label_rtx_for_bb): Revert SFN changes that > allowed debug stmts before labels. > (expand_gimple_basic_block): Likewise. > * gimple-iterator.c

Re: [PATCH] Replace Yoda conditions in gcc/

2017-12-20 Thread Jakub Jelinek
On Wed, Dec 20, 2017 at 09:29:22AM +0100, Eric Botcazou wrote: > > If some port maintainer used 1 <= x && x <= 24 style and doesn't like > > x >= 1 && x <= 24 for some reason, there is always IN_RANGE macro and > > IN_RANGE (x, 1, 24) can be used instead (though, such a change requires > > double c

Re: [PATCH][arm] PR target/82975: Guard against reg_renumber being NULL in arm.h

2017-12-20 Thread Kyrill Tkachov
On 19/12/17 21:56, Jakub Jelinek wrote: On Tue, Dec 19, 2017 at 04:58:37PM +, Kyrill Tkachov wrote: 2017-12-19 Kyrylo Tkachov PR target/82975 * gcc.dg/pr82975.c: New test. The testcase FAILs on x86_64-linux/i686-linux and probably on all non-arm/aarch64 targets. Fixed thusly

Re: [PATCH, PR83492] Fix selection of aarch64 big-endian shift parameters based on __AARCH64EB__

2017-12-20 Thread Kyrill Tkachov
On 20/12/17 00:23, Jeff Law wrote: On 12/19/2017 11:23 AM, Jakub Jelinek wrote: On Tue, Dec 19, 2017 at 07:01:44PM +0100, Michael Weiser wrote: Hi Kyrill, On Tue, Dec 19, 2017 at 05:35:03PM +, Kyrill Tkachov wrote: below patch fixes PR 83492. I agree with your analysis of the bug and y

Re: [PATCH][arm] PR target/82975: Guard against reg_renumber being NULL in arm.h

2017-12-20 Thread Kyrill Tkachov
On 20/12/17 09:22, Kyrill Tkachov wrote: On 19/12/17 21:56, Jakub Jelinek wrote: > On Tue, Dec 19, 2017 at 04:58:37PM +, Kyrill Tkachov wrote: >> 2017-12-19 Kyrylo Tkachov >> >> PR target/82975 >> * gcc.dg/pr82975.c: New test. > The testcase FAILs on x86_64-linux/i686-linux and

Re: [PATCH] Replace Yoda conditions in gcc/

2017-12-20 Thread Eric Botcazou
> That depends on the reader, and as we have multiple readers, it is better to > be consistent. And, I find no ambiguity on IN_RANGE, it is > inclusive for both values and used heavily through the compiler, so using it > is a welcome cleanup, e.g. some ports that use it most often: OK, let's go f

[PATCH][aarch64][libstdc++] Use __ARM_BIG_ENDIAN instead of __AARCH64EB__ in opt_random.h

2017-12-20 Thread Kyrill Tkachov
Hi all, As has been spotted at https://gcc.gnu.org/ml/gcc-patches/2017-12/msg01289.html we check the __AARCH64EB__ macro for aarch64 big-endian detection in config/cpu/aarch64/opt/ext/opt_random.h. That works just fine with GCC but the standardised ACLE[1] macro for that purpose is __ARM_BIG_EN

Re: [PR83370][AARCH64]Use tighter register constraints for sibcall patterns.

2017-12-20 Thread Renlin Li
Ping ~ On 11/12/17 15:27, Renlin Li wrote: Hi all, In aarch64 backend, ip0/ip1 register will be used in the prologue/epilogue as temporary register. When the compiler is performing sibcall optimization. It has the chance to use ip0/ip1 register for indirect function call to hold the address. H

[PATCH][arm][doc] Document accepted -march=armv8.3-a extension options

2017-12-20 Thread Kyrill Tkachov
Hi all, I noticed that we helpfully list the extensions that are accepted by the -march options on arm but we were missing the information for 'armv8.3-a'. This patchlet corrects that. Built the documentation and it looked ok. Committing to trunk. Thanks, Kyrill 2017-12-20 Kyrylo Tkachov

[arm] PR target/83105: Minor change of default CPU for arm-linux-gnueabi

2017-12-20 Thread Richard Earnshaw (lists)
When GCC for ARM/linux is configured with --with-float=hard, or --with-float=softfp the compiler will now die when trying to build the support libraries because the baseline architecture is too old to support VFP (older versions of GCC just emitted the VFP instructions anyway, even though they woul

Re: [PATCH] Fix PR83452

2017-12-20 Thread Rainer Orth
Hi Richard, > The following enables a hpux specific workaround for the WEAK UNDEF > symbols used by LTO debuginfo extraction. It makes sure to use > a special name (gnu_lto_v1) for those. > > It also adjusts removed local symbols to not use UNDEFs (similar > to solaris ld for globals hpux doesn't

Re: [047/nnn] poly_int: argument sizes

2017-12-20 Thread Richard Sandiford
Jeff Law writes: > On 10/23/2017 11:20 AM, Richard Sandiford wrote: >> This patch changes various bits of state related to argument sizes so >> that they have type poly_int64 rather than HOST_WIDE_INT. This includes: >> >> - incoming_args::pops_args and incoming_args::size >> - rtl_data::outgoin

Re: [039/nnn] poly_int: pass_store_merging::execute

2017-12-20 Thread Richard Sandiford
Jeff Law writes: > On 10/23/2017 11:17 AM, Richard Sandiford wrote: >> This patch makes pass_store_merging::execute track polynomial sizes >> and offsets. >> >> >> 2017-10-23 Richard Sandiford >> Alan Hayward >> David Sherwood >> >> gcc/ >> * gimple-ssa-store-mergi

[committed] Fix multiple_p for two non-poly_ints

2017-12-20 Thread Richard Sandiford
Fix a stupid inversion. This function is very rarely used and was mostly to help split patches up, which is why it didn't get picked up during initial testing. Sorry for the mistake. Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64-linux-gnu. Applied as obvious. Richard 2017-12-20

[middle-end, obvious] Remove dead error_mark_node check

2017-12-20 Thread Paolo Carlini
Hi, today noticed this nit too: when ret_expr == error_mark_node gimplify_return_expr immediatey returns GS_ERROR. Thanks, Paolo. // 2017-12-20 Paolo Carlini * gimplify.c (gimplify_return_expr): Remove dead error_mark_node check. Index: gimplify.c ===

Re: [05/13] Remove vec_perm_const optab

2017-12-20 Thread Richard Sandiford
Richard Biener writes: > On Sun, Dec 10, 2017 at 12:16 AM, Richard Sandiford > wrote: >> One of the changes needed for variable-length VEC_PERM_EXPRs -- and for >> long fixed-length VEC_PERM_EXPRs -- is the ability to use constant >> selectors that wouldn't fit in the vectors being permuted. E.g

Re: [07/13] Make vec_perm_indices use new vector encoding

2017-12-20 Thread Richard Sandiford
Richard Biener writes: > On Tue, Dec 12, 2017 at 4:46 PM, Richard Sandiford > wrote: >> Richard Biener writes: >>> On Sun, Dec 10, 2017 at 12:20 AM, Richard Sandiford >>> wrote: This patch changes vec_perm_indices from a plain vec<> to a class that stores a canonicalised permutation,

[PATCH] Fix PR83491

2017-12-20 Thread Wilco Dijkstra
This patch fixes PR83491 - if an SSA expression contains 2 identical float constants, the division reciprocal optimization will ICE. Fix this by explicitly checking for SSA_NAME in the tree code before walking the uses. Also fix several coding style issues pointed out by Jakub and make comments

Re: [PATCH] Fix PR83491

2017-12-20 Thread Jakub Jelinek
On Wed, Dec 20, 2017 at 01:56:27PM +, Wilco Dijkstra wrote: > This patch fixes PR83491 - if an SSA expression contains 2 identical float > constants, the division reciprocal optimization will ICE. Fix this by > explicitly > checking for SSA_NAME in the tree code before walking the uses. Also

Re: [C++] Add support for #pragma GCC unroll v4

2017-12-20 Thread Eric Botcazou
> This needs some C++ tests, particularly with templates and range-for. I > suspect that using the pragma in a template will ICE. No, that wasn't the case, but the combination template/range-for was indeed not working; fixed by adding a 5th parameter to the RANGE_FOR_STMT node. Tested on x86_64

Re: [RFC] Add means to split dump file into several files -- Use in lra

2017-12-20 Thread Tom de Vries
On 12/14/2017 06:00 PM, Vladimir Makarov wrote: What is inconvenient is that sometimes I need to see RTL after each subpass. Currently I do it by calling debug_rtx_range in gdb after the subpass in question. I've added dumping of the RTL after each subpass. So this approach would be useful

[PATCH] Fix gcov-dump tool for GCDA files (PR gcov-profile/83509).

2017-12-20 Thread Martin Liška
Hi. It's quite simple bug, where we read more than allowed in case of GCDA files. Tested on couple of source files. Ready for trunk? Thanks, Martin gcc/ChangeLog: 2017-12-20 Martin Liska PR gcov-profile/83509 * gcov-dump.c (dump_gcov_file): Do not read info about sup

Re: [PATCH] Append PWD to path when using -fprofile-generate=/some/path.

2017-12-20 Thread Martin Liška
PING^1 On 10/27/2017 03:17 PM, Martin Liška wrote: > Hello. > > It's improvement that I consider still useful even though we're not going to > use > it for profiled bootstrap. > > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > > Ready for trunk? > Thanks, > Martin

Re: [PATCH PR81740]Enforce dependence check for outer loop vectorization

2017-12-20 Thread Bin.Cheng
On Tue, Dec 19, 2017 at 12:56 PM, Richard Biener wrote: > On Tue, Dec 19, 2017 at 12:58 PM, Bin.Cheng wrote: >> On Mon, Dec 18, 2017 at 2:35 PM, Michael Matz wrote: >>> Hi, >>> >>> On Mon, 18 Dec 2017, Richard Biener wrote: >>> where *unroll is similar to *max_vf I think. dist_v[0] is the

Re: [PATCH, PR83492] Fix selection of aarch64 big-endian shift parameters based on __AARCH64EB__

2017-12-20 Thread Michael Weiser
Hi Kyrill, On Wed, Dec 20, 2017 at 09:25:07AM +, Kyrill Tkachov wrote: > > A patch to use __ARM_BIG_ENDIAN in those two spots is approved. > I'll take care of the opt_random occurrence. > Michael, would you like to respin your patch to libcpp to use > __ARM_BIG_ENDIAN? Happy to. Created yest

Re: [PATCH, PR83492] Fix selection of aarch64 big-endian shift parameters based on __AARCH64EB__

2017-12-20 Thread Kyrill Tkachov
On 20/12/17 14:58, Michael Weiser wrote: Hi Kyrill, On Wed, Dec 20, 2017 at 09:25:07AM +, Kyrill Tkachov wrote: A patch to use __ARM_BIG_ENDIAN in those two spots is approved. I'll take care of the opt_random occurrence. Michael, would you like to respin your patch to libcpp to use __ARM

[C++ Patch] PR 81055 ("[6/7/8 Regression] ICE with invalid initializer for array new")

2017-12-20 Thread Paolo Carlini
Hi, in this error recovery regression, after a sensible error produced by unqualified_name_lookup_error we ICE much later when gimplify_modify_expr encounters a corresponding error_mark_node as second argument of a MODIFY_EXPR. I believe we have a very general error recovery weakness with err

Re: [PATCH] Fix gcov-dump tool for GCDA files (PR gcov-profile/83509).

2017-12-20 Thread Nathan Sidwell
On 12/20/2017 09:43 AM, Martin Liška wrote: Hi. It's quite simple bug, where we read more than allowed in case of GCDA files. Tested on couple of source files. ok -- Nathan Sidwell

Re: [PATCH] Fix gcov-dump tool for GCDA files (PR gcov-profile/83509).

2017-12-20 Thread Jeff Law
On 12/20/2017 07:43 AM, Martin Liška wrote: > Hi. > > It's quite simple bug, where we read more than allowed in case of GCDA files. > Tested on couple of source files. > > Ready for trunk? > Thanks, > Martin > > gcc/ChangeLog: > > 2017-12-20 Martin Liska > > PR gcov-profile/83509 >

Re: [middle-end, obvious] Remove dead error_mark_node check

2017-12-20 Thread Jeff Law
On 12/20/2017 06:36 AM, Paolo Carlini wrote: > Hi, > > today noticed this nit too: when ret_expr == error_mark_node > gimplify_return_expr immediatey returns GS_ERROR. > > Thanks, Paolo. > > // > > > > CL > > > 2017-12-20 Paolo Carlini > > * gimplify.c (gimplify_re

Re: [PATCH] Fix up one mishandled plural in diagnostics in gimple-ssa-sprintf.c

2017-12-20 Thread David Malcolm
On Tue, 2017-12-19 at 18:58 +0100, Jakub Jelinek wrote: > On Tue, Dec 19, 2017 at 10:49:07AM -0700, Martin Sebor wrote: > > Can the math be moved into inform_n (and warning_n) itself? > > No. I'm against having dozens of inform_n and warning_n etc. > overloads, it is already bad enough we have so

Re: [PATCH] diagnose attribute conflicts on conversion operators (PR 83394)

2017-12-20 Thread Martin Sebor
On 12/19/2017 10:25 AM, Jason Merrill wrote: On 12/18/2017 05:25 PM, Martin Sebor wrote: On 12/13/2017 02:38 PM, Jason Merrill wrote: On Wed, Dec 13, 2017 at 12:54 PM, Martin Sebor wrote: The attached update also fixes both instances of the ICE reported in bug 83322 and supersedes Jakub's pat

Re: [v2 of PATCH 13/14] c-format.c: handle location wrappers

2017-12-20 Thread David Malcolm
On Tue, 2017-12-19 at 14:55 -0500, Jason Merrill wrote: > On 12/17/2017 11:29 AM, David Malcolm wrote: > > On Mon, 2017-12-11 at 18:45 -0500, Jason Merrill wrote: > > > On 11/10/2017 04:45 PM, David Malcolm wrote: > > > > + STRIP_ANY_LOCATION_WRAPPER (format_tree); > > > > + > > > > if (VAR_

Re: [PATCH] Append PWD to path when using -fprofile-generate=/some/path.

2017-12-20 Thread Martin Sebor
On 10/27/2017 07:17 AM, Martin Liška wrote: Hello. It's improvement that I consider still useful even though we're not going to use it for profiled bootstrap. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. For what it's worth, although it looks correct as is, I thi

Re: [RFC] Add means to split dump file into several files -- Use in lra

2017-12-20 Thread Sandra Loosemore
On 12/20/2017 07:42 AM, Tom de Vries wrote: On 12/14/2017 06:00 PM, Vladimir Makarov wrote: What is inconvenient is that sometimes I need to see RTL after each subpass. Currently I do it by calling debug_rtx_range in gdb after the subpass in question. I've added dumping of the RTL after eac

Re: [PATCH] Append PWD to path when using -fprofile-generate=/some/path.

2017-12-20 Thread Jakub Jelinek
On Wed, Dec 20, 2017 at 10:35:44AM -0700, Martin Sebor wrote: > On 10/27/2017 07:17 AM, Martin Liška wrote: > > Hello. > > > > It's improvement that I consider still useful even though we're not > > going to use > > it for profiled bootstrap. > > > > Patch can bootstrap on ppc64le-redhat-linux an

Re: [PATCH] Replace Yoda conditions in gcc/

2017-12-20 Thread Martin Sebor
On 12/20/2017 01:29 AM, Eric Botcazou wrote: If some port maintainer used 1 <= x && x <= 24 style and doesn't like x >= 1 && x <= 24 for some reason, there is always IN_RANGE macro and IN_RANGE (x, 1, 24) can be used instead (though, such a change requires double checking the type of x, it should

Re: [PATCH] Append PWD to path when using -fprofile-generate=/some/path.

2017-12-20 Thread Martin Sebor
On 12/20/2017 10:45 AM, Jakub Jelinek wrote: On Wed, Dec 20, 2017 at 10:35:44AM -0700, Martin Sebor wrote: On 10/27/2017 07:17 AM, Martin Liška wrote: Hello. It's improvement that I consider still useful even though we're not going to use it for profiled bootstrap. Patch can bootstrap on ppc6

[v3 of 05/14] C++: handle locations wrappers when calling warn_for_memset

2017-12-20 Thread David Malcolm
On Tue, 2017-12-19 at 15:02 -0500, Jason Merrill wrote: > On 12/16/2017 03:01 PM, Martin Sebor wrote: > > On 12/16/2017 06:12 AM, David Malcolm wrote: > > > On Mon, 2017-12-11 at 18:36 -0500, Jason Merrill wrote: > > > > On 11/10/2017 04:45 PM, David Malcolm wrote: > > > > > We need to strip away l

[PATCH] Fix ICE with -ftree-parallelize-loops=2 -fno-ipa-pure-const (PR ipa/83506)

2017-12-20 Thread Jakub Jelinek
Hi! Prathamesh's r254140 moved the if (!flag_wpa) ipa_free_fn_summary (); from the ipa-inline pass to the following ipa-pure-const pass. That doesn't work well though, because ipa-inline pass has unconditional gate, so is done always when real IPA passes are performed, but ipa-pure-const is

[v3 of PATCH 15/14] Use fold_for_warn in get_atomic_generic_size

2017-12-20 Thread David Malcolm
On Tue, 2017-12-19 at 23:22 -0500, Jason Merrill wrote: > On Tue, Dec 19, 2017 at 7:53 PM, David Malcolm > wrote: > > On Tue, 2017-12-19 at 15:35 -0500, Jason Merrill wrote: > > > On Sat, Dec 16, 2017 at 8:12 PM, David Malcolm > > om> > > > wrote: > > > > I rebased the v2 patchkit; here's an extr

[PATCH] Fix some x86 OPTION_MASK_ISA* issues (PR target/83488)

2017-12-20 Thread Jakub Jelinek
Hi! As you know, we ran out of ix86_isa_flags bitmask bits some time ago. The testcase from the PR's #c0 (which I'm not adding into testsuite, because it will be useless any time *.opt is modified with any of the OPTION_MASK_ISA* bits) ICEs because we mix in i386-builtins.def OPTION_MASK_ISA_* con

Re: [PATCH] Fix ICE with -ftree-parallelize-loops=2 -fno-ipa-pure-const (PR ipa/83506)

2017-12-20 Thread Richard Biener
On December 20, 2017 8:24:04 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >Prathamesh's r254140 moved the > if (!flag_wpa) >ipa_free_fn_summary (); >from the ipa-inline pass to the following ipa-pure-const pass. >That doesn't work well though, because ipa-inline pass has >unconditional >gate, s

Re: [PATCH] Fix ICE with -ftree-parallelize-loops=2 -fno-ipa-pure-const (PR ipa/83506)

2017-12-20 Thread David Malcolm
On Wed, 2017-12-20 at 20:24 +0100, Jakub Jelinek wrote: > Hi! > > Prathamesh's r254140 moved the > if (!flag_wpa) > ipa_free_fn_summary (); > from the ipa-inline pass to the following ipa-pure-const pass. > That doesn't work well though, because ipa-inline pass has > unconditional > gate, so

Re: [PATCH] Fix ICE with -ftree-parallelize-loops=2 -fno-ipa-pure-const (PR ipa/83506)

2017-12-20 Thread Jakub Jelinek
On Wed, Dec 20, 2017 at 02:38:13PM -0500, David Malcolm wrote: > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > Out of interest, did you test this with "jit" enabled? I mention it > because we ran into issues with ipa fn summary cleanup with jit before, > which require

[PATCH] Add selftest for "fold_for_warn (error_mark_node)"

2017-12-20 Thread David Malcolm
Maybe this is overkill, but this patch adds a selftest that: fold_for_warn (error_mark_node) does the right thing. Successfully bootstrapped®rtested on x86_64-pc-linux-gnu. Manually tested with "make s-selftest-c++" (since we don't run the selftests for cc1plus by default). OK for trunk? g

Re: [PATCH] Add NON_RECURSIVE attribute for procedures

2017-12-20 Thread Thomas Koenig
Hi Janne, I think you need a few more test cases, like (compile with -fcheck=all and -std=f2018): module foo contains subroutine f(n) call g(n-1) end subroutine f subroutine g(n) if (n<0) return call f(n-1) end subroutine g end module foo program main use foo call f(10) e

[v2 of PATCH 08/14] cp/tree.c: strip location wrappers in lvalue_kind

2017-12-20 Thread David Malcolm
On Mon, 2017-12-11 at 18:39 -0500, Jason Merrill wrote: > On 11/10/2017 04:45 PM, David Malcolm wrote: > > Without this, then lvalue_p returns false for decls, and hence > > e.g. uses of them for references fail. > > > > Stripping location wrappers in lvalue_kind restores the correct > > behavior

[PATCH] Fix vector handling in simplify-rtx.c (PR rtl-optimization/82973)

2017-12-20 Thread Jakub Jelinek
Hi! In rtl.texi we say: @findex const_vector @item (const_vector:@var{m} [@var{x0} @var{x1} @dots{}]) Represents a vector constant. The square brackets stand for the vector containing the constant elements. @var{x0}, @var{x1} and so on are the @code{const_int}, @code{const_wide_int}, @code{const

[openacc, committed] Simplify fold_internal_goacc_dim

2017-12-20 Thread Tom de Vries
Hi, this patch simplifies fold_internal_goacc_dim. Bootstrapped and reg-tested on x86_64. Committed as trivial. Thanks, - Tom Simplify fold_internal_goacc_dim 2017-12-20 Tom de Vries * gimple-fold.c (fold_internal_goacc_dim): Simplify. --- gcc/gimple-fold.c | 20 ++-- 1

Re: [PATCH,PTX] Add support for CUDA 9

2017-12-20 Thread Cesar Philippidis
On 12/19/2017 04:39 PM, Tom de Vries wrote: > On 12/20/2017 12:25 AM, Cesar Philippidis wrote: >> In CUDA 9, Nvidia removed support for treating the labels of functions >> as generic address spaces as part of their PTX 6.0 changes. More >> specifically, >>

Re: [PATCH,PTX] Add support for CUDA 9

2017-12-20 Thread Tom de Vries
On 12/20/2017 11:59 PM, Cesar Philippidis wrote: On 12/19/2017 04:39 PM, Tom de Vries wrote: On 12/20/2017 12:25 AM, Cesar Philippidis wrote: In CUDA 9, Nvidia removed support for treating the labels of functions as generic address spaces as part of their PTX 6.0 changes. More specifically,

Re: [PATCH] Fix PR83491

2017-12-20 Thread Jeff Law
On 12/20/2017 06:59 AM, Jakub Jelinek wrote: > On Wed, Dec 20, 2017 at 01:56:27PM +, Wilco Dijkstra wrote: >> This patch fixes PR83491 - if an SSA expression contains 2 identical float >> constants, the division reciprocal optimization will ICE. Fix this by >> explicitly >> checking for SSA_N

Re: [PATCH] Fix -fcompare-debug due to DEBUG_BEGIN_STMTs (PR debug/83419)

2017-12-20 Thread Alexandre Oliva
On Dec 15, 2017, Richard Biener wrote: > On Thu, 14 Dec 2017, Jakub Jelinek wrote: >> Hi! >> >> The following testcase FAILs -fcompare-debug, because one COND_EXPR >> branch from the FE during gimplifications is just > >> which doesn't have TREE_SIDE_EFFECTS, but for -gstatement-frontiers it >>

[PATCH] avoid using %lli et al.

2017-12-20 Thread Martin Sebor
The attached patch replaces use of %lli and %llu with HOST_WIDE_INT_PRINT_DEC and HOST_WIDE_INT_PRINT_UNSIGNED for portability, and also replaces wide_int::to_shwi() with offset_int::from(). Although I couldn't come up with a test where the latter change above would matter, by using obscenely lar

Re: [PATCH] avoid using %lli et al.

2017-12-20 Thread Richard Sandiford
Martin Sebor writes: > The attached patch replaces use of %lli and %llu with > HOST_WIDE_INT_PRINT_DEC and HOST_WIDE_INT_PRINT_UNSIGNED > for portability, and also replaces wide_int::to_shwi() with > offset_int::from(). Thanks for doing this. I think you need to remove the (long long) casts too

Re: [PATCH] Fix vector handling in simplify-rtx.c (PR rtl-optimization/82973)

2017-12-20 Thread Richard Sandiford
Jakub Jelinek writes: > Hi! > > In rtl.texi we say: > @findex const_vector > @item (const_vector:@var{m} [@var{x0} @var{x1} @dots{}]) > Represents a vector constant. The square brackets stand for the vector > containing the constant elements. @var{x0}, @var{x1} and so on are > the @code{const_in

Re: [PATCH] avoid using %lli et al.

2017-12-20 Thread Jakub Jelinek
On Wed, Dec 20, 2017 at 05:03:23PM -0700, Martin Sebor wrote: > @@ -1228,24 +1228,30 @@ maybe_diag_overlap (location_t loc, gcall *call, b > >if (dstref.offrange[0] == dstref.offrange[1] >|| dstref.offrange[1] > HOST_WIDE_INT_MAX) > -sprintf (offstr[0], "%lli", (long long) dstref.

Re: [PATCH] Fix vector handling in simplify-rtx.c (PR rtl-optimization/82973)

2017-12-20 Thread Jakub Jelinek
On Thu, Dec 21, 2017 at 12:12:14AM +, Richard Sandiford wrote: > Jakub Jelinek writes: > > Hi! > > > > In rtl.texi we say: > > @findex const_vector > > @item (const_vector:@var{m} [@var{x0} @var{x1} @dots{}]) > > Represents a vector constant. The square brackets stand for the vector > > conta

Re: [PATCH] avoid using %lli et al.

2017-12-20 Thread Martin Sebor
On 12/20/2017 05:07 PM, Richard Sandiford wrote: Martin Sebor writes: The attached patch replaces use of %lli and %llu with HOST_WIDE_INT_PRINT_DEC and HOST_WIDE_INT_PRINT_UNSIGNED for portability, and also replaces wide_int::to_shwi() with offset_int::from(). Thanks for doing this. I think

Re: [PATCH] Fix -fcompare-debug due to DEBUG_BEGIN_STMTs (PR debug/83419)

2017-12-20 Thread Alexandre Oliva
On Dec 20, 2017, Alexandre Oliva wrote: > things work reasonably flawlessly now is not suggestive that it was > easy, or not too intrusive, but rather that the work to make it seamless > despite the intrusiveness was done, at first, and then over time. > That's the reason for -fcompare-debug and

Re: [PATCH] Fix -fcompare-debug due to DEBUG_BEGIN_STMTs (PR debug/83419)

2017-12-20 Thread Jeff Law
On 12/20/2017 06:37 PM, Alexandre Oliva wrote: > On Dec 20, 2017, Alexandre Oliva wrote: > >> things work reasonably flawlessly now is not suggestive that it was >> easy, or not too intrusive, but rather that the work to make it seamless >> despite the intrusiveness was done, at first, and then o

Re: [PATCH] Fix -fcompare-debug due to DEBUG_BEGIN_STMTs (PR debug/83419)

2017-12-20 Thread Jeff Law
On 12/20/2017 05:02 PM, Alexandre Oliva wrote: > On Dec 15, 2017, Richard Biener wrote: > >> On Thu, 14 Dec 2017, Jakub Jelinek wrote: >>> Hi! >>> >>> The following testcase FAILs -fcompare-debug, because one COND_EXPR >>> branch from the FE during gimplifications is just > >>> which doesn't have

Re: [PATCH] Add selftest for "fold_for_warn (error_mark_node)"

2017-12-20 Thread Jeff Law
On 12/20/2017 12:45 PM, David Malcolm wrote: > Maybe this is overkill, but this patch adds a selftest that: > >fold_for_warn (error_mark_node) > > does the right thing. > > Successfully bootstrapped®rtested on x86_64-pc-linux-gnu. > > Manually tested with "make s-selftest-c++" (since we don

Re: [PATCH] Fix PR83418

2017-12-20 Thread Jeff Law
On 12/15/2017 09:30 AM, Richard Biener wrote: > On December 15, 2017 5:27:14 PM GMT+01:00, Jeff Law wrote: >> On 12/15/2017 01:10 AM, Richard Biener wrote: >>> On Thu, 14 Dec 2017, Richard Biener wrote: >>> On December 14, 2017 4:43:42 PM GMT+01:00, Jeff Law >> wrote: > On 12/14/2017 01:

Re: [v2 of PATCH 08/14] cp/tree.c: strip location wrappers in lvalue_kind

2017-12-20 Thread Jason Merrill
On Wed, Dec 20, 2017 at 5:14 PM, David Malcolm wrote: > On Mon, 2017-12-11 at 18:39 -0500, Jason Merrill wrote: >> On 11/10/2017 04:45 PM, David Malcolm wrote: >> > Without this, then lvalue_p returns false for decls, and hence >> > e.g. uses of them for references fail. >> > >> > Stripping locati

Re: [v3 of PATCH 15/14] Use fold_for_warn in get_atomic_generic_size

2017-12-20 Thread Jason Merrill
On Wed, Dec 20, 2017 at 2:36 PM, David Malcolm wrote: > On Tue, 2017-12-19 at 23:22 -0500, Jason Merrill wrote: >> On Tue, Dec 19, 2017 at 7:53 PM, David Malcolm >> wrote: >> > On Tue, 2017-12-19 at 15:35 -0500, Jason Merrill wrote: >> > > On Sat, Dec 16, 2017 at 8:12 PM, David Malcolm > > > om>

Re: [v3 of 05/14] C++: handle locations wrappers when calling warn_for_memset

2017-12-20 Thread Jason Merrill
On Wed, Dec 20, 2017 at 2:26 PM, David Malcolm wrote: > On Tue, 2017-12-19 at 15:02 -0500, Jason Merrill wrote: >> On 12/16/2017 03:01 PM, Martin Sebor wrote: >> > On 12/16/2017 06:12 AM, David Malcolm wrote: >> > > On Mon, 2017-12-11 at 18:36 -0500, Jason Merrill wrote: >> > > > On 11/10/2017 04:

Re: [PATCH] RTEMS: Add GCC Runtime Library Exception

2017-12-20 Thread Jeff Law
On 08/22/2017 11:15 PM, Sebastian Huber wrote: > Hello Jeff, > > On 03/08/17 07:11, Sebastian Huber wrote: >> On 02/08/17 21:30, Jeff Law wrote: >> >>> On 07/24/2017 12:03 AM, Sebastian Huber wrote: gcc/     PR libgcc/61152     * aarch64/rtems.h: Add GCC Runtime Library Excepti

Re: [v2 of PATCH 13/14] c-format.c: handle location wrappers

2017-12-20 Thread Jason Merrill
On Wed, Dec 20, 2017 at 12:33 PM, David Malcolm wrote: > On Tue, 2017-12-19 at 14:55 -0500, Jason Merrill wrote: >> On 12/17/2017 11:29 AM, David Malcolm wrote: >> > On Mon, 2017-12-11 at 18:45 -0500, Jason Merrill wrote: >> > > On 11/10/2017 04:45 PM, David Malcolm wrote: >> > > > + STRIP_ANY_LO

Re: [C++] Add support for #pragma GCC unroll v4

2017-12-20 Thread Jason Merrill
On Wed, Dec 20, 2017 at 9:20 AM, Eric Botcazou wrote: >> This needs some C++ tests, particularly with templates and range-for. I >> suspect that using the pragma in a template will ICE. > > No, that wasn't the case, but the combination template/range-for was indeed > not working; fixed by adding

Re: [SFN+LVU+IEPM v4 9/9] [IEPM] Introduce inline entry point markers

2017-12-20 Thread Jeff Law
On 12/11/2017 07:54 PM, Alexandre Oliva wrote: > On Nov 10, 2017, Alexandre Oliva wrote: > >> Output DW_AT_entry_pc based on markers. > > Here's an updated version of the patch. > > [IEPM] Introduce inline entry point markers > > Output DW_AT_entry_pc based on markers. > > Introduce DW_AT_GNU

Re: [PATCH] Fix vector handling in simplify-rtx.c (PR rtl-optimization/82973)

2017-12-20 Thread Jeff Law
On 12/20/2017 03:18 PM, Jakub Jelinek wrote: > Hi! > > In rtl.texi we say: > @findex const_vector > @item (const_vector:@var{m} [@var{x0} @var{x1} @dots{}]) > Represents a vector constant. The square brackets stand for the vector > containing the constant elements. @var{x0}, @var{x1} and so on a

Re: [AArch64] Tweak aarch64_classify_address interface

2017-12-20 Thread Richard Sandiford
James Greenhalgh writes: > On Mon, Oct 23, 2017 at 06:58:29PM +0100, Richard Sandiford wrote: >> Ping. > > Makes sense. OK. > > Reviewed-By: James Greenhalgh Thanks. I needed to update it slightly after recent changes to config/aarch64, but the differences from the first one were obvious. here'

Re: [PATCH] Fix some x86 OPTION_MASK_ISA* issues (PR target/83488)

2017-12-20 Thread Uros Bizjak
On Wed, Dec 20, 2017 at 8:37 PM, Jakub Jelinek wrote: > Hi! > > As you know, we ran out of ix86_isa_flags bitmask bits some time ago. > The testcase from the PR's #c0 (which I'm not adding into testsuite, because > it will be useless any time *.opt is modified with any of the > OPTION_MASK_ISA* bi

PR83501

2017-12-20 Thread Prathamesh Kulkarni
Hi Jakub, Based on your suggestions in PR83501, I have updated the patch to check for integer_zerop for 2nd operand of mem_ref. With the patch, Warray-bounds started warning for the following test in Warray-bounds-3.c in line 362 and thus I removed xfail on it: TM (a5, "0123", ma.a5 + i, ma.a5);