Re: [PATCH] Fix -Wduplicated-branches with -g (PR c/85094)

2018-03-29 Thread Richard Biener
On Wed, 28 Mar 2018, Jakub Jelinek wrote: > Hi! > > With the introduction of DEBUG_BEGIN_STMT/-gstatement-frontiers on by > default, the -Wduplicated-branches warning doesn't work anymore with -g, > because operand_equal_p in OEP_LEXICOGRAPHIC mode doesn't consider > DEBUG_BEGIN_STMTs as equal un

Re: [PATCH] Fix _blendm

2018-03-29 Thread Kirill Yukhin
Hello Jakub, On 28 мар 21:24, Jakub Jelinek wrote: > Hi! > > When looking at PR85090, I've looked into tmp-mddump.md and noticed there > some instructions that can't assemble - vblendmd etc., there is only > vpblendmd or vblendmps. I couldn't make a testcase that would reproduce > this though, se

Re: [PATCH, GCC-7, GCC-6][ARM][PR target/84826] Backport Fix ICE in extract_insn, at recog.c:2304 on arm-linux-gnueabihf

2018-03-29 Thread Kyrill Tkachov
Hi Sudi, On 28/03/18 15:04, Sudakshina Das wrote: Hi This patch is a request to backport r258777 and r258805 to gcc-7-branch and gcc-6-branch. The same ICE occurs in both the branches with -fstack-check. Thus the test case directive has been changed. The discussion on the patch that went into

[PATCH, 0/2] Add scan-ltrans-tree-dump and scan-wpa-ipa-dump

2018-03-29 Thread Tom de Vries
Hi, Consider an lto multi-source test-case main.c and foo.c: .. $ cat main.c extern int foo (void); int main () { return foo () + 1; } $ cat foo.c int __attribute__((noinline, noclone)) foo (void) { return 2; } ... When compiling the test-case like this: ... $ gcc main.c foo.c -O2 -flto -s

[PATCH, testsuite, 1/2] Add scan-wpa-ipa-dump

2018-03-29 Thread Tom de Vries
On 03/29/2018 11:11 AM, Tom de Vries wrote: Hi, Consider an lto multi-source test-case main.c and foo.c: .. $ cat main.c extern int foo (void); int main () {   return foo () + 1; } $ cat foo.c int __attribute__((noinline, noclone)) foo (void) {   return 2; } ... When compiling the test-case

[PATCH, testsuite, 2/2] Add scan-ltrans-tree-dump

2018-03-29 Thread Tom de Vries
On 03/29/2018 11:11 AM, Tom de Vries wrote: Hi, Consider an lto multi-source test-case main.c and foo.c: .. $ cat main.c extern int foo (void); int main () {   return foo () + 1; } $ cat foo.c int __attribute__((noinline, noclone)) foo (void) {   return 2; } ... When compiling the test-case

Re: [PATCH, GCC-7, GCC-6][ARM][PR target/84826] Backport Fix ICE in extract_insn, at recog.c:2304 on arm-linux-gnueabihf

2018-03-29 Thread Sudakshina Das
Hi Kyrill On 29/03/18 09:41, Kyrill Tkachov wrote: Hi Sudi, On 28/03/18 15:04, Sudakshina Das wrote: Hi This patch is a request to backport r258777 and r258805 to gcc-7-branch and gcc-6-branch. The same ICE occurs in both the branches with -fstack-check. Thus the test case directive has been

[PATCH] Print function attributes in rtl dumps

2018-03-29 Thread Tom de Vries
Hi, when we compile a function with attributes: ... int __attribute__((noinline, noclone)) foo (void) { return 2; } ... like this: ... gcc main.c -fdump-tree-all -fdump-rtl-all ... we find the function attributes starting from foo.c.004t.gimple: ... __attribute__((noclone, noinline)) foo () {

Re: [PATCH] Print function attributes in rtl dumps

2018-03-29 Thread Tom de Vries
[ Fix ENOPATCH ] On 03/29/2018 12:17 PM, Tom de Vries wrote: Hi, when we compile a function with attributes: ... int __attribute__((noinline, noclone)) foo (void) {   return 2; } ... like this: ... gcc main.c -fdump-tree-all -fdump-rtl-all ... we find the function attributes starting from fo

Re: [Aarch64] Fix conditional branches with target far away.

2018-03-29 Thread Sameera Deshpande
Hi Sudakshina, Thanks for pointing that out. Updated the conditions for attribute length to take care of boundary conditions for offset range. Please find attached the updated patch. I have tested it for gcc testsuite and the failing testcase. Ok for trunk? On 22 March 2018 at 19:06, Sudakshina

Re: [PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657).

2018-03-29 Thread Martin Liška
On 03/28/2018 06:36 PM, Jakub Jelinek wrote: On Wed, Mar 28, 2018 at 06:30:21PM +0200, Martin Liška wrote: --- a/gcc/config/linux.c +++ b/gcc/config/linux.c @@ -37,3 +37,24 @@ linux_libc_has_function (enum function_class fn_class) return false; } + +/* This hook determines whether a fu

[PATCH] Documentation tweaks.

2018-03-29 Thread Martin Liška
Hi. I'm sending couple of documentation tweaks that touch LTO, binutils auto-load plugin support and valid options of -march (on x86-64). Martin gcc/ChangeLog: 2018-03-29 Martin Liska PR lto/84995. * doc/invoke.texi: Document how LTO works with debug info. Describe

Re: [PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657).

2018-03-29 Thread H.J. Lu
On Thu, Mar 29, 2018 at 4:28 AM, Martin Liška wrote: > On 03/28/2018 06:36 PM, Jakub Jelinek wrote: >> >> On Wed, Mar 28, 2018 at 06:30:21PM +0200, Martin Liška wrote: >>> >>> --- a/gcc/config/linux.c >>> +++ b/gcc/config/linux.c >>> @@ -37,3 +37,24 @@ linux_libc_has_function (enum function_class

Re: [PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657).

2018-03-29 Thread Martin Liška
On 03/29/2018 02:25 PM, Jakub Jelinek wrote: On Thu, Mar 29, 2018 at 01:28:13PM +0200, Martin Liška wrote: On 03/28/2018 06:36 PM, Jakub Jelinek wrote: On Wed, Mar 28, 2018 at 06:30:21PM +0200, Martin Liška wrote: --- a/gcc/config/linux.c +++ b/gcc/config/linux.c @@ -37,3 +37,24 @@ linux_libc_

Re: [PATCH] Prefer mempcpy to memcpy on x86_64 target (PR middle-end/81657).

2018-03-29 Thread Jakub Jelinek
On Thu, Mar 29, 2018 at 01:28:13PM +0200, Martin Liška wrote: > On 03/28/2018 06:36 PM, Jakub Jelinek wrote: > > On Wed, Mar 28, 2018 at 06:30:21PM +0200, Martin Liška wrote: > > > --- a/gcc/config/linux.c > > > +++ b/gcc/config/linux.c > > > @@ -37,3 +37,24 @@ linux_libc_has_function (enum functio

[PATCH] i386: Enable AVX/AVX512 features only if supported by OSXSAVE

2018-03-29 Thread H.J. Lu
Enable AVX and AVX512 features only if their states are supported by OSXSAVE. OK for trunk and release branches? H.J. --- PR target/85100 * config/i386/cpuinfo.c (XCR_XFEATURE_ENABLED_MASK): New. (XSTATE_FP): Likewise. (XSTATE_SSE): Likewise. (XSTATE_YMM):

Re: [PATCH] Documentation tweaks.

2018-03-29 Thread Richard Biener
On Thu, Mar 29, 2018 at 2:14 PM, Martin Liška wrote: > Hi. > > I'm sending couple of documentation tweaks that touch LTO, binutils > auto-load plugin > support and valid options of -march (on x86-64). @@ -9482,6 +9482,9 @@ types of hosts. The bytecode files are versioned and there is a strict v

Re: [PATCH] Documentation tweaks.

2018-03-29 Thread Martin Liška
On 03/29/2018 02:56 PM, Richard Biener wrote: On Thu, Mar 29, 2018 at 2:14 PM, Martin Liška wrote: Hi. I'm sending couple of documentation tweaks that touch LTO, binutils auto-load plugin support and valid options of -march (on x86-64). @@ -9482,6 +9482,9 @@ types of hosts. The bytecode fil

Re: [PATCH] i386: Enable AVX/AVX512 features only if supported by OSXSAVE

2018-03-29 Thread Uros Bizjak
On Thu, Mar 29, 2018 at 2:43 PM, H.J. Lu wrote: > Enable AVX and AVX512 features only if their states are supported by > OSXSAVE. > > OK for trunk and release branches? > > > H.J. > --- > PR target/85100 > * config/i386/cpuinfo.c (XCR_XFEATURE_ENABLED_MASK): New. > (XSTATE_

Re: [PATCH 1/2] More underlining of bad arguments (PR c++/85110)

2018-03-29 Thread Jason Merrill
OK. On Wed, Mar 28, 2018 at 4:44 PM, David Malcolm wrote: > As of r256448, the C++ frontend underlines many bad arguments in its > diagnostics; those where perform_overload_resolution returns a > non-NULL candidate, but there's a failure in convert_like_real. > > However, for the case where perfo

Re: [PATCH 2/2] Show pertinent parameter (PR c++/85110)

2018-03-29 Thread Jason Merrill
On Wed, Mar 28, 2018 at 4:44 PM, David Malcolm wrote: > This followup patch updates the specific error-handling path > to add a note showing the pertinent parameter decl, taking > the output from: > > test.cc: In function 'void caller(const char*)': > test.cc:6:14: error: cannot convert 'const cha

[PATCH] PR libgcc/60790: Avoid IFUNC resolver access to uninitialized data

2018-03-29 Thread Florian Weimer
This patch performs lazy initialization of the relevant CPUID feature register value. It will needlessly invoke the CPUID determination code on architectures which lack CPUID support or support for the feature register, but I think it's not worth to avoid the complexity for that. I verified m

Re: [PATCH][GCC][mid-end] Allow larger copies when target supports unaligned access [Patch (1/2)]

2018-03-29 Thread Alan Modra
On Thu, Nov 16, 2017 at 03:27:01PM +, Tamar Christina wrote: > --- a/gcc/expr.c > +++ b/gcc/expr.c > @@ -2769,7 +2769,9 @@ copy_blkmode_to_reg (machine_mode mode, tree src) > >n_regs = (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD; >dst_words = XALLOCAVEC (rtx, n_regs); > - bitsize =

[PATCH] use warning_n instead of _at (PR 84818)

2018-03-29 Thread Martin Sebor
The attached patch replaces a couple of uses of warning_at in builtins.c with the more appropriate warning_n calls as suggested in the bug. The change passes regression testing on x86_64-linux. I'll go ahead and commit it as obvious in the next day or so unless there are objections. Thanks Mart

[PATCH, rs6000] Tidy implementation of vec_ldl

2018-03-29 Thread Kelvin Nilsen
During code review, an inconsistency was noticed in some of the prototypes defined for the vec_ldl built-in function. In particular, the vector fetched from an address declare to be long long * was returned as "vector int".  In addressing this problem, certain other inconsistencies and omissions w

Re: [Aarch64] Fix conditional branches with target far away.

2018-03-29 Thread Sudakshina Das
Hi Sameera On 29/03/18 11:44, Sameera Deshpande wrote: Hi Sudakshina, Thanks for pointing that out. Updated the conditions for attribute length to take care of boundary conditions for offset range. Please find attached the updated patch. I have tested it for gcc testsuite and the failing test

Re: [Aarch64] Fix conditional branches with target far away.

2018-03-29 Thread Sameera Deshpande
Hi Sudakshina, That testcase cannot be addwd as of now, as it needs approval from client. On Thu 29 Mar, 2018, 9:01 PM Sudakshina Das, wrote: > Hi Sameera > > On 29/03/18 11:44, Sameera Deshpande wrote: > > Hi Sudakshina, > > > > Thanks for pointing that out. Updated the conditions for attribut

[committed] Add testcase for already fixed -Wunused-but-set-variable PR c++/85108

2018-03-29 Thread Jakub Jelinek
Hi! This got fixed with r253266, but I don't see it covered with a testcase. Tested on x86_64-linux and i686-linux, committed to trunk as obvious. 2018-03-29 Jakub Jelinek PR c++/85108 * g++.dg/warn/Wunused-var-31.C: New test. --- gcc/testsuite/g++.dg/warn/Wunused-var-31.C.jj

[x86] Skylake tuning options

2018-03-29 Thread Koval, Julia
Hi, This patch adds 2 tuning options for -mtune=skylake-avx512. Ok for trunk? gcc/ * x86-tune.def (movx, partial_reg_dependency): Enable for m_SKYLAKE_AVX512. Thanks, Julia 0001-ptc.patch Description: 0001-ptc.patch

Re: [Aarch64] Fix conditional branches with target far away.

2018-03-29 Thread Kyrill Tkachov
Hi Sameera, On 29/03/18 11:44, Sameera Deshpande wrote: Hi Sudakshina, Thanks for pointing that out. Updated the conditions for attribute length to take care of boundary conditions for offset range. Please find attached the updated patch. I have tested it for gcc testsuite and the failing tes

Re: [x86] Skylake tuning options

2018-03-29 Thread Uros Bizjak
On Thu, Mar 29, 2018 at 5:40 PM, Koval, Julia wrote: > Hi, > > This patch adds 2 tuning options for -mtune=skylake-avx512. Ok for trunk? > > gcc/ > * x86-tune.def (movx, partial_reg_dependency): Enable for > m_SKYLAKE_AVX512. OK. Thanks, Uros.

Re: [x86] Skylake tuning options

2018-03-29 Thread H.J. Lu
On Thu, Mar 29, 2018 at 8:54 AM, Uros Bizjak wrote: > On Thu, Mar 29, 2018 at 5:40 PM, Koval, Julia wrote: >> Hi, >> >> This patch adds 2 tuning options for -mtune=skylake-avx512. Ok for trunk? >> >> gcc/ >> * x86-tune.def (movx, partial_reg_dependency): Enable for >> m_SKYLAKE_AVX512. >

[patch, fortran] Fix PR 85111, some more zero size stuff

2018-03-29 Thread Thomas Koenig
Hello world, the attached patch fixes PR 85111, a regression introduced with my recent simplification patches. Seems like the zero-size saga has yet another chapter :-) Regression-tested. OK for trunk? Regards Thomas 2017-03-29 Thomas Koenig PR fortran/85111 * arr

patch for PR84985

2018-03-29 Thread Vladimir Makarov
  The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84985   The patch was successfully bootstrapped and tested on x86-64.   Committed as rev. 258961. Index: ChangeLog === --- ChangeLog (revision 258960) +++ Ch

Re: [PATCH 1/4] More #include suggestions (PR c++/84269)

2018-03-29 Thread Jason Merrill
OK. On Thu, Mar 22, 2018 at 7:44 PM, David Malcolm wrote: > PR c++/84269 reports a number of names in the C and C++ standard > libraries for which we don't yet offer #include fix-it hints. > > This patch adds them (up to comment #9). > > Successfully bootstrapped & regrtested on x86_64-pc-linux-g

Re: [PATCH 3/4] C++: suggest missing headers for implicit use of "std" (PR c++/85021)

2018-03-29 Thread Jason Merrill
On Thu, Mar 22, 2018 at 7:44 PM, David Malcolm wrote: > We provide fix-it hints for the most common "std" names when an explicit > "std::" prefix is present, however we don't yet provide fix-it hints for > this implicit case: > > using namespace std; > void f() { cout << "test"; } > > for whi

Re: [PATCH 4/4] C++: more std header hints; filter on C++ dialect (PR c++/84269)

2018-03-29 Thread Jason Merrill
OK. On Thu, Mar 22, 2018 at 7:44 PM, David Malcolm wrote: > Jonathan added a bunch more suggestions to: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84269#c10 > as I was testing my last patch, some of which need C++14 and C++17, > and some of which use headers that exist in earlier standards.

[PATCH, rs6000] PR target/83822 fix redundant conditions

2018-03-29 Thread Aaron Sawdey
I've fixed the redundant conditions in the expressions pointed out by 83822. Bootstrap/regtest passes on ppc64le, ok for trunk? Aaron 2018-03-29 Aaron Sawdey PR target/83822 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant condition. *

C++ PATCH for c++/85060, wrong-code calling base member from template

2018-03-29 Thread Jason Merrill
Here, during instantiate_non_dependent_expr, we were getting the wrong answer for any_dependent_bases_p because processing_template_decl was temporarily cleared. Fixed by using uses_template_parms (which doesn't depend on processing_template_decl) on the type we're asking about. Tested x86_64-pc-

Re: [PATCH] Small x86 debug info improvement (PR debug/83157)

2018-03-29 Thread Jakub Jelinek
Hi! On Thu, Mar 22, 2018 at 10:49:45PM +0100, Jakub Jelinek wrote: I'd like to ping this patch: > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > 2018-03-22 Jakub Jelinek > > PR debug/83157 > * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST

Re: [PATCH, rs6000] PR target/83822 fix redundant conditions

2018-03-29 Thread Segher Boessenkool
On Thu, Mar 29, 2018 at 02:29:53PM -0500, Aaron Sawdey wrote: > I've fixed the redundant conditions in the expressions pointed out by > 83822. Bootstrap/regtest passes on ppc64le, ok for trunk? This is fine, thanks! Segher > 2018-03-29 Aaron Sawdey > > PR target/83822 > * confi

Re: [PATCH] [PR c++/84979] improve auto handling in explicit tmpl args for concepts

2018-03-29 Thread Alexandre Oliva
On Mar 28, 2018, Jason Merrill wrote: > On Wed, Mar 28, 2018 at 5:06 AM, Alexandre Oliva wrote: >> On Mar 23, 2018, Jason Merrill wrote: >> >>> On Fri, Mar 23, 2018 at 3:38 PM, Alexandre Oliva wrote: + /* Concepts allows 'auto' in template arguments, even multiple + 'auto's in

Re: [PATCH] [PR c++/84943] allow folding of array indexing indirect_ref

2018-03-29 Thread Alexandre Oliva
On Mar 28, 2018, Jason Merrill wrote: > It looks like cp_build_addr_expr_1 already calls mark_used for single > static member functions, it should probably do the same for single > non-member functions. Hmm... That existing call is suspicious, now that you point it out. There's a switch before

Re: [og7] vector_length extension part 2: Generalize state propagation and synchronization

2018-03-29 Thread Tom de Vries
On 03/02/2018 05:55 PM, Cesar Philippidis wrote: As a follow up patch will show, the nvptx BE falls back to using vector_length = 32 when a vector loop is nested inside a worker loop. I disabled the fallback, and analyzed the vred2d-128.c illegal memory access execution failure. I minimized

Re: [PATCH] [PR c++/84943] allow folding of array indexing indirect_ref

2018-03-29 Thread Alexandre Oliva
On Mar 29, 2018, Alexandre Oliva wrote: > On Mar 28, 2018, Jason Merrill wrote: >> It looks like cp_build_addr_expr_1 already calls mark_used for single >> static member functions, it should probably do the same for single >> non-member functions. > ultimately select, *if* we marked anything.

Re: [patch, fortran] Fix PR 85111, some more zero size stuff

2018-03-29 Thread Jerry DeLisle
On 03/29/2018 11:07 AM, Thomas Koenig wrote: Hello world, the attached patch fixes PR 85111, a regression introduced with my recent simplification patches.  Seems like the zero-size saga has yet another chapter :-) Regression-tested. OK for trunk? Looks OK, Thanks, Jerry Regards Tho