Re: [PATCH][RFA][PR target/84128] Fix restore of scratch register used in probing loops -- V2

2018-01-31 Thread Uros Bizjak
On Thu, Feb 1, 2018 at 2:44 AM, Jeff Law wrote: > > This is V2 of the patch to fix 84128. > > What's change since V1. The -fstack-check path for non-linux systems > has been restored to its previous (correct) behavior. Only the behavior > for -fstack-check on linux systems and

Re: [patch][x86] -march=icelake

2018-01-31 Thread Uros Bizjak
On Tue, Jan 30, 2018 at 12:53 PM, Koval, Julia wrote: > Thank you for your comments, fixed them and rebased Ice Lake patch on top of > it. Ok for trunk? > > Bitmask patch changelog: > > gcc/c-family/ > * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h. > >

Re: [PATCH] Use ptr_mode to save/restore pointers in builtin jmpbuf

2018-01-31 Thread Uros Bizjak
On Thu, Feb 1, 2018 at 1:16 AM, H.J. Lu wrote: > > We currently read and write beyond the builtin jmpbuf on ILP32 targets > where Pmode == DImode and ptr_mode == SImode. Since the builtin jmpbuf > is an array of 5 pointers, ptr_mode should be used to save and restore >

Re: [Patch, fortran] PR84088 - [8 Regression][nvptx] libgomp.oacc-fortran/declare-*.f90 execution fails

2018-01-31 Thread Tom de Vries
On 01/31/2018 09:34 PM, Paul Richard Thomas wrote: This fixes the reduced testcase provided by Tom de Vries in comment #7 of the PR. Committed as 'obvious' as r257262. Will await a report from Tom as to whether or not this fixes the original problem Hi Paul, it does. I've tested

Re: [RFC][PR82479] missing popcount builtin detection

2018-01-31 Thread Kugan Vivekanandarajah
Hi Richard, On 31 January 2018 at 21:39, Richard Biener wrote: > On Wed, Jan 31, 2018 at 11:28 AM, Kugan Vivekanandarajah > wrote: >> Hi Richard, >> >> Thanks for the review. >> On 25 January 2018 at 20:04, Richard Biener

[PATCH][RFA][PR target/84128] Fix restore of scratch register used in probing loops -- V2

2018-01-31 Thread Jeff Law
This is V2 of the patch to fix 84128. What's change since V1. The -fstack-check path for non-linux systems has been restored to its previous (correct) behavior. Only the behavior for -fstack-check on linux systems and -fstack-clash-protection has been changed.

Go patch committed: Always check for nil pointer in value method

2018-01-31 Thread Ian Lance Taylor
This patch to the Go frontend changes value methods to always check that the pointer they are passed is not nil. We already dereference the pointer to copy the value, but if the method does not use the value then the pointer dereference may be optimized away. Do an explicit nil check so that we

Re: [PATCH][RFA][PR target/84128] Fix restore of scratch register used in probing loops

2018-01-31 Thread Jeff Law
On 01/31/2018 03:41 AM, Uros Bizjak wrote: >> >> The one concern I have is do we need to tell the CFI machinery that >> %eax's value was restored to its entry value? > > Can you or someone that knows CFI stuff please investigate this a bit? > I'm not expert in this area, and I don't feel

Re: [PATCH] have -Wformat-overflow handle -fexec-charset (PR 80503)

2018-01-31 Thread Martin Sebor
On 01/31/2018 10:36 AM, Renlin Li wrote: Hi there, I have a patch to fix to regressions we observed in armhf native environment. To effectively check out of range for format string, a target type should be used. And according to the standard, int type is used for "width" and "precision" field

[PATCH] Use ptr_mode to save/restore pointers in builtin jmpbuf

2018-01-31 Thread H.J. Lu
We currently read and write beyond the builtin jmpbuf on ILP32 targets where Pmode == DImode and ptr_mode == SImode. Since the builtin jmpbuf is an array of 5 pointers, ptr_mode should be used to save and restore frame and program pointers. Since x86 only saves stack pointer in stack save area,

libbacktrace patch committed: Close debuginfo files

2018-01-31 Thread Ian Lance Taylor
This patch to libbacktrace closes any debuginfo files that we opened. Bootstrapped and ran libbacktrace tests on x86_64-pc-linux-gnu. This should fix https://golang.org/issue/23626. Committed to mainline. Ian 2018-01-31 Ian Lance Taylor * elf.c (elf_add): Close descriptor

[og7] Properly handle alloca'd arrays in OpenACC data mappings

2018-01-31 Thread Cesar Philippidis
This patch teaches install_parm_decl (part of the PTX .param optimization during omp-lowering) not to extract the identifier string of artificial decls. Apparently, GCC's OpenACC testsuite did not have any tests that contained local arrays which used alloca for storage allocation, or else this

Re: [PATCH] PR 83705 Repeat with large values

2018-01-31 Thread Steve Kargl
On Wed, Jan 31, 2018 at 10:18:46PM +0200, Janne Blomqvist wrote: > This patch fixes the regression by increasing the limit where we fall > back to runtime to 2**28 elements, which is the same limit where > previous releases failed. The are still bugs in the runtime > evaluation, so in many cases

Re: [PATCH][RFA][PR target/84128] Fix restore of scratch register used in probing loops

