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: 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: [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 (). >

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: 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: [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

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: [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 =

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

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 === ---

[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: [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

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: [PATCH/AARCH64] Improve ThunderX code generation slightly with load/store pair

2016-08-09 Thread Richard Earnshaw (lists)
On 08/08/16 18:48, Andrew Pinski wrote: > On Fri, Aug 5, 2016 at 12:18 AM, Andrew Pinski wrote: >> Hi, >> On ThunderX, load (and store) pair that does a pair of two word >> (32bits) load/stores is slower in some cases than doing two >> load/stores. For some internal

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: [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 11:20 AM, Yuri Rumyantsev wrote: > Yes it is impossible since all basic blocks are handled from outer > loops to innermost so we can not have the sequence with wrong > dependence, i.e. we cached that reference is independent (due to > safelen) but the

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

2016-08-09 Thread Marek Polacek
On Thu, Aug 04, 2016 at 10:47:27AM -0600, Jeff Law wrote: > On 08/04/2016 06:36 AM, Michael Matz wrote: > > Hi, > > > > 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

Re: [RFC][PR61839]Convert CST BINOP COND_EXPR to COND_EXPR ? (CST BINOP 1) : (CST BINOP 0)

2016-08-09 Thread Richard Biener
On Tue, Aug 9, 2016 at 4:51 AM, Kugan Vivekanandarajah wrote: > Hi Richard, > > Thanks for the review. > > On 29 April 2016 at 20:47, Richard Biener wrote: >> On Sun, Apr 17, 2016 at 1:14 AM, kugan >>

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: [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'

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: [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: 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

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: [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

[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: 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 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: [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: [PATCH] Fix ldist memset discovery with -0.0 (PR tree-optimization/72824)

2016-08-09 Thread Jakub Jelinek
On Tue, Aug 09, 2016 at 08:53:54AM +0200, Richard Biener wrote: > Hmm, I don't think we should see -0.0 as +0.0 with -fno-signed-zeros. > As far as I can see this is a memory load/store op and we may not > transform, say, > > double x = a[i]; > b[i] = x; > > into a copy that changes -0.0 to

Re: [PATCH] Fix ldist memset discovery with -0.0 (PR tree-optimization/72824)

2016-08-09 Thread Richard Biener
On Tue, 9 Aug 2016, Jakub Jelinek wrote: > On Tue, Aug 09, 2016 at 08:53:54AM +0200, Richard Biener wrote: > > Hmm, I don't think we should see -0.0 as +0.0 with -fno-signed-zeros. > > As far as I can see this is a memory load/store op and we may not > > transform, say, > > > > double x =

Re: [RFC] ipa bitwise constant propagation

2016-08-09 Thread Prathamesh Kulkarni
On 8 August 2016 at 19:33, Martin Jambor wrote: > Hi, > > thanks for following through. You'll need an approval from Honza, but > I think the code looks good (I have looked at the places that I > believe have changed since the last week). However, I have discovered > one new

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

2016-08-09 Thread Pedro Alves
On 08/06/2016 05:34 AM, ayush goel wrote: > On 5 August 2016 at 4:09:00 AM, Pedro Alves (pal...@redhat.com) wrote: >> On 08/02/2016 12:38 AM, Manuel López-Ibáñez wrote: >>> >>> If there is something wrong or missing, ideally we would like to know >>> so that Ayush can work on fixing it before the

RE: [PATCH] Fix (parts of) PR68273

2016-08-09 Thread Matthew Fortune
Richard Biener writes: > The following patch avoids overaligned types created from IPA parameter > replacement. It is said to help mipsel which still suffers from the > backend-looks-at-type-alignment-for-parameter-passing-ABI bug. > > Bootstrap and regtest pending on

Re: [PATCH] PR middle-end/21137: Folding if (((int)x >> 31) & 64) into if ((int)x < 0)

2016-08-09 Thread Richard Biener
On Mon, Aug 8, 2016 at 7:04 PM, Jeff Law wrote: > On 08/08/2016 05:58 AM, Marek Polacek wrote: >> >> On Mon, Aug 08, 2016 at 12:56:20PM +0100, Roger Sayle wrote: >>> >>> >>> The following patch is an attempt to finally fully close PR >>> middle-end/21137. >>> As explained in the

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

2016-08-09 Thread Uros Bizjak
Hello! 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 Attached patch fixes the failure by providing CLONE_NEWNET definition.

[RS6000] e500 part of pr71680

2016-08-09 Thread Alan Modra
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 tested this patch. OK to apply? PR target/71680 *

Re: [RFC] ipa bitwise constant propagation

2016-08-09 Thread Richard Biener
On Tue, 9 Aug 2016, Prathamesh Kulkarni wrote: > On 8 August 2016 at 19:33, Martin Jambor wrote: > > Hi, > > > > thanks for following through. You'll need an approval from Honza, but > > I think the code looks good (I have looked at the places that I > > believe have changed

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

2016-08-09 Thread Richard Biener
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 > alignment information. > > The attached patch

Re: [PATCH, COMMITTED] Add branch_changer.py script to maintainer-scripts

2016-08-09 Thread Gerald Pfeifer
On Wed, 3 Aug 2016, Martin Liška wrote: > I've installed (r239066) the script which is used by maintainers to > update PRs in a batch mode. I think it would be good to add a comment at the top that describes what the scripts does and how to invoke the script? Gerald

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: [Fortran, patch, pr71936, v1] [6/7 Regression] ICE in wide_int_to_tree, at tree.c:1487

2016-08-09 Thread Richard Biener
On Mon, Aug 8, 2016 at 11:58 AM, Andre Vehreschild wrote: > Hi Paul, > > thanks for the review. Committed to trunk as r239237. > > I will commit to gcc-6 in one week. If you want to catch the 6.2 release then please make sure to have it on the branch this Friday. Richard. >

Re: [RFC] [ipa bitwise cp] tree-ssa-ccp changes

2016-08-09 Thread Richard Biener
On Mon, 8 Aug 2016, Prathamesh Kulkarni wrote: > Hi Richard, > In the attached version, I tried to address your suggestions from: > https://gcc.gnu.org/ml/gcc-patches/2016-08/msg00279.html > > In ccp_finalize we do: > wide_int nonzero_bits = wide_int::from (val->mask, precision, >

Re: [testsuite] add require-effective-target c99_runtime for pr71078-*.c tests

2016-08-09 Thread Richard Biener
On Sat, 6 Aug 2016, Prathamesh Kulkarni wrote: > Hi Richard, > The patch for PR71078 broke the test-cases for arm and aarch64 bare > metal targets :/ > In the attached patch, restricting the tests to c99_runtime. > Sorry for the breakage. > Ok for trunk ? Ok. Richard. > Thanks, > Prathamesh >

Re: [PATCH] Fix ldist memset discovery with -0.0 (PR tree-optimization/72824)

2016-08-09 Thread Richard Biener
On Mon, 8 Aug 2016, Jakub Jelinek wrote: > Hi! > > Only +0.0 stores can be optimized into memset, -0.0 can't, so if we are > honoring signed zeros, we should make sure the constant is positive. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? Hmm, I don't think we

[PATCH] Fix PR 71802

2016-08-09 Thread Richard Biener
The following fixes a missed CFG cleanup opportunity (requiring its iteration) that ultimatively causes us to create a dead if-converted loop variant (discovered as dead by CFG cleanup run by ifcvt). The issue is that when removing unreachable code CFG cleanup does not schedule predecessors of

Re: [PATCH][expr.c] PR middle-end/71700: zero-extend sub-word value when widening constructor element

2016-08-09 Thread Richard Biener
On Fri, 5 Aug 2016, Kyrill Tkachov wrote: > > On 01/08/16 15:31, Kyrill Tkachov wrote: > > > > On 11/07/16 18:55, Bernd Schmidt wrote: > > > On 07/11/2016 04:52 PM, Kyrill Tkachov wrote: > > > > Based on that, I think that code block is a useful optimisation, we just > > > > need > > > > to

[PATCH 2/N] Fix usage of POW2 histogram

2016-08-09 Thread Martin Liška
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" Ready for trunk? Thanks, Martin >From 00aecc0dd74c4546a1882bdbbb0f66fbf39a5408 Mon Sep 17 00:00:00 2001 From: marxin

Re: [PATCH, LRA] PR71680, Reload of slow mems

2016-08-09 Thread Alan Modra
On Tue, Aug 02, 2016 at 11:02:56PM +0930, Alan Modra wrote: > This is a patch for a problem in lra, triggered by the rs6000 > backend not allowing SImode in floating point registers. Ping? https://gcc.gnu.org/ml/gcc-patches/2016-08/msg00113.html Note that to recreate the problem with the

Re: Set nonnull attribute to ptr_info_def based on VRP

2016-08-09 Thread Richard Biener
On Tue, Aug 9, 2016 at 12:58 AM, kugan wrote: > Hi Jakub, > > Thanks for the review. > > On 08/08/16 16:40, Jakub Jelinek wrote: >> >> On Mon, Aug 08, 2016 at 01:36:51PM +1000, kugan wrote: >>> >>> diff --git a/gcc/tree-ssanames.h b/gcc/tree-ssanames.h >>> index

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,

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: 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

[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: [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] 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]++; }

[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 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] 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: 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

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

[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: 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.

[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 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

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,

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

[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

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: 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

[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] 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

[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

[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] 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

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

[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

[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] 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] 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

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

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 > >> > +

[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: 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: 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

[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: [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: [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/ > *

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 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: 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) >

  1   2   >