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) >> +++ gcc/c-family/c.opt (wo

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

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 SSA_NAME

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 .116t.reassoc1 for the c++ testcase is as >> fo

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 tree-ssa-rea

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. diff of .115t.dse2 and .116t.reassoc

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 this

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 931555dc7ab081ea7af1e4b

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

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: [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 gcc.dg/torture/pr72

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

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 === --- gcc/go/gofronte

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

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

2016-08-09 Thread David Malcolm
Successfully bootstrapped®rtested 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

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

[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®rtested on x86_64-pc-linux-gnu. OK for trunk? gcc/ChangeLog: * input.c (class selftest::temp_source_file): Move to selftest.h. (self

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 th

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 than on the FIELD_DECL

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 Bossch

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

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 +

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. Ian

<    1   2