2018-01-31 Thread Jeff Law
On 01/31/2018 01:28 AM, Eric Botcazou wrote: >> -fstack-check and -fstack-clash both potentially create a loop for stack >> probing. In that case they both need a scratch register to hold the >> loop upper bound. >> >> The code to allocate a scratch register first starts with the >> caller-saved

Re: [PATCH, combine]: Fix PR84123: internal compiler error: in gen_rtx_SUBREG, at emit-rtl.c

2018-01-31 Thread Tom de Vries
On 01/31/2018 10:33 PM, Segher Boessenkool wrote: Hi! On Wed, Jan 31, 2018 at 08:47:08PM +0100, Uros Bizjak wrote: We should skip RTXes that will result in certain ICE here, and this is what the attached patch does. 2018-01-31 Uros Bizjak PR target/84123 *

[testsuite] Fix comdat_group check with Solaris as

2018-01-31 Thread Rainer Orth
While refining the COMDAT group on Solaris 10 patch https://gcc.gnu.org/ml/gcc-patches/2018-01/msg02257.html I noticed that the comdat_group effective-target keyword didn't work when using Solaris as. No wonder, actually, given the different syntaxes used: * with sparc as

Re: C PATCH to fix a missing warning with tokens from system headers (PR c/81779)

2018-01-31 Thread Joseph Myers
On Wed, 31 Jan 2018, Marek Polacek wrote: > This fixes one particular instance of the "tokens coming from system headers > may > suppress a warning" problem. While we need a more general solution, for GCC 8 > we can at least fix this spot. > > Bootstrapped/regtested on x86_64-linux, ok for

Re: [PATCH, combine]: Fix PR84123: internal compiler error: in gen_rtx_SUBREG, at emit-rtl.c

2018-01-31 Thread Segher Boessenkool
Hi! On Wed, Jan 31, 2018 at 08:47:08PM +0100, Uros Bizjak wrote: > We should skip RTXes that will result in certain ICE here, and this is > what the attached patch does. > > 2018-01-31 Uros Bizjak > > PR target/84123 > * combine.c (change_zero_ext): Check if hard

C PATCH to fix a missing warning with tokens from system headers (PR c/81779)

2018-01-31 Thread Marek Polacek
This fixes one particular instance of the "tokens coming from system headers may suppress a warning" problem. While we need a more general solution, for GCC 8 we can at least fix this spot. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2018-01-31 Marek Polacek

[PATCH] Fix ICE with CET and -g (PR target/84146)

2018-01-31 Thread Jakub Jelinek
Hi! We ICE on the following test because rest_of_insert_endbranch separates a setjmp call from the following NOTE_INSN_CALL_ARG_LOCATION that must always immediately follow the call. No other note or debug insn (which aren't around after var-tracking anyway) needs to follow the call, so the loop

[PATCH] Fix vectorizer ICEs with -ftrapv (PR tree-optimization/81661, PR tree-optimization/84117)

2018-01-31 Thread Jakub Jelinek
Hi! Some spots in the vectorizer create generic COND_EXPRs that in one of the branches compute some +/-/* arithmetics. When -ftrapv, the gimplifier ICEs on this as it may trap, we can't emit code with multiple basic blocks from the APIs and don't want to evaluate it if the guarding condition is

[committed] Fix ICE with invalid OpenMP linear clauses (PR fortran/84116)

2018-01-31 Thread Jakub Jelinek
Hi! If the gfc_match_omp_variable_list calls fail, they don't modify head, so *head means referencing NULL. In that case we don't really need to free anything, nothing has been allocated, just need to emit a syntax error. Bootstrapped/regtested on x86_64-linux and i686-linux, committed to

[Patch, fortran] PR84088 - [8 Regression][nvptx] libgomp.oacc-fortran/declare-*.f90 execution fails

2018-01-31 Thread Paul Richard Thomas
This fixes the reduced testcase provided by Tom de Vries in comment #7 of the PR. Committed as 'obvious' as r257262. Will await a report from Tom as to whether or not this fixes the original problem Paul 2018-01-31 Paul Thomas PR fortran/84088 * trans-expr.c

[patch, fortran, committed] Fix symbol name for prototypes generated by -fc-prototypes

2018-01-31 Thread Thomas Koenig
Hello world, I have just committed the attached patch as obvious and simple. Before, the C binding label was ignored for generating function prototypes with the -fc-prototypes option. 2018-01-31 Thomas Koenig * dump-parse-tree.c (write_proc): Use sym_name (which

[PATCH] PR 83705 Repeat with large values

2018-01-31 Thread Janne Blomqvist
This patch fixes the regression by increasing the limit where we fall back to runtime to 2**28 elements, which is the same limit where previous releases failed. The are still bugs in the runtime evaluation, so in many cases longer characters will still fail, so print a warning message. Regtested

Re: [C++ Patch/RFC] PR 83796 ("[6/7/8 Regression] Abstract classes allowed to be instantiated when initialised as default parameter to function or constructor")

2018-01-31 Thread Paolo Carlini
Hi again, On 24/01/2018 16:58, Paolo Carlini wrote: Hi, I'm looking into this rather mild regression, which should be relatively easy to fix. In short, Jason's fix for c++/54325 moved an abstract_virtuals_error_sfinae check from build_aggr_init_expr to build_cplus_new therefore the testcase

[PATCH, rs6000] fix-ups for vec-cmpne-long.c runtime tests

2018-01-31 Thread Will Schmidt
Hi, The vec-cmpne-long.c tests targets -mcpu=power8, but always dg-do-run, even on P7 (or earlier) systems. Add a dg-do run requirement for p8vector_hw to prevent illegal instruction errors. (noticed during review of test results from a P7). Sniff tests look good. OK for trunk?

[PATCH, combine]: Fix PR84123: internal compiler error: in gen_rtx_SUBREG, at emit-rtl.c

2018-01-31 Thread Uros Bizjak
Hello! As shown in the PR, alpha specific testcase hits the above ICE when combine pass is trying to simplify: (insn 13 12 16 2 (set (reg:SI 141 [ ID ]) (zero_extend:SI (subreg:QI (reg:DI 48 $f16 [ ID ]) 0))) 48 {zero_extendqisi2} via change_zero_ext (combine.c): 11486 else if

[Patch, fortran, committed] Use gfc_charlen_t instead of int in gfc_conv_string_init

2018-01-31 Thread Janne Blomqvist
Hi, I just committed the patch below as obvious. Index: ChangeLog === --- ChangeLog (revision 257256) +++ ChangeLog (working copy) @@ -1,5 +1,10 @@ 2018-01-31 Janne Blomqvist + * trans-const.c

[PATCH, rs6000] Update dg-requires for P9 specific tests.

2018-01-31 Thread Will Schmidt
Hi, Noticed during a review of test results on an AIX platform, a few of the (p9 target specific) tests are expecting to see Power9 codegen, but are failing to build due to the environment missing P9 assembler support. Thus, we need to add the power9_vector_ok test requirement to these tests.

Re: [PATCH] libgcc: xtensa: fix build with -mtext-section-literals

2018-01-31 Thread Max Filippov
On Wed, Jan 31, 2018 at 11:11 AM, augustine.sterl...@gmail.com wrote: > On Tue, Jan 30, 2018 at 8:02 PM, Max Filippov wrote: >> >> libgcc/ >> 2018-01-31 Max Filippov >> >> * config/xtensa/ieee754-df.S

Re: [PATCH] libgcc: xtensa: fix build with -mtext-section-literals

2018-01-31 Thread augustine.sterl...@gmail.com
On Tue, Jan 30, 2018 at 8:02 PM, Max Filippov wrote: > > libgcc/ > 2018-01-31 Max Filippov > > * config/xtensa/ieee754-df.S (__adddf3_aux): Add > .literal_position directive. > * config/xtensa/ieee754-sf.S (__addsf3_aux):

Re: Fix LRA subreg calculation for big-endian targets

2018-01-31 Thread Richard Sandiford
Segher Boessenkool writes: > Hi! > > On Fri, Jan 26, 2018 at 01:25:51PM +, Richard Sandiford wrote: >>if (SCALAR_INT_MODE_P (inmode)) >> new_out_reg = gen_lowpart_SUBREG (outmode, reg); >>else >> -new_out_reg = gen_rtx_SUBREG

Re: Fix PR rtl-optimization/84071

2018-01-31 Thread Richard Sandiford
Eric Botcazou writes: >> Tested on SPARC64/Linux and ARM/EABI, applied on mainline and 7 branch. > > As discussed in the audit trail, this beefs up the internal documentation > about WORD_REGISTER_OPERATIONS. > > Tested with 'make doc', applied on mainline and 7 branch. >

patch for PR82444

2018-01-31 Thread Vladimir Makarov
  The following patch fixes ICE for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82444   The patch was successfully bootstrapped on x86_64.   Committed as rev. 257254. Index: ChangeLog === --- ChangeLog (revision 257252) +++

Re: [PATCH, rs6000] Fix VSX/altivec assumptions in altivec-13.c testcase

2018-01-31 Thread Segher Boessenkool
On Tue, Jan 30, 2018 at 04:43:20PM -0600, Will Schmidt wrote: > Hi, > Some VSX function has previosly crept into the altivec-13 testcase. In > particular, > anything 'vector long long' and 'vector double', causing issues on platforms > without > VSX support. So, break that content out into

Go patch committed: Lower expression types in lowering pass

2018-01-31 Thread Ian Lance Taylor
This patch to the Go frontend, based on one by Cherry Zhang, lowers expression types in the lowering pass. This ensures that array types with complicated length expressions are handled correctly. This required some adjustment of constant expression types to not report too many errors for

libgo patch committed: Fix type descriptor name in C code

2018-01-31 Thread Ian Lance Taylor
The big GO symbol rename missed a case in libgo's C code, in the fieldtrack support. This patch fixes it. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE === ---

libgo patch committed: Accept symbols with leading dot in gotest

2018-01-31 Thread Ian Lance Taylor
This libgo patch changes the gotest script to accept symbols with a leading dot, as found on AIX. While we're here stop doing fgrep -v '$', symbol names no longer contain '$' anyhow. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index:

Re: [PATCH, rs6000] Fix PR56010 and PR83743, -mcpu=native use wrong names

2018-01-31 Thread Peter Bergner
On 1/31/18 11:39 AM, Segher Boessenkool wrote: > On Mon, Jan 29, 2018 at 08:55:35PM -0600, Peter Bergner wrote: >> >> Either that, or I could still call candidates_list_and_hint() and just >> throw the hint away, since it's meaningless. > > It's less code, simpler code, so that would be best I

Re: [C++ PATCH] Fix constexpr handling of arrays with unknown bound (PR c++/83993)

2018-01-31 Thread Jason Merrill
OK. On Wed, Jan 31, 2018 at 12:45 PM, Jakub Jelinek wrote: > On Wed, Jan 31, 2018 at 11:02:36AM -0500, Jason Merrill wrote: >> > In this case I was just extending existing warning and wanted >> > consistency with that. Both can be changed in a GCC9 follow-up, >> > or if

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

2018-01-31 Thread James Greenhalgh
On Tue, Jan 30, 2018 at 03:45:17PM +, Renlin Li wrote: > Hi Richard, > > Thanks for the review! > > On 29/01/18 20:23, Richard Sandiford wrote: > > > > The patch looks good to me FWIW. How about adding something like > > the following testcase? > > > >

Re: [PATCH] [PR testsuite/81010] Fix PPC test

2018-01-31 Thread Segher Boessenkool
On Mon, Jan 29, 2018 at 09:41:12PM -0700, Jeff Law wrote: > On 01/07/2018 10:09 AM, Segher Boessenkool wrote: > >> --- a/gcc/testsuite/gcc.target/powerpc/pr56605.c > >> +++ b/gcc/testsuite/gcc.target/powerpc/pr56605.c > >> @@ -1,7 +1,7 @@ > >> /* PR rtl-optimization/56605 */ > >> -/* { dg-do

Re: [C++ PATCH] Fix constexpr handling of arrays with unknown bound (PR c++/83993)

2018-01-31 Thread Jakub Jelinek
On Wed, Jan 31, 2018 at 11:02:36AM -0500, Jason Merrill wrote: > > In this case I was just extending existing warning and wanted > > consistency with that. Both can be changed in a GCC9 follow-up, > > or if Jason/Nathan want it now, even for GCC8, sure. So, do you want %qE as in the patch or %E?

Re: [PATCH, rs6000] Fix PR56010 and PR83743, -mcpu=native use wrong names

2018-01-31 Thread Segher Boessenkool
On Mon, Jan 29, 2018 at 08:55:35PM -0600, Peter Bergner wrote: > > Either that, or I could still call candidates_list_and_hint() and just > throw the hint away, since it's meaningless. It's less code, simpler code, so that would be best I think yes. Segher

Re: Re: [PATCH] have -Wformat-overflow handle -fexec-charset (PR 80503)

2018-01-31 Thread Renlin Li
Hi there, I have a patch to fix to regressions we observed in armhf native environment. To effectively check out of range for format string, a target type should be used. And according to the standard, int type is used for "width" and "precision" field of format string. Here target_strtol10

Re: [PATCH, rs6000] Fix PR56010 and PR83743, -mcpu=native use wrong names

2018-01-31 Thread Segher Boessenkool
On Mon, Jan 29, 2018 at 08:37:09PM -0600, Peter Bergner wrote: > On 1/29/18 6:30 PM, Segher Boessenkool wrote: > > On Mon, Jan 29, 2018 at 02:54:15PM -0600, Peter Bergner wrote: > > Why don't you want that? It let's the compiler say "hey silly human who > > can hardly type his own name

Re: [PATCH/RFC] Fix ICE in find_taken_edge_computed_goto (PR 84136)

2018-01-31 Thread Martin Sebor
On 01/31/2018 08:39 AM, David Malcolm wrote: PR 84136 reports an ICE within sccvn_dom_walker when handling a C/C++ source file that overuses the labels-as-values extension. The code in question stores a jump label into a global, and then jumps to it from another function, which ICEs after

Re: [C++ PATCH] Don't clear TREE_CONSTANT on ADDR_EXPRs (PR c++/83993)

2018-01-31 Thread Jason Merrill
On Wed, Jan 31, 2018 at 11:21 AM, Jakub Jelinek wrote: > On Wed, Jan 31, 2018 at 11:05:17AM -0500, Jason Merrill wrote: >> > 2018-01-24 Jakub Jelinek >> > >> > PR c++/83993 >> > * constexpr.c (cxx_eval_outermost_constant_expr): Don't clear >>

Re: Fix LRA subreg calculation for big-endian targets

2018-01-31 Thread Segher Boessenkool
On Mon, Jan 29, 2018 at 11:07:12PM -0700, Jeff Law wrote: > OK. Makes me wonder how many big endian LRA targets are getting > significant use. powerpc and powerpc64 are BE, but we don't often have QImode and HImode (all instructions work on 32-bit or 64-bit words). Segher

Re: Fix LRA subreg calculation for big-endian targets

2018-01-31 Thread Segher Boessenkool
Hi! On Fri, Jan 26, 2018 at 01:25:51PM +, Richard Sandiford wrote: > if (SCALAR_INT_MODE_P (inmode)) > new_out_reg = gen_lowpart_SUBREG (outmode, reg); > else > - new_out_reg = gen_rtx_SUBREG (outmode, reg, 0); > + { > + poly_uint64 offset =

Re: [C++ PATCH] Don't clear TREE_CONSTANT on ADDR_EXPRs (PR c++/83993)

2018-01-31 Thread Jakub Jelinek
On Wed, Jan 31, 2018 at 11:05:17AM -0500, Jason Merrill wrote: > > 2018-01-24 Jakub Jelinek > > > > PR c++/83993 > > * constexpr.c (cxx_eval_outermost_constant_expr): Don't clear > > TREE_CONSTANT on ADDR_EXPRs. > > > > *

Re: [C++ PATCH] Don't clear TREE_CONSTANT on ADDR_EXPRs (PR c++/83993)

2018-01-31 Thread Jason Merrill
On Wed, Jan 24, 2018 at 6:22 PM, Jakub Jelinek wrote: > Hi! > > cxx_eval_outermost_constant_expr clears TREE_CONSTANT on ADDR_EXPRs that > aren't considered by C++ constant expressions, but that breaks middle-end > which relies on TREE_CONSTANT being set on ADDR_EXPR where the

Re: [C++ PATCH] Fix constexpr handling of arrays with unknown bound (PR c++/83993)

2018-01-31 Thread Jason Merrill
On Thu, Jan 25, 2018 at 5:53 PM, Jakub Jelinek wrote: > On Thu, Jan 25, 2018 at 01:13:56PM -0700, Martin Sebor wrote: >> On 01/24/2018 04:19 PM, Jakub Jelinek wrote: >> > Hi! >> > >> > In constexpr evaluation of array references for arrays with unknown bounds, >> > we need to

Re: [PATCH][RFA][PR target/84128] Fix restore of scratch register used in probing loops

2018-01-31 Thread Jeff Law
On 01/31/2018 01:28 AM, Eric Botcazou wrote: >> -fstack-check and -fstack-clash both potentially create a loop for stack >> probing. In that case they both need a scratch register to hold the >> loop upper bound. >> >> The code to allocate a scratch register first starts with the >> caller-saved

Re: [C++ Patch] PR 84092 ("[8 Regression] ICE on C++14 code with variable template: in build_qualified_name, at cp/tree.c:2043")

2018-01-31 Thread Jason Merrill
OK. On Mon, Jan 29, 2018 at 5:00 PM, Paolo Carlini wrote: > Hi, > > On 29/01/2018 21:41, Jason Merrill wrote: >> >> On Mon, Jan 29, 2018 at 10:45 AM, Paolo Carlini >> wrote: >>> >>> the fix for c++/81236 removed some special code for

C++ patch ping

2018-01-31 Thread Jakub Jelinek
Hi! I'd like to ping following patches: http://gcc.gnu.org/ml/gcc-patches/2018-01/msg02066.html - PR83993 - fix constexpr handling of arrays with unknown bound http://gcc.gnu.org/ml/gcc-patches/2018-01/msg02067.html - PR83993 - don't clear TREE_CONSTANT on ADDR_EXPRs in constexpr.c Thanks

[PATCH/RFC] Fix ICE in find_taken_edge_computed_goto (PR 84136)

2018-01-31 Thread David Malcolm
PR 84136 reports an ICE within sccvn_dom_walker when handling a C/C++ source file that overuses the labels-as-values extension. The code in question stores a jump label into a global, and then jumps to it from another function, which ICEs after inlining: void* a; void foo() { if ((a = &))

Re: C++ PATCH to fix ICE-on-invalid with ?: (PR c++/84138)

2018-01-31 Thread Jason Merrill
OK. On Wed, Jan 31, 2018 at 6:28 AM, Marek Polacek wrote: > This fixes an ICE-on-invalid, where we're passing error_mark_node to > useless_type_conversion_p which can't handle that. > > Bootstrapped/regtested on x86_64-linux, ok for trunk? > > 2018-01-31 Marek Polacek

[og7] Enable firstprivate OpenACC reductions

2018-01-31 Thread Cesar Philippidis
I've applied this patch to openacc-gcc-7-branch which teaches the gimplifier how to pass certain OpenACC reduction variables as firstprivate, and not with an implicit copy directive. This is matches the default behavior for the implicit data mappings of scalar variables inside OpenACC parallel

Use range info in split_constant_offset (PR 81635)

2018-01-31 Thread Richard Sandiford
This patch implements the original suggestion for fixing PR 81635: use range info in split_constant_offset to see whether a conversion of a wrapping type can be split. The range info problem described in: https://gcc.gnu.org/ml/gcc-patches/2017-08/msg01002.html seems to have been fixed. The

Re: Fix PR rtl-optimization/84071

2018-01-31 Thread Eric Botcazou
> Tested on SPARC64/Linux and ARM/EABI, applied on mainline and 7 branch. As discussed in the audit trail, this beefs up the internal documentation about WORD_REGISTER_OPERATIONS. Tested with 'make doc', applied on mainline and 7 branch. 2018-01-31 Eric Botcazou

Re: [PATCH] Fix PR83008

2018-01-31 Thread Richard Biener
On Wed, 31 Jan 2018, Christophe Lyon wrote: > On 30 January 2018 at 11:47, Jakub Jelinek wrote: > > On Tue, Jan 30, 2018 at 11:07:50AM +0100, Richard Biener wrote: > >> > >> I have been asked to push this change, fixing (somewhat) the impreciseness > >> of costing

libgo patch committed: Rename TestAddr6 to avoid PPC64 confusion in gotest script

2018-01-31 Thread Ian Lance Taylor
This patch to libgo renames the variable TestAddr6. The script libgo/testsuite/gotest picks up names that start with Test to find the test functions to run. On most systems it only looks for functions, but on PPC64, because of the function descriptors used for ELF ABI v1, it also looks for data

Re: [PATCH] PR84068: Fix sort order of SCHED_PRESSURE_MODEL

2018-01-31 Thread Richard Sandiford
Maxim Kuvyrkov writes: >> On Jan 31, 2018, at 4:33 PM, Wilco Dijkstra wrote: >> >> Richard Sandiford wrote: >> >>> This was the original intent, but was changed in r213708. TBH I'm not >>> sure what the second hunk in that revision fixed,

Re: [PATCH] Fix PR83008

2018-01-31 Thread Christophe Lyon
On 30 January 2018 at 11:47, Jakub Jelinek wrote: > On Tue, Jan 30, 2018 at 11:07:50AM +0100, Richard Biener wrote: >> >> I have been asked to push this change, fixing (somewhat) the impreciseness >> of costing constant/invariant vector uses in SLP stmts. The previous >> code

Re: [PATCH] PR84068: Fix sort order of SCHED_PRESSURE_MODEL

2018-01-31 Thread Maxim Kuvyrkov
> On Jan 31, 2018, at 4:33 PM, Wilco Dijkstra wrote: > > Richard Sandiford wrote: > >> This was the original intent, but was changed in r213708. TBH I'm not >> sure what the second hunk in that revision fixed, since model_index is >> supposed to return an index greater

Re: [PATCH] PR84068: Fix sort order of SCHED_PRESSURE_MODEL

2018-01-31 Thread Wilco Dijkstra
Richard Sandiford wrote: > This was the original intent, but was changed in r213708.  TBH I'm not > sure what the second hunk in that revision fixed, since model_index is > supposed to return an index greater than all valid indices when passed > an instruction outside the current block.  Maxim,

Re: [PATCH] Fix PR84101, account for function ABI details in vectorization costs

2018-01-31 Thread Richard Biener
On Tue, 30 Jan 2018, Richard Biener wrote: > On Tue, 30 Jan 2018, Richard Biener wrote: > > > > > This patch tries to deal with the "easy" part of a function ABI, > > the return value location, in vectorization costing. The testcase > > shows that if we vectorize the returned value but the

[PATCH] Fix PR84132

2018-01-31 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2018-01-31 Richard Biener PR tree-optimization/84132 * tree-data-ref.c (analyze_miv_subscript): Properly check whether evolution_function_is_affine_multivariate_p before

Re: [PATCH] PR84068: Fix sort order of SCHED_PRESSURE_MODEL

2018-01-31 Thread Richard Sandiford
Wilco Dijkstra writes: > The comparison order for SCHED_PRESSURE_MODEL is incorrect. If either > instruction is not in target_bb, the ordering is not well defined. To fix > this, give all instructions in target_bb the highest priority and sort all > other instructions

Re: [PATCH] PR84068: Fix sort order of SCHED_PRESSURE_MODEL

2018-01-31 Thread Alexander Monakov
On Wed, 31 Jan 2018, Wilco Dijkstra wrote: > The comparison order for SCHED_PRESSURE_MODEL is incorrect. If either > instruction is not in target_bb, the ordering is not well defined. To fix > this, give all instructions in target_bb the highest priority and sort all > other instructions behind

[PATCH] PR84068: Fix sort order of SCHED_PRESSURE_MODEL

2018-01-31 Thread Wilco Dijkstra
The comparison order for SCHED_PRESSURE_MODEL is incorrect. If either instruction is not in target_bb, the ordering is not well defined. To fix this, give all instructions in target_bb the highest priority and sort all other instructions behind it. This way instructions in target_bb will be

Re: Fix gnat.dg/lto20.adb XPASS

2018-01-31 Thread Eric Botcazou
> OK, so you think the test above should check > && (!TYPE_NONALIASED_COMPONENT (t1) || TYPE_STRUCTURAL_EQUALITY_P (t1)) > && (!TYPE_NONALIASED_COMPONENT (t2) || TYPE_STRUCTURAL_EQUALITY_P (t2)) I'm not sure about TYPE_STRUCTURAL_EQUALITY_P (does it matter in LTO mode?) but, yes,

C++ PATCH to fix ICE-on-invalid with ?: (PR c++/84138)

2018-01-31 Thread Marek Polacek
This fixes an ICE-on-invalid, where we're passing error_mark_node to useless_type_conversion_p which can't handle that. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2018-01-31 Marek Polacek PR c++/84138 * cp-gimplify.c (cp_fold): Check if X is an

Re: Fix gnat.dg/lto20.adb XPASS

2018-01-31 Thread Jan Hubicka
> > 2018-01-30 Jan Hubicka > > > >gcc: > >PR lto/83954 > >* lto-symtab.c (warn_type_compatibility_p): Silence false positive > >for type match warning on arrays of pointers. > > > >gcc/testsuite: > >PR lto/83954 > >*

Re: Fix gnat.dg/lto20.adb XPASS

2018-01-31 Thread Richard Biener
On Wed, Jan 31, 2018 at 12:02 PM, Eric Botcazou wrote: >> 2018-01-30 Jan Hubicka >> >>gcc: >>PR lto/83954 >>* lto-symtab.c (warn_type_compatibility_p): Silence false positive >>for type match warning on arrays of pointers.

Re: [PR tree-optimization/84047] missing -Warray-bounds on an out-of-bounds index

2018-01-31 Thread Richard Biener
On Tue, Jan 30, 2018 at 11:11 PM, Aldy Hernandez wrote: > Hi! > > [Note: Jakub has mentioned that missing -Warray-bounds regressions should be > punted to GCC 9. I think this particular one is easy pickings, but if this > and/or the rest of the -Warray-bounds regressions should

Re: Fix gnat.dg/lto20.adb XPASS

2018-01-31 Thread Eric Botcazou
> 2018-01-30 Jan Hubicka > >gcc: >PR lto/83954 >* lto-symtab.c (warn_type_compatibility_p): Silence false positive >for type match warning on arrays of pointers. > >gcc/testsuite: >PR lto/83954 >* gcc.dg/lto/pr83954.h:

Re: [PATCH BACKPORT]Backport r254778 and test case in r244815 to GCC6

2018-01-31 Thread Richard Biener
On Tue, Dec 19, 2017 at 4:36 PM, Bin Cheng wrote: > HI, > This patch backports r254778 and test case in r244815 to GCC6. Bootstrap and > test on x86_64. Is it OK? Ok. Richard. > Thanks, > bin > > 2017-12-18 Bin Cheng > > Backport from mainline

Re: [PATCH][RFA][PR target/84128] Fix restore of scratch register used in probing loops

2018-01-31 Thread Uros Bizjak
On Wed, Jan 31, 2018 at 6:35 AM, Jeff Law wrote: > Whee, fun, this appears to have been broken for a very long time, > possibly since the introduction of -fstack-check in 2010. Thankfully it > only affects 32 bit and only in relatively constrained circumstances. > >

Re: [RFC][PR82479] missing popcount builtin detection

2018-01-31 Thread Richard Biener
On Wed, Jan 31, 2018 at 11:28 AM, Kugan Vivekanandarajah wrote: > Hi Richard, > > Thanks for the review. > On 25 January 2018 at 20:04, Richard Biener > wrote: >> On Wed, Jan 24, 2018 at 10:56 PM, Kugan Vivekanandarajah >>

Re: [PR lto/84105] handle TYPE_IDENTIFIERs for FUNCTION_TYPEs in the gimple pretty printer

2018-01-31 Thread Richard Biener
On Tue, Jan 30, 2018 at 7:29 PM, Aldy Hernandez wrote: > Hi! > > As discussed in the PR, the ICE here happens in dump_generic_node: > > case FUNCTION_TYPE: > case METHOD_TYPE: > ... > if (TYPE_NAME (node) && DECL_NAME (TYPE_NAME (node))) > dump_decl_name

Re: Fix ipa-inline ICE

2018-01-31 Thread Jakub Jelinek
On Wed, Jan 31, 2018 at 11:28:26AM +0100, Jan Hubicka wrote: > > On Wed, Jan 31, 2018 at 10:16:10AM +0100, Jan Hubicka wrote: > > > > On Wed, Jan 31, 2018 at 09:51:31AM +0100, Christophe Lyon wrote: > > > > > Even with Rainer's fix, I've noticed that the new test fails on > > > > > arm/aarch64: >

Re: [RFC][PR82479] missing popcount builtin detection

2018-01-31 Thread Kugan Vivekanandarajah
Hi Richard, Thanks for the review. On 25 January 2018 at 20:04, Richard Biener wrote: > On Wed, Jan 24, 2018 at 10:56 PM, Kugan Vivekanandarajah > wrote: >> Hi All, >> >> Here is a patch for popcount builtin detection similar to

Re: Fix ipa-inline ICE

2018-01-31 Thread Jan Hubicka
> On Wed, Jan 31, 2018 at 10:16:10AM +0100, Jan Hubicka wrote: > > > On Wed, Jan 31, 2018 at 09:51:31AM +0100, Christophe Lyon wrote: > > > > Even with Rainer's fix, I've noticed that the new test fails on > > > > arm/aarch64: > > > > FAIL: g++.dg/torture/pr81360.C -O2 -flto -fuse-linker-plugin

Re: Fix PR target/83368

2018-01-31 Thread Eric Botcazou
> I think this caused: > > .././src/gcc/config/sparc/sparc.md: In function ‘rtx_def* > gen_vxworks_load_got()’: .././src/gcc/config/sparc/sparc.md:1811:17: error: > ‘global_offset_table_rtx’ was not declared in this scope operands[0] = > global_offset_table_rtx; > > on sparc-wrs-vxworks. (Might

Fix PR rtl-optimization/84071

2018-01-31 Thread Eric Botcazou
al SUBREG on a WORD_REGISTER_OPERATIONS target. 2018-01-31 Eric Botcazou <ebotca...@adacore.com> * gcc.c-torture/execute/20180131-1.c: New test. -- Eric BotcazouIndex: combine.c === --- combine.c (revision 257139)

Re: Fix PR target/83368

2018-01-31 Thread Richard Sandiford
Eric Botcazou writes: > This fixes a somewhat obscure interaction between alloca and setjmp/longjmp > in > PIC mode on the SPARC architecture. The problem is that the canonical PIC > register on SPARC (%l7) is call-saved like on other architectures but, unlike > on

[PATCH PR82965/PR83991]Fix invalid profile count in vectorization peeling

2018-01-31 Thread Bin Cheng
Hi, This patch fixes invalid profile count information in vectorization peeling. Current implementation is a bit confusing for me since it tries to compute an overall probability based on scaling probability and change of estimated niters. This patch does it in two steps. Firstly it does the

Re: [PATCH][AArch64] PR tree-optimization/64946: XFAIL gcc.target/aarch64/vect-abs-compile.c

2018-01-31 Thread James Greenhalgh
On Wed, Jan 31, 2018 at 09:46:32AM +, Kyrill Tkachov wrote: > Hi all, > > This test has been failing since forever, it has never passed AFAIK. > The PR details the vectoriser deficiency. > I propose we xfail this with a reference to the PR. > > Ok for trunk? Yes please. We're long overdue

[PATCH][AArch64] PR tree-optimization/64946: XFAIL gcc.target/aarch64/vect-abs-compile.c

2018-01-31 Thread Kyrill Tkachov
Hi all, This test has been failing since forever, it has never passed AFAIK. The PR details the vectoriser deficiency. I propose we xfail this with a reference to the PR. Ok for trunk? Thanks, Kyrill 2018-01-31 Kyrylo Tkachov PR tree-optimization/64946 *

[build] Fix HAVE_GAS_CFI_DIRECTIVE for x86_64-pc-solaris2.*

2018-01-31 Thread Rainer Orth
When compiling MariaDB 10.2 (which uses cfi directives in inline asm, but gets the conditionals wrong) on Solaris 11.4 with an x86_64-pc-solaris2.11 gcc using gas, I noticed that this one incorrectly doesn't use cfi directives although it could/should. Looking closer, I noticed that the logic in

Avoid cc1 SEGV in gcc.dg/rtl/x86_64/final.c (PR target/79975)

2018-01-31 Thread Rainer Orth
As described in the PR, cc1 SEGVs compiling gcc.dg/rtl/x86_64/final.c on targets that default to -fno-dwarf2-cfi-asm. However, the test is compile-only, so doesn't depend on the toolchain's support for cfi directives. Besides, it scans the output for those, so depends on -fdwarf2-cfi-asm anyway,

Re: Fix ipa-inline ICE

2018-01-31 Thread Jakub Jelinek
On Wed, Jan 31, 2018 at 10:16:10AM +0100, Jan Hubicka wrote: > > On Wed, Jan 31, 2018 at 09:51:31AM +0100, Christophe Lyon wrote: > > > Even with Rainer's fix, I've noticed that the new test fails on > > > arm/aarch64: > > > FAIL: g++.dg/torture/pr81360.C -O2 -flto -fuse-linker-plugin > > >

Re: Fix ipa-inline ICE

2018-01-31 Thread Jan Hubicka
> On Wed, Jan 31, 2018 at 09:51:31AM +0100, Christophe Lyon wrote: > > Even with Rainer's fix, I've noticed that the new test fails on arm/aarch64: > > FAIL: g++.dg/torture/pr81360.C -O2 -flto -fuse-linker-plugin > > -fno-fat-lto-objects scan-ipa-dump icf "Equal symbols: 0" > > With -flto

Re: Fix ipa-inline ICE

2018-01-31 Thread Jakub Jelinek
On Wed, Jan 31, 2018 at 09:51:31AM +0100, Christophe Lyon wrote: > Even with Rainer's fix, I've noticed that the new test fails on arm/aarch64: > FAIL: g++.dg/torture/pr81360.C -O2 -flto -fuse-linker-plugin > -fno-fat-lto-objects scan-ipa-dump icf "Equal symbols: 0" With -flto

Re: Fix ipa-inline ICE

2018-01-31 Thread Christophe Lyon
On 30 January 2018 at 23:42, Jakub Jelinek wrote: > On Tue, Jan 30, 2018 at 09:05:31PM +0100, Rainer Orth wrote: >> > this patch fixed ICE that was introduced by Richard Standiford's change to >> > reorder >> > can and want_inline predicates to reduce amount of work done to

Re: [PATCH][RFA][PR target/84128] Fix restore of scratch register used in probing loops

2018-01-31 Thread Eric Botcazou
> -fstack-check and -fstack-clash both potentially create a loop for stack > probing. In that case they both need a scratch register to hold the > loop upper bound. > > The code to allocate a scratch register first starts with the > caller-saved registers as they're zero cost. Then it'll use

Re: Fix gnat.dg/lto20.adb XPASS

2018-01-31 Thread Eric Botcazou
> The original warning was > > /vol/gcc/src/hg/trunk/local/gcc/testsuite/gnat.dg/lto20_pkg.ads:7:13: > warning: type of 'lto20_pkg__proc' does not match original declaration > [-Wlto-type-mismatch] > > so just removing the dg-excess-errors seems the right thing to do. > Tested with the

  1   2   >