Go patch committed: Document options and compiler directives

2016-08-09 Thread Ian Lance Taylor
This patch to the gccgo manual documents the new options and compiler directives. It also updates the section on function names to suggest -fgo-pkgpath rather than -fgo-prefix; -fgo-prefix still works, but -fgo-pkgpath is preferred. Bootstrapped on x86_64-pc-linux-gnu. Committed to mainline.

Re: [PATCH], PR 72853, Fix Power9 issue with scalar double Altivec d-form instructions

2016-08-09 Thread Segher Boessenkool
On Tue, Aug 09, 2016 at 11:53:26PM -0400, Michael Meissner wrote: > Index: gcc/config/rs6000/rs6000.c > === > --- gcc/config/rs6000/rs6000.c(revision 239301) > +++ gcc/config/rs6000/rs6000.c(working copy) > @@ -7739,6

[PATCH], PR 72853, Fix Power9 issue with scalar double Altivec d-form instructions

2016-08-09 Thread Michael Meissner
As we are starting to run the testsuite through the power9 simulator using a compiler built with the --with-cpu=power9 configuration option, we discovered that one of the tests (20021120-1.c) failed due to the wrong instruction being generated. It turns out that the wY constraint (which in turn

Re: Init df for split pass since some target use REG_NOTE in split pattern

2016-08-09 Thread Kito Cheng
Hi Steven: You are right, I have build arm toolchain today, it's crash when building libgcc since there is no valid CFG in split_all_insns_noflow. Hi Jeff: Maybe we need split_reg_dead_p and split_reg_unused_p like peephole2 have peep2_reg_dead_p? On Wed, Aug 10, 2016 at 3:54 AM, Steven

Re: C++ PATCH for c++/68703 (dependent vector length)

2016-08-09 Thread Jason Merrill
On Tue, Aug 9, 2016 at 6:11 PM, Jakub Jelinek wrote: > This test is the same as the other one. Did you mean to use > typedef int V __attribute__((vector_size (N * sizeof (int; > V v; > instead or something similar (where the attribute would live on > the type rather

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-09 Thread kugan
On 10/08/16 08:51, kugan wrote: Hi Jakub, On 10/08/16 07:55, Jakub Jelinek wrote: On Wed, Aug 10, 2016 at 07:51:08AM +1000, kugan wrote: On 10/08/16 07:46, Jakub Jelinek wrote: On Wed, Aug 10, 2016 at 07:42:25AM +1000, kugan wrote: There was no new regression while testing. I also moved

[PATCH] Move class temp_source_file from input.c to selftest.c/h

2016-08-09 Thread David Malcolm
I have followup patches that use this class in selftests in various places, so this patch moves it to selftest.h. Successfully bootstrapped on x86_64-pc-linux-gnu. OK for trunk? gcc/ChangeLog: * input.c (class selftest::temp_source_file): Move to selftest.h.

[PATCH] Add selftests to selftest.c

2016-08-09 Thread David Malcolm
This patch adds some initial selftesting of selftest.c/h itself. This may seem like overdoing it, but I have some followup patches that add non-trivial logic to selftest.c, which we should verify, so it makes sense to test the existing functionality and then build on that. Successfully

[PATCH] toplev.c: set FILE * globals to NULL after fclose

2016-08-09 Thread David Malcolm
Successfully bootstrapped on x86_64-pc-linux-gnu. OK for trunk? gcc/ChangeLog: * toplev.c (finalize): Set aux_info_file, asm_out_file, and stack_usage_file to NULL after fclose calls. --- gcc/toplev.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git

Re: [PATCH] cpp/c: Add -Wexpansion-to-defined

2016-08-09 Thread Manuel López-Ibáñez
On 9 August 2016 at 22:21, Paolo Bonzini wrote: > > > On 09/08/2016 20:30, Manuel López-Ibáñez wrote: >>> >>> >>> + cpp_opts->warn_expansion_to_defined = cpp_warn_expansion_to_defined; >>> + if (cpp_warn_expansion_to_defined == -1) >>> +cpp_warn_expansion_to_defined =

Go patch committed: Implement go:noinline and go:nosplit directives

2016-08-09 Thread Ian Lance Taylor
This patch to the Go frontend implements the go:noinline and go:nosplit compiler directives. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE === ---

Go patch committed: Implement go:linkname compiler directive

2016-08-09 Thread Ian Lance Taylor
This patch to the Go frontend implements the go:linkname compiler directive. This is a special comment that permits renaming a symbol in Go code that imports the unsafe package. This is used for various linker tricks. This is similar to the gccgo-specific "extern" compiler directive. This only

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-09 Thread kugan
Hi Jakub, On 10/08/16 07:55, Jakub Jelinek wrote: On Wed, Aug 10, 2016 at 07:51:08AM +1000, kugan wrote: On 10/08/16 07:46, Jakub Jelinek wrote: On Wed, Aug 10, 2016 at 07:42:25AM +1000, kugan wrote: There was no new regression while testing. I also moved the testcase from

Re: [PATCH] Fix unaligned access when predictive commoning (PR 71083)

2016-08-09 Thread Bernd Edlinger
On 08/09/16 22:48, Eric Botcazou wrote: >> I think from Eric's comment in get_inner_ref it can be possible >> in Ada that the outer object is accidentally byte-aligned >> but the inner reference is not. In that case I think it is >> better to generate a BIT_FIELD_REF instead of a COMPONENT_REF. >

Re: C++ PATCH for c++/68703 (dependent vector length)

2016-08-09 Thread Jakub Jelinek
On Tue, Aug 09, 2016 at 06:02:45PM -0400, Jason Merrill wrote: > diff --git a/gcc/testsuite/g++.dg/ext/vector32.C > b/gcc/testsuite/g++.dg/ext/vector32.C > new file mode 100644 > index 000..8901d0b > --- /dev/null > +++ b/gcc/testsuite/g++.dg/ext/vector32.C > @@ -0,0 +1,18 @@ > +// PR

C++ PATCH for c++/68703 (dependent vector length)

2016-08-09 Thread Jason Merrill
When we defer dependent attributes, we need to take that into account for determining whether something is dependent. Furthermore, such an attribute means that the TREE_TYPE is incomplete, so we shouldn't use it at all. Tested x86_64-pc-linux-gnu, applying to trunk. commit

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-09 Thread Jakub Jelinek
On Wed, Aug 10, 2016 at 07:51:08AM +1000, kugan wrote: > On 10/08/16 07:46, Jakub Jelinek wrote: > >On Wed, Aug 10, 2016 at 07:42:25AM +1000, kugan wrote: > >>There was no new regression while testing. I also moved the testcase from > >>gcc.dg/torture/pr72835.c to gcc.dg/tree-ssa/pr72835.c. Is

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-09 Thread kugan
Hi Andrew, On 10/08/16 07:50, Andrew Pinski wrote: On Tue, Aug 9, 2016 at 2:42 PM, kugan wrote: On 09/08/16 23:43, kugan wrote: Hi, The test-case in PR72835 is failing with -O2 and passing with -fno-tree-reassoc. It also passes with -O2 -fno-tree-vrp.

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-09 Thread kugan
Hi Jakub, On 10/08/16 07:46, Jakub Jelinek wrote: On Wed, Aug 10, 2016 at 07:42:25AM +1000, kugan wrote: There was no new regression while testing. I also moved the testcase from gcc.dg/torture/pr72835.c to gcc.dg/tree-ssa/pr72835.c. Is this OK for trunk? This looks strange. The

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-09 Thread Andrew Pinski
On Tue, Aug 9, 2016 at 2:42 PM, kugan wrote: > > > On 09/08/16 23:43, kugan wrote: >> >> Hi, >> >> The test-case in PR72835 is failing with -O2 and passing with >> -fno-tree-reassoc. It also passes with -O2 -fno-tree-vrp. >> >> diff of .115t.dse2 and

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-09 Thread Jakub Jelinek
On Wed, Aug 10, 2016 at 07:42:25AM +1000, kugan wrote: > There was no new regression while testing. I also moved the testcase from > gcc.dg/torture/pr72835.c to gcc.dg/tree-ssa/pr72835.c. Is this OK for trunk? This looks strange. The tree-ssa-reassoc.c code has been trying to never reuse

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-09 Thread kugan
On 09/08/16 23:43, kugan wrote: Hi, The test-case in PR72835 is failing with -O2 and passing with -fno-tree-reassoc. It also passes with -O2 -fno-tree-vrp. diff of .115t.dse2 and .116t.reassoc1 for the c++ testcase is as follows, which looks OK. + unsigned int _16; + unsigned int _17; +

Re: [PATCH] cpp/c: Add -Wexpansion-to-defined

2016-08-09 Thread Paolo Bonzini
On 09/08/2016 20:44, Eric Gallager wrote: > Hi, I'm just a lurker, but... > > On 8/9/16, Paolo Bonzini wrote: >> Index: gcc/c-family/c.opt >> === >> --- gcc/c-family/c.opt (revision 239276) >> +++

Re: [PATCH] cpp/c: Add -Wexpansion-to-defined

2016-08-09 Thread Paolo Bonzini
On 09/08/2016 20:30, Manuel López-Ibáñez wrote: >> >> >> + cpp_opts->warn_expansion_to_defined = cpp_warn_expansion_to_defined; >> + if (cpp_warn_expansion_to_defined == -1) >> +cpp_warn_expansion_to_defined = pedantic || extra_warnings; >> + > > Instead of the above, plase use

Re: [PATCH] Fix unaligned access when predictive commoning (PR 71083)

2016-08-09 Thread Eric Botcazou
> I think from Eric's comment in get_inner_ref it can be possible > in Ada that the outer object is accidentally byte-aligned > but the inner reference is not. In that case I think it is > better to generate a BIT_FIELD_REF instead of a COMPONENT_REF. The patch says get_bit_range instead... The

Re: Implement C _FloatN, _FloatNx types [version 3]

2016-08-09 Thread Joseph Myers
On Tue, 9 Aug 2016, James Greenhalgh wrote: > However, I still have some trouble with TFmode and TImode conversions. In > particular, I'm missing support for the standard names: > > extendhftf2 > trunctfhf2 > floattihf2 > fixhfti > > In addition, where the ARMv8.2-A extensions are not

Re: [RS6000] e500 part of pr71680

2016-08-09 Thread Segher Boessenkool
On Tue, Aug 09, 2016 at 06:34:46PM +0930, Alan Modra wrote: > The fallback part of HARD_REGNO_CALLER_SAVE_MODE, choose_hard_reg_mode, > returns DFmode for SImode when TARGET_E500_DOUBLE. This confuses > lra when attempting to save ctr around a call. > > Arseny, the bug reporter, has regression

Re: Init df for split pass since some target use REG_NOTE in split pattern

2016-08-09 Thread Steven Bosscher
On Mon, Aug 8, 2016 at 9:45 PM, Jeff Law wrote: > > I'm pretty sure we do _not_ want it for split_all_insns_noflow since that's > used when the CFG is not necessarily correct and thus I don't see how we can > reliably have death/unused notes. Actually, trying to initializing DF without a valid

Re: [PATCH] Set -fprofile-update=atomic when -pthread is present

2016-08-09 Thread Andi Kleen
Martin Liška writes: > Hi. > > As mention in [1], enabling -fprofile-update=atomic when -pthread is logical > thing and is quite expected default behavior. > > Ready for trunk? It could potentially make things a lot slower. I don't think it's a good idea to do this by default.

Re: [PATCH] cpp/c: Add -Wexpansion-to-defined

2016-08-09 Thread Eric Gallager
Hi, I'm just a lurker, but... On 8/9/16, Paolo Bonzini wrote: > Index: gcc/c-family/c.opt > === > --- gcc/c-family/c.opt(revision 239276) > +++ gcc/c-family/c.opt(working copy) > @@ -506,6 +506,10 @@

Re: [PATCH] cpp/c: Add -Wexpansion-to-defined

2016-08-09 Thread Manuel López-Ibáñez
On 09/08/16 16:59, Paolo Bonzini wrote: Index: gcc/c-family/c-opts.c === --- gcc/c-family/c-opts.c (revision 239276) +++ gcc/c-family/c-opts.c (working copy) @@ -1256,6 +1256,10 @@ sanitize_cpp_opts (void)

Re: [RFC] ipa bitwise constant propagation

2016-08-09 Thread Martin Jambor
Hi, On Tue, Aug 09, 2016 at 05:17:31PM +0530, Prathamesh Kulkarni wrote: > On 9 August 2016 at 16:39, Martin Jambor wrote: > > ... > > >> Instead of storing arg's precision and sign, we should store > >> parameter's precision and sign in ipa_compute_jump_functions_for_edge (). >

Re: [Fortran, Patch] First patch for coarray FAILED IMAGES (TS 18508)

2016-08-09 Thread Alessandro Fanfarillo
Thanks Paul, I fixed the unused -fdump-tree-original on the tests. About -fcoarray=single, I agree with Andre about not producing code for failed images functions when running in single-image mode. If you, or anybody else, thing otherwise I can adjust the functions to return a constant value

Re: protected alloca class for malloc fallback

2016-08-09 Thread Trevor Saunders
On Tue, Aug 09, 2016 at 08:33:49PM +0900, Oleg Endo wrote: > On Mon, 2016-08-08 at 13:39 -0400, Trevor Saunders wrote: > > > > First sizeof std::string is 32 on x86_64, a char *, a size_t for the > > length, and a 16 byte union of a size_t for allocated size and a 16 > > byte buffer for short

Re: [PATCH] Fix unaligned access when predictive commoning (PR 71083)

2016-08-09 Thread Bernd Edlinger
On 08/09/16 09:29, Richard Biener wrote: > On Mon, 8 Aug 2016, Bernd Edlinger wrote: > >> Hi! >> >> >> As described in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71083 >> we generate unaligned accesses because tree-predcom rewrites >> bitfield and packed accesses in a way that looses the proper

Re: [PATCH] Fix early debug regression with DW_AT_string_length (PR debug/71906)

2016-08-09 Thread Richard Biener
On August 9, 2016 4:36:24 PM GMT+02:00, Jakub Jelinek wrote: >On Mon, Aug 01, 2016 at 12:44:30PM +0200, Richard Biener wrote: >> Note that reading the dwarf standard, it looks like it accepts a >location >> which means we could do an implicit location description using >>

Re: [PATCH, fixincludes] Fix PR bootstrap/72833

2016-08-09 Thread Bernd Edlinger
On 08/09/16 18:28, Bruce Korb wrote: > Index: fixincludes/fixincl.tpl > > === > > --- fixincludes/fixincl.tpl (revision 239193) > > +++ fixincludes/fixincl.tpl (working copy) > > @@ -1,7 +1,7 @@ > > [= AutoGen5 Template -*-

C++ PATCHes for abi_tag bugs

2016-08-09 Thread Jason Merrill
The first patch corrects a remaining issue with the GCC 6 fix for ABI tags on template member functions. We were missing tags on them, and I fixed that by setting tags on the template, but the proper fix is to look at the instantiation rather than the template to find the relevant tags, since the

Re: [PATCH 0/7, GCC, V8M] ARMv8-M Security Extensions

2016-08-09 Thread Sandra Loosemore
On 08/09/2016 06:01 AM, Andre Vieira (lists) wrote: [snip] The documentation is in the ARMV8-M Security Extensions in: ARM®v8-M Security Extensions: Requirements on Development Tools document I linked in the email above and subsequent emails

Re: [PATCH, libgo]: Fix syscall test failure on CentOS 5.11

2016-08-09 Thread Ian Lance Taylor
On Tue, Aug 9, 2016 at 1:03 AM, Uros Bizjak wrote: > > syscall test fails on CentOS 5.11 with: > > exec_linux_test.go:167:25: error: reference to undefined identifier > 'syscall.CLONE_NEWNET' >Unshareflags: syscall.CLONE_NEWNET, > ^ > FAIL: syscall

Re: [PATCH, fixincludes] Fix PR bootstrap/72833

2016-08-09 Thread Bruce Korb
Index: fixincludes/fixincl.tpl === --- fixincludes/fixincl.tpl (revision 239193) +++ fixincludes/fixincl.tpl (working copy) @@ -1,7 +1,7 @@ [= AutoGen5 Template -*- Mode: C -*- x=fixincl.x =] [= - (if

Re: [PATCH] Fix a few fall through cases

2016-08-09 Thread Eric Botcazou
> 2016-08-09 Marek Polacek > > PR c/7652 > gcc/c-family/ > * c-ada-spec.c (dump_generic_ada_node): Add return. OK, thanks. -- Eric Botcazou

[PR ipa/71981] Make get_dynamic_type grok MEM_REF

2016-08-09 Thread Martin Jambor
Hi, in the PR ipa_polymorphic_call_context::get_dynamic_type hits an assert when it tries to figure out dynamic type changes in sequence: _3 = MEM[(char * *)""]; fn1.isra.0 (_3); and gets the MEM_REF as its instance parameter. This patch makes it bail out early instead. Pre-approved by

[PATCH] cpp/c: Add -Wexpansion-to-defined

2016-08-09 Thread Paolo Bonzini
clang recently added a new warning -Wexpansion-to-defined, which warns when `defined' is used outside a #if expression (including the case of a macro that is then used in a #if expression). While I disagree with their inclusion of the warning to -Wall, I think it is a good addition overall.

Re: Implement -Wimplicit-fallthrough (take 2): questionable code

2016-08-09 Thread Jakub Jelinek
On Wed, Jul 27, 2016 at 06:53:39PM +0200, Marek Polacek wrote: > --- gcc/gcc/var-tracking.c > +++ gcc/gcc/var-tracking.c > @@ -1056,6 +1056,8 @@ adjust_mems (rtx loc, const_rtx old_rtx, void *data) >? GET_MODE_SIZE (amd->mem_mode) >

Re: Use verify_oacc_routine_clauses for Fortran (was: Use verify_oacc_routine_clauses for C/C++)

2016-08-09 Thread Cesar Philippidis
On 08/01/2016 08:29 AM, Thomas Schwinge wrote: > On Mon, 01 Aug 2016 17:21:37 +0200, I wrote: >> Some checking of OpenACC clauses currently done in the front ends should >> be moved later, and be unified. (Also, I suppose, for supporting of the >> device_type clause, such checking actually

Re: [PATCH] Fix a few fall through cases

2016-08-09 Thread Martin Jambor
Hi, On Tue, Aug 09, 2016 at 05:21:26PM +0200, Marek Polacek wrote: > Testing with -Wimplicit-fallthrough turned up a few spots where > fall through is either a bug, or just too confusing. This patch > should be desirable even though the warning is still not in. > > Eric, can you look at the

Re: libgo patch committed: Change build procedure to use build tags

2016-08-09 Thread Lynn A. Boger
libgo test results in gcc-testresults for ppc64le & ppc64 are back to what they were before the change. Thanks. On 08/08/2016 03:34 PM, Ian Lance Taylor wrote: On Mon, Aug 8, 2016 at 11:14 AM, Lynn A. Boger wrote: The libgo tests on ppc64le and ppc64 have all

Re: [PATCH GCC]Resolve compilation time known alias checks in vectorizer

2016-08-09 Thread Bin.Cheng
On Sat, Aug 6, 2016 at 9:20 PM, Andreas Schwab wrote: > On Mi, Jul 13 2016, "Bin.Cheng" wrote: > >> Patch re-tested/applied on trunk as r238301. > > This breaks gcc.dg/vect/vect-117.c on powerpc. Hi Andreas, Sorry for the inconvenience, I will have a

Re: [PATCH] Fix a few fall through cases

2016-08-09 Thread Jakub Jelinek
On Tue, Aug 09, 2016 at 05:21:26PM +0200, Marek Polacek wrote: > Bootstrapped/regtested on x86_64-linux and ppc64le-redhat-linux. > > 2016-08-09 Marek Polacek > > PR c/7652 > gcc/c-family/ > * c-ada-spec.c (dump_generic_ada_node): Add return. > gcc/ > *

[PATCH, i386]: Fix PR 72843, ICE in lra_set_insn_recog_data

2016-08-09 Thread Uros Bizjak
Hello! Insn predicates have to allow all constraints during LRA, not only after reload_completed is true. 2016-08-09 Uros Bizjak PR target/72843 * config/i386/i386.md (*movtf_internal): Use lra_in_progress || reload_completed instead of !can_create_pseudo_p

Re: [PATCH, Fortran, OpenACC] Fix PR70598, Fortran host_data ICE

2016-08-09 Thread Jakub Jelinek
On Fri, Jul 29, 2016 at 11:47:18PM +0800, Chung-Lin Tang wrote: > On 2016/7/21 07:13 PM, Jakub Jelinek wrote: > > Better put every && on a separate line if the whole if (...) doesn't fit > > on a single line. > > > >> > + && !n->sym->attr.cray_pointer > >> > +

Re: [openacc] add a warning for non-contiguous data clauses

2016-08-09 Thread Jakub Jelinek
On Tue, Aug 02, 2016 at 09:16:00PM -0700, Cesar Philippidis wrote: > 2016-08-02 Cesar Philippidis > > gcc/fortran/ > * openmp.c (resolve_oacc_data_clauses): Emit a warning about a > potentially non-contiguous array pointer. >

Re: Implement C _FloatN, _FloatNx types [version 3]

2016-08-09 Thread James Greenhalgh
On Thu, Jul 28, 2016 at 10:43:25PM +, Joseph Myers wrote: > On Tue, 19 Jul 2016, James Greenhalgh wrote: > > > These slightly complicate the description you give above as we now want > > two behaviours. Where the 16-bit floating point extensions are available, > > we want to use the native

Re: Implement -Wimplicit-fallthrough (take 2): questionable code

2016-08-09 Thread Marek Polacek
On Wed, Aug 03, 2016 at 10:56:08AM -0600, Jeff Law wrote: > On 07/27/2016 10:53 AM, Marek Polacek wrote: > > These are the cases where I wasn't sure if the falls through were > > intentional > > or not. > > > > This patch has been tested on powerpc64le-unknown-linux-gnu, > > aarch64-linux-gnu,

[PATCH] Fix a few fall through cases

2016-08-09 Thread Marek Polacek
Testing with -Wimplicit-fallthrough turned up a few spots where fall through is either a bug, or just too confusing. This patch should be desirable even though the warning is still not in. Eric, can you look at the c-ada-spec.c part? Martin, does the hsa-gen.c part look correct? What about the

Re: [PATCH] Fix PR72772

2016-08-09 Thread Bin.Cheng
On Fri, Aug 5, 2016 at 11:48 AM, Richard Biener wrote: > > This fixes PR72772 by avoing placing a degenerate PHI in each > forwarder block loop init creates when creating simple preheaders. > The solution is to simply split the single loop entry edge which > is also way cheaper

[v3 PATCH] Implement LWG 2744 and LWG 2754.

2016-08-09 Thread Ville Voutilainen
Tested on Linux-x64. 2016-08-09 Ville Voutilainen Implement LWG 2744 and LWG 2754. * include/std/any (any(ValueType&&)): Constrain with __is_in_place. (any(in_place_type_t<_ValueType>, _Args&&...)): Use _Decay. (any(in_place_type_t<_ValueType>,

Re: [PATCH] Fix early debug regression with DW_AT_string_length (PR debug/71906)

2016-08-09 Thread Jakub Jelinek
On Mon, Aug 01, 2016 at 12:44:30PM +0200, Richard Biener wrote: > Note that reading the dwarf standard, it looks like it accepts a location > which means we could do an implicit location description using > DW_OP_stack_value which gives us access to arbitrary dwarf > expressions (and thus the

[MIPS, committed] Skip gcc.dg/loop-8.c

2016-08-09 Thread Matthew Fortune
MIPS creates more invariants than gcc.dg/loop-8.c expects. There is no way to represent what the original test was trying to verify given the additional invariants being moved out of the loop. Thanks, Matthew gcc/ PR rtl-optimization/9 * gcc.dg/loop-8.c: Skip for MIPS due to

[PATCH] gcov: add new option (--hash-names) (PR gcov-profile/36412).

2016-08-09 Thread Martin Liška
Hello. Following enhancement for gcov solves issues when we cannot create a file due to a filesystem path length limit. Selected approach utilizes existing md5sum functions. Patch survives make check -k RUNTESTFLAGS="gcov.exp" on x86_64-linux-gnu. Ready for trunk? Thanks, Martin >From

[hsa-branch] Add support for CONST_DECLs

2016-08-09 Thread Martin Jambor
Hi, the HSA/BRIG back-end does not have any support for CONST_DECSs so far. This patch adds it, emitting readonly segment symbols with initializers for them. One complication is that addresses pertaining to HSA readonly segment cannot be converted to flat addresses. So when we need an address

[hsa-branch] Make section::add return pointer to data

2016-08-09 Thread Martin Jambor
Hi, when emitting a BRIG function definition, we need to fixup the leading directive after all of the instructions and everything has been added to the section (well, we could pre-compute the value but it is not worth it). At the moment the function emitting code calculates the pointer in an

[hsa-branch] Remove unnecessary operators

2016-08-09 Thread Martin Jambor
Hi, since the HSA branch switched to a simple obstack from alloc-pools, it is not necessary to have a separate new operator for each instruction kind and it is enough if the common ancestor has one. Therefore, this patch removes them. Similarly, I learned that it is enough to make the delete

[hsa-branch] Use hsa_obstack to allocate temporary names

2016-08-09 Thread Martin Jambor
Hi, HSA backend now uses ggc_strdup to allocate name strings for stuff that doesn't have any and therefore we rely on the garbage collector not running. That works but is not nice and since the HSA branch now has an obstack, not necessary. This patch changes the allocation to be from the

[hsa-branch] Remove typedef.*_p from hsa.h

2016-08-09 Thread Martin Jambor
Hi, the rest of hsa code uses direct pointers, which I find preferable (and since we have moved to explicit pointers also for example with the gimple type, I believe I am not alone, so I removed the two _p typedefs we had in hsa.h. They were not in widespread use anyway. Thanks, Martin

[hsa-branch] Remove useless build of kernel_dependencies_vector_type

2016-08-09 Thread Martin Jambor
Hi, the type is built twice and the first one is not used. This patch removes it. Thanks, Martin 2016-08-04 Martin Jambor * hsa-brig.c (hsa_output_kernels): Remove unnecessary building of kernel_dependencies_vector_type. --- gcc/hsa-brig.c | 6 +- 1

[hsa-branch] Avoid register moves for unnecessary conversions

2016-08-09 Thread Martin Jambor
Hi, in the first pre-release HSAIL/BRIG specifications, registers had a type which they now don't, they only have size. We have thought about removing it from our internal representation but it is actually useful to know what the type of the stored value is when it is actually necessary to

Re: C++ PATCH for c++/56701 (treating 'this' as an rvalue)

2016-08-09 Thread Jason Merrill
On Thu, Mar 28, 2013 at 2:14 PM, Jason Merrill wrote: > When 'this' appears in an expression, it should be an rvalue rather than a > const lvalue; in C++11, the distinction matters. And likewise for &*this. Tested x86_64-pc-linux-gnu, applying to trunk. commit

C++ PATCH for C++17 constexpr lambda

2016-08-09 Thread Jason Merrill
The first patch fixes a constexpr issue whereby we were complaining about passing a non-constant empty class to a constexpr function; this is OK because there's no actual copying involved. The second patch implements the C++17 constexpr lambda proposal. This was mostly pretty straightforward. A

Go patch committed: Rewrite compiler directive support

2016-08-09 Thread Ian Lance Taylor
This patch to the Go frontend rewrites the compiler directive support to recognize all the compiler directives handled by the current gc compiler. They are now turned into flags attached to a function or function declaration, or, for the case of go:linkname, into a map attached to the Lex object.

Re: [PATCH AArch64/V3]Add new patterns for vcond_mask and vec_cmp

2016-08-09 Thread James Greenhalgh
On Mon, Aug 08, 2016 at 12:10:00PM +0100, Bin.Cheng wrote: > On Mon, Aug 8, 2016 at 11:40 AM, James Greenhalgh > wrote: > > On Mon, Aug 01, 2016 at 01:18:53PM +, Bin Cheng wrote: > >> Hi, > >> This is the 3rd version patch implementing vcond_mask and vec_cmp patterns

[PATCH] Fix PR middle-end/71654 (missed shortening of a compare)

2016-08-09 Thread Patrick Palka
Hi, this patch makes match.pd to shorten comparisons that involve a sign-changing cast from a shorter unsigned type to a wider signed type. This should be safe to do because a wider signed type can hold all the possible values of a shorter unsigned type. This change causes vrp23.c and vrp24.c to

[PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-09 Thread kugan
Hi, The test-case in PR72835 is failing with -O2 and passing with -fno-tree-reassoc. It also passes with -O2 -fno-tree-vrp. diff of .115t.dse2 and .116t.reassoc1 for the c++ testcase is as follows, which looks OK. + unsigned int _16; + unsigned int _17; + unsigned int _18; : _1 =

Re: protected alloca class for malloc fallback

2016-08-09 Thread Bernd Schmidt
On 08/09/2016 03:17 PM, Aldy Hernandez wrote: On 08/05/2016 01:55 PM, Richard Biener wrote: Hi Richard. Please don't use std::string. For string building you can use obstacks. Alright let's talk details then so I can write things up in a way you approve of. Take for instance simple uses

Re: protected alloca class for malloc fallback

2016-08-09 Thread Aldy Hernandez
On 08/05/2016 01:55 PM, Richard Biener wrote: Hi Richard. Please don't use std::string. For string building you can use obstacks. Alright let's talk details then so I can write things up in a way you approve of. Take for instance simple uses like all the tree_*check_failed routines,

Re: Ping^2: [PATCH build/doc] Replacing libiberty with gnulib

2016-08-09 Thread DJ Delorie
ayush goel writes: > This patch https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01302.html > is still pending review. The build portions are OK, assuming a global maintainer has approved of adding gnulib in general.

Re: [PATCH] Improve backwards threading

2016-08-09 Thread Richard Biener
On Fri, 5 Aug 2016, Jeff Law wrote: > On 08/05/2016 07:36 AM, Richard Biener wrote: > > @@ -560,6 +562,14 @@ fsm_find_control_statement_thread_paths > > edge taken_edge = profitable_jump_thread_path (path, bbi, name, > > arg); > > if (taken_edge) > > { > > +

Re: [PATCH] Set -fprofile-update=atomic when -pthread is present

2016-08-09 Thread Nathan Sidwell
On 08/09/16 07:24, Martin Liška wrote: Hi. As mention in [1], enabling -fprofile-update=atomic when -pthread is logical thing and is quite expected default behavior. Ready for trunk? [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58306#c21 This certainly requires changes to invoke.texi,

[MIPS,committed] Use create_tmp_var_raw in mips_atomic_assign_expand_fenv

2016-08-09 Thread Matthew Fortune
I have applied the MIPS specific fix for PR65345. It is a mechanical change. This fixes the MIPS failures in atomic/pr65345-4.c. gcc/ PR c/65345 * config/mips/mips.c (mips_atomic_assign_expand_fenv): Use create_tmp_var_raw instead of create_tmp_var. Thanks, Matthew

Re: [PATCH 2/N] Fix usage of POW2 histogram

2016-08-09 Thread Nathan Sidwell
On 08/09/16 04:41, Martin Liška wrote: Another small follow-up changes instrumentation of MOD exprs to not instrument divisors different from SSA_NAME. Patch survives: make check -k -j10 RUNTESTFLAGS="tree-prof.exp" ok, thanks

Re: [PATCH 5/N] Add new *_atomic counter update function, (-fprofile-update=atomic)

2016-08-09 Thread Nathan Sidwell
On 08/08/16 13:03, Martin Liška wrote: v3: fixed wrong defines in libgcc/Makefine.in ok, thanks

Re: [PATCH] Fix POW2 histogram

2016-08-09 Thread Nathan Sidwell
On 08/08/16 12:56, Martin Liška wrote: Hello. Currently, we utilize pow2 profile histogram to track gimple STMTs like this: ssa_name_x % value. void __gcov_pow2_profiler (gcov_type *counters, gcov_type value) { if (value & (value - 1)) counters[0]++; else counters[1]++; }

Re: [PATCH PR71734] Add missed check that reference defined inside loop.

2016-08-09 Thread Richard Biener
On Tue, Aug 9, 2016 at 2:05 PM, Yuri Rumyantsev wrote: > Richard, > > I checked that this move helps. > Does it mean that I've got approval to integrate it to trunk? Yes, if it survives bootstrap & regtest. Richard. > 2016-08-09 14:33 GMT+03:00 Richard Biener

Re: Implement -Wimplicit-fallthrough (take 2): the rest

2016-08-09 Thread Marek Polacek
On Tue, Aug 09, 2016 at 12:24:03PM +0200, Jakub Jelinek wrote: > On Tue, Aug 09, 2016 at 12:18:11PM +0200, Marek Polacek wrote: > > > > On Wed, 27 Jul 2016, Marek Polacek wrote: > > > > > > > > > And this is the rest. Either I just adjusted a falls through comment, > > > > > or I added

[PATCH, fixincludes] Fix PR bootstrap/72833

2016-08-09 Thread Bernd Edlinger
Hi! Due to my recent cleanup of special_function_p the darwin bootstrap is currently broken because the longjmp function misses the noreturn attribute. Therefore I revived an old solaris_longjmp_noreturn fixinclude rule. See the attached patch. Boot-strap on i686-apple-darwin11 and

Re: [Patch, tentative, reload] Make push_reload work with more types of subregs?

2016-08-09 Thread Bernd Schmidt
On 08/08/2016 05:26 PM, Senthil Kumar Selvaraj wrote: I picked out the commit where you'd added SYMBOL_REF handling (rev #190252), and patched that with the below code. Bootstrapped and regtested on x86_64-pc-linux - the results were identical with and without the patch. Is this good enough for

Re: [PATCH PR71734] Add missed check that reference defined inside loop.

2016-08-09 Thread Yuri Rumyantsev
Richard, I checked that this move helps. Does it mean that I've got approval to integrate it to trunk? 2016-08-09 14:33 GMT+03:00 Richard Biener : > On Tue, Aug 9, 2016 at 1:26 PM, Yuri Rumyantsev wrote: >> Richard, >> >> The patch proposed by you

Re: [PATCH 0/7, GCC, V8M] ARMv8-M Security Extensions

2016-08-09 Thread Andre Vieira (lists)
On 08/08/16 05:19, Sandra Loosemore wrote: > On 07/25/2016 07:17 AM, Andre Vieira (lists) wrote: >> [PATCH 0/7, GCC, V8M] ARMv8-M Security Extensions >> >> Hello, >> >> This is a respin of a previous patch series for ARMv8-M Security >> Extensions. In this version I have removed one patch, rebased

Re: [RFC] ipa bitwise constant propagation

2016-08-09 Thread Prathamesh Kulkarni
On 9 August 2016 at 16:39, Martin Jambor wrote: > Hi, > > On Tue, Aug 09, 2016 at 01:41:21PM +0530, Prathamesh Kulkarni wrote: >> On 8 August 2016 at 19:33, Martin Jambor wrote: >> >> >> +class ipcp_bits_lattice >> >> >> +{ >> >> >> +public: >> >> >> + bool

Re: [PATCH PR71734] Add missed check that reference defined inside loop.

2016-08-09 Thread Richard Biener
On Tue, Aug 9, 2016 at 1:26 PM, Yuri Rumyantsev wrote: > Richard, > > The patch proposed by you does not work properly for > g++.dg/vect/pr70729-nest.cc test since the reference for this->S_n has > been cached as dependent for outer loop and loop is not vectorized: > > g++

Re: protected alloca class for malloc fallback

2016-08-09 Thread Oleg Endo
On Mon, 2016-08-08 at 13:39 -0400, Trevor Saunders wrote: > First sizeof std::string is 32 on x86_64, a char *, a size_t for the > length, and a 16 byte union of a size_t for allocated size and a 16 > byte buffer for short strings. I suppose some of this is required by > the C++ standard, I

Re: [PATCH PR71734] Add missed check that reference defined inside loop.

2016-08-09 Thread Yuri Rumyantsev
Richard, The patch proposed by you does not work properly for g++.dg/vect/pr70729-nest.cc test since the reference for this->S_n has been cached as dependent for outer loop and loop is not vectorized: g++ -Ofast -fopenmp -mavx2 pr70729-nest.cc -c -fdump-tree-vect-details grep 'LOOP VECTORIZED'

[PATCH] Set -fprofile-update=atomic when -pthread is present

2016-08-09 Thread Martin Liška
Hi. As mention in [1], enabling -fprofile-update=atomic when -pthread is logical thing and is quite expected default behavior. Ready for trunk? [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58306#c21 >From 7135fcf5f7b8f2f3c55a6e80048660c1beea5052 Mon Sep 17 00:00:00 2001 From: marxin

Re: [Fortran, Patch] First patch for coarray FAILED IMAGES (TS 18508)

2016-08-09 Thread Paul Richard Thomas
Hi Sandro, As far as I can see, this is OK barring a couple of minor wrinkles and a question: For coarray_failed_images_err.f90 and coarray_image_status_err.f90 you have used the option -fdump-tree-original without making use of the tree dump. Mikael asked you to provide an executable test with

Re: [RFC] ipa bitwise constant propagation

2016-08-09 Thread Martin Jambor
Hi, On Tue, Aug 09, 2016 at 01:41:21PM +0530, Prathamesh Kulkarni wrote: > On 8 August 2016 at 19:33, Martin Jambor wrote: > >> >> +class ipcp_bits_lattice > >> >> +{ > >> >> +public: > >> >> + bool bottom_p () { return lattice_val == IPA_BITS_VARYING; } > >> >> + bool top_p

Re: divmod transform: add test-cases

2016-08-09 Thread Prathamesh Kulkarni
ping https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01869.html Thanks, Prathamesh On 28 July 2016 at 19:07, Prathamesh Kulkarni wrote: > Hi, > The following patch adds test-cases for divmod transform. > I separated the SImode tests into separate file from DImode

Re: [RFC] [2/2] divmod transform: override expand_divmod_libfunc for ARM and add test-cases

2016-08-09 Thread Prathamesh Kulkarni
ping https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01969.html Thanks, Prathamesh On 29 July 2016 at 22:13, Prathamesh Kulkarni wrote: > On 29 July 2016 at 05:40, Prathamesh Kulkarni > wrote: >> On 28 July 2016 at 20:14, Ramana

Re: RFC [1/2] divmod transform

2016-08-09 Thread Prathamesh Kulkarni
ping https://gcc.gnu.org/ml/gcc-patches/2016-07/msg01867.html Thanks, Prathamesh On 28 July 2016 at 19:05, Prathamesh Kulkarni wrote: > On 8 June 2016 at 19:53, Richard Biener wrote: >> On Fri, 3 Jun 2016, Jim Wilson wrote: >> >>> On Mon, May

Re: Implement -Wimplicit-fallthrough (take 2): the rest

2016-08-09 Thread Jakub Jelinek
On Tue, Aug 09, 2016 at 12:18:11PM +0200, Marek Polacek wrote: > > > On Wed, 27 Jul 2016, Marek Polacek wrote: > > > > > > > And this is the rest. Either I just adjusted a falls through comment, > > > > or I added __builtin_fallthrough (). These were the cases where I was > > > > fairly sure

  1   2   >