Re: [PATCH, PR70700] Fix ICE in dump_pred_graph

2016-05-02 Thread Richard Biener
On Mon, 2 May 2016, Tom de Vries wrote: > Hi, > > this patch fixes PR70700, an ICE in tree-ssa-structalias.c:dump_pred_graph for > the test-case contained in the patch. > > In the constraint graph, a node representing a variable varinfo_t var is > represented as the corresponding var->id, rangin

Fix PR rtl-optimization/70886

2016-05-02 Thread Eric Botcazou
This is the bootstrap comparison failure on IA-64 after -frename-registers was enabled at -O2, but the issue has nothing to do with the pass. It comes from the speculation support in the scheduler, namely from estimate_dep_weak: /* Estimate the weakness of dependence between MEM1 and MEM2. */

Re: [Openacc] Adjust automatic loop partitioning

2016-05-02 Thread Jakub Jelinek
On Fri, Apr 29, 2016 at 10:00:43AM -0400, Nathan Sidwell wrote: > Jakub, > currently automatic loop partitioning assigns from the innermost loop > outwards -- that was the simplest thing to implement. A better algorithm is > to assign the outermost loop to the outermost available axis, and then >

[Ada] Minor cleanup 1/2

2016-05-02 Thread Eric Botcazou
This is a small refactoring of the handling of ranges of values. Tested on x86_64-suse-linux, applied on the mainline. 2016-05-02 Eric Botcazou * gcc-interface/trans.c (Range_to_gnu): New static function. (Raise_Error_to_gnu) : Call it to translate the range. (gnat_to

[Ada] Minor cleanup 2/2

2016-05-02 Thread Eric Botcazou
This consistently passes NULL_TREE as operand #2 of COMPONENT_REF and #3 of ARRAY_REF/ARRAY_RANGE_REF in gigi. There is no functional change since we never build them with these operands in the first place. Tested on x86_64-suse-linux, applied on the mainline. 2016-05-02 Eric Botcazou

Re: [PATCH, i386, PR target/70799, 1/2] Support constants in STV pass (DImode)

2016-05-02 Thread Uros Bizjak
On Fri, Apr 29, 2016 at 5:48 PM, H.J. Lu wrote: > On Fri, Apr 29, 2016 at 8:42 AM, Ilya Enkovich wrote: >> Hi, >> >> As the first part of PR70799 fix I'd like to add constants support for >> DI-STV pass (which is also related to PR70763). This patch adds CONST_INT >> support as insn operands and

[SH][committed] Remove *negnegt, *movtt patterns

2016-05-02 Thread Oleg Endo
Hi, The *negnegt, *movtt patterns seem to have no effect anymore. Removing them doesn't show any changes in the CSiBE set and the known related test cases in the testsuite pass. Tested on sh-elf with make -k check RUNTESTFLAGS="--target_board=sh-sim\{-m2/-ml,-m2/-mb, -m2a/-mb,-m4/-ml,-m4/-mb,-m

Re: Move "X +- C1 CMP C2 to X CMP C2 -+ C1" to match.pd

2016-05-02 Thread Richard Biener
On Fri, Apr 29, 2016 at 7:36 PM, Marc Glisse wrote: > On Fri, 29 Apr 2016, Richard Biener wrote: > >> Another option is to move the enum declaration from flag-types.h to >> coretypes.h. I think I like that best. > > > This works. Ok. Thanks, Richard. > 2016-05-02 Marc Glisse > > gcc/ >

Re: [PATCH] Fix spec-options.c test case

2016-05-02 Thread Dominik Vogt
On Sun, May 01, 2016 at 07:52:40AM +, Bernd Edlinger wrote: > I took a closer look at this test case, and I found, except that > it triggers a dejagnu bug, it is also wrong. I have tested with > a cross-compiler for target=sh-elf and found that the test case > actually FAILs because the foo.sp

Re: Canonicalize X u< X to UNORDERED_EXPR

2016-05-02 Thread Richard Biener
On Sat, Apr 30, 2016 at 8:44 PM, Marc Glisse wrote: > Hello, > > this case seemed to be missing in the various X cmp X transformations. It > does not change the generated code in the testcase. > > The missing :c is rather trivial. I can commit it separately if you prefer. I think it's not missing

Re: [PATCH] Fix PR tree-optimization/51513

2016-05-02 Thread Richard Biener
On Fri, Apr 29, 2016 at 2:09 PM, Peter Bergner wrote: > On Fri, 2016-04-29 at 11:56 +0200, Richard Biener wrote: >> Your testcase passes '2' where it passes just fine. If I pass 3 as which >> I indeed get an abort () but you can't reasonably expect it to return 13 >> then. > > Bah, I added an ex

Re: Support <, <=, > and >= for offset_int and widest_int

2016-05-02 Thread Richard Biener
On Fri, Apr 29, 2016 at 2:26 PM, Richard Sandiford wrote: > offset_int and widest_int are supposed to be at least one bit wider > than all the values they need to represent, with the extra bits > being signs. Thus offset_int is effectively int128_t and widest_int > is effectively intNNN_t, for ta

Re: [PATCH, i386, PR target/70799, 1/2] Support constants in STV pass (DImode)

2016-05-02 Thread Uros Bizjak
On Fri, Apr 29, 2016 at 5:42 PM, Ilya Enkovich wrote: > Hi, > > As the first part of PR70799 fix I'd like to add constants support for > DI-STV pass (which is also related to PR70763). This patch adds CONST_INT > support as insn operands and extends cost model accordingly. > > Bootstrapped and re

Re: Add a wi::to_wide helper function

2016-05-02 Thread Richard Biener
On Fri, Apr 29, 2016 at 2:32 PM, Richard Sandiford wrote: > As Richard says, we ought to have a convenient way of converting > an INTEGER_CST to a wide_int of a particular precision without > having to extract the sign of the INTEGER_CST's type each time. > This patch adds a wi::to_wide helper for

Re: Simplify cst_and_fits_in_hwi

2016-05-02 Thread Richard Biener
On Fri, Apr 29, 2016 at 2:34 PM, Richard Sandiford wrote: > While looking at the use of cst_and_fits_in_hwi in tree-ssa-loop-ivopts.c, > I had difficulty working out what the function actually tests. The > final NUNITS check seems redundant, since it asks about the number of > HWIs in the _unexte

Re: Support << and >> for offset_int and widest_int

2016-05-02 Thread Richard Biener
On Fri, Apr 29, 2016 at 2:30 PM, Richard Sandiford wrote: > Following on from the comparison patch, I think it makes sense to > support << and >> for offset_int (int128_t) and widest_int (intNNN_t), > with >> being arithmetic shift. It doesn't make sense to use > logical right shift on a potentia

Re: [PATCH GCC]Proving no-trappness for array ref in tree if-conv using loop niter information.

2016-05-02 Thread Richard Biener
On Fri, Apr 29, 2016 at 5:05 PM, Bin.Cheng wrote: > On Fri, Apr 29, 2016 at 12:16 PM, Richard Biener > wrote: >> On Thu, Apr 28, 2016 at 2:56 PM, Bin Cheng wrote: >>> Hi, >>> Tree if-conversion sometimes cannot convert conditional array reference >>> into unconditional one. Root cause is GCC c

Re: [PATCH GCC]Do more tree if-conversions by handlding PHIs with more than two arguments.

2016-05-02 Thread Richard Biener
On Fri, Apr 29, 2016 at 5:51 PM, Bin.Cheng wrote: > On Thu, Apr 28, 2016 at 10:18 AM, Richard Biener > wrote: >> On Wed, Apr 27, 2016 at 5:49 PM, Bin Cheng wrote: >>> Hi, >>> Currently tree if-conversion only supports PHIs with no more than two >>> arguments unless the loop is marked with "simd

RE: [PATCHv2 0/7] ARC: Add support for nps400 variant

2016-05-02 Thread Claudiu Zissulescu
Please also consider to address also the following warnings introduced: mainline/gcc/gcc/config/arc/arc.md:888: warning: source missing a mode? mainline/gcc/gcc/config/arc/arc.md:906: warning: source missing a mode? mainline/gcc/gcc/config/arc/arc.md:921: warning: source missing a mode? mainline/g

Re: [PATCH GCC]Don't clobber cbase when computing iv_use cost.

2016-05-02 Thread Richard Biener
On Fri, Apr 29, 2016 at 5:55 PM, Bin Cheng wrote: > Hi, > This fixes a latent bug I introduced. Variable "cbase" shouldn't be modified > since it will be used afterwards. Bootstrap and test on x86_64. I think > it's an obvious change, is it OK? Ok. Richard. > Thanks, > bin > > 2016-04-28

Re: [PATCH GCC]Check depends_on before recording invariant expressions

2016-05-02 Thread Richard Biener
On Fri, Apr 29, 2016 at 6:04 PM, Bin Cheng wrote: > Hi, > This patch fixes a latent bug in IVOPT. Variable "depends_on" should be > checked before recording invariant expression, otherwise we end up with > constant (even ZERO) invariant expressions. Apparently this results in wrong > register

[Ada] Fix bug on Get_Line when incomplete last line in file

2016-05-02 Thread Arnaud Charlet
It may occur in some occasions that Get_Line incorrectly sets its Last parameter to one past the correct value. This can only occur when the line being copied is the last line of the file, and does not contain the newline character. Tested on x86_64-pc-linux-gnu, committed on trunk 2016-05-02 Ya

Re: [PATCH][GCC7] Remove scaling of COMPONENT_REF/ARRAY_REF ops 2/3

2016-05-02 Thread Eric Botcazou
> The following experiment resulted from looking at making > array_ref_low_bound and array_ref_element_size non-mutating. Again > I wondered why we do this strange scaling by offset/element alignment. The idea is to expose the alignment factor to the RTL expander: tree tem = ge

Re: Canonicalize X u< X to UNORDERED_EXPR

2016-05-02 Thread Marc Glisse
On Mon, 2 May 2016, Richard Biener wrote: On Sat, Apr 30, 2016 at 8:44 PM, Marc Glisse wrote: Hello, this case seemed to be missing in the various X cmp X transformations. It does not change the generated code in the testcase. The missing :c is rather trivial. I can commit it separately if y

[Ada] Spurious error on container "of" loop

2016-05-02 Thread Arnaud Charlet
This patch modifies the implementation of container indexing to inspect the base type of the container in case the container is a subtype. No simple reproducer found. Tested on x86_64-pc-linux-gnu, committed on trunk 2016-05-02 Hristian Kirtchev * sem_ch4.adb (Find_Indexing_Operations

[Ada] Race condition in allocator with finalization

2016-05-02 Thread Arnaud Charlet
This patch fixes a race condition in an allocator for a type that needs finalization. The race condition is unlikely to occur in practice; it occurs when the allocator is in a Finalize that occurs after the corresponding master has already started its finalization. Finalize operations often dealloc

[Ada] Error in handling of convention of formal parameter

2016-05-02 Thread Arnaud Charlet
This patch fixes an error in the determination of the convention to be used for a formal parameter, when the corresponding type carries a convention pragma. Executing: gcc -c p.ads -gnatRm must yield: Representation information for unit P (spec) for Rec'Size use 1024; for Rec'Alignment use 1;

[Ada] Representation information for nested subprograms

2016-05-02 Thread Arnaud Charlet
With this patch the representation information generated with the -gnatR compilation switch includes information on subprograms nested within subprogram bodies. Executing gcc -c -gnatRm p.adb must yield; --- Representation information for unit P (body) procedure inner declared at p.adb:9:1

[Ada] Fix Ada.Directories.Delete_Tree not to change current directory

2016-05-02 Thread Arnaud Charlet
... which is very unfriendly to tasking programs, where a task running Delete_Tree could cause a unexpected change of current directory in another task running concurrently. The program below is expected to display No directory change observed -- with Ada.Text_IO; use Ada.Text_IO; with Ada.Di

[PATCH][Committed] [ARC] Fix warnings, update source code.

2016-05-02 Thread Claudiu Zissulescu
Small syntactic fixes. Committed as obvious. Best, Claudiu include/ 2016-05-02 Claudiu Zissulescu * config/arc/arc.c (arc_preferred_simd_mode): Remove enum keyword. (arc_save_restore): Likewise. (arc_dwarf_register_span): Likewise. (arc_output_pic_addr_const):

Re: Support << and >> for offset_int and widest_int

2016-05-02 Thread Richard Sandiford
"H.J. Lu" writes: > On Fri, Apr 29, 2016 at 5:30 AM, Richard Sandiford > wrote: >> Following on from the comparison patch, I think it makes sense to >> support << and >> for offset_int (int128_t) and widest_int (intNNN_t), >> with >> being arithmetic shift. It doesn't make sense to use >> logica

Re: [PATCH][GCC7] Remove scaling of COMPONENT_REF/ARRAY_REF ops 2/3

2016-05-02 Thread Richard Biener
On Mon, 2 May 2016, Eric Botcazou wrote: > > The following experiment resulted from looking at making > > array_ref_low_bound and array_ref_element_size non-mutating. Again > > I wondered why we do this strange scaling by offset/element alignment. > > The idea is to expose the alignment factor t

Re: Canonicalize X u< X to UNORDERED_EXPR

2016-05-02 Thread Richard Biener
On Mon, May 2, 2016 at 11:18 AM, Marc Glisse wrote: > On Mon, 2 May 2016, Richard Biener wrote: > >> On Sat, Apr 30, 2016 at 8:44 PM, Marc Glisse wrote: >>> >>> Hello, >>> >>> this case seemed to be missing in the various X cmp X transformations. It >>> does not change the generated code in the t

Re: [PATCH][genrecog] Fix warning about potentially uninitialised use of label

2016-05-02 Thread Richard Sandiford
Kyrill Tkachov writes: > Hi all, > > I'm getting a warning when building genrecog that 'label' may be used > uninitialised in: > >uint64_t label = 0; > >if (d->test.kind == rtx_test::CODE >&& d->if_statement_p (&label) >&& label == CONST_INT) > > This is because if_

Re: Fix PR rtl-optimization/70886

2016-05-02 Thread Bernd Schmidt
On 05/02/2016 09:12 AM, Eric Botcazou wrote: The pointer comparison is not stable for VALUEs when cselib is used (this is the business of canonical cselib values). I tried rtx_equal_for_cselib_p here but this doesn't work because there are dangling VALUEs during scheduling (VALUEs whose associat

[PATCH, i386]: Merge FP ops patterns

2016-05-02 Thread Uros Bizjak
Hello! 2016-05-02 Uros Bizjak * config/i386/predicates.md (nonimm_ssenomem_operand): New predicate. (register_mixssei387nonimm_operand): Remove predicate. * config/i386/i386.md (*fop__comm): Merge from *fop__comm_mixed and *fop__comm_i387. Disable unsupported alternatives

[Ada] Correctly set Last when calling Text_IO.Get_Line on empty string

2016-05-02 Thread Arnaud Charlet
Ada RM requires that procedure Text_IO_Get_Line sets Last to Item'First - 1 when parameter Item is the empty string, which was not performed until now. Tested on x86_64-pc-linux-gnu, committed on trunk 2016-05-02 Yannick Moy * a-tigeli.adb (Get_Line): Always set Last prior to returnin

libgomp: In OpenACC testing, cycle though $offload_targets, and by default only build for the offload target that we're actually going to test (was: check-target-libgomp wall time, without vs. with of

2016-05-02 Thread Thomas Schwinge
Hi Jakub! On Fri, 29 Apr 2016 09:43:41 +0200, Jakub Jelinek wrote: > On Thu, Apr 28, 2016 at 12:43:43PM +0200, Thomas Schwinge wrote: > > commit 3b521f3e35fdb4b320e95b5f6a82b8d89399481a > > Author: Thomas Schwinge > > Date: Thu Apr 21 11:36:39 2016 +0200 > > > > libgomp: Unconfuse offload

[Ada] Undefined symbol with interface types

2016-05-02 Thread Arnaud Charlet
Compiling with optimizations enabled the linker may report undefined symbols of the form "xxxTs" associated with types that implement interface types. This issue was introduced on 2016-01-16 as part of improving the support of subprograms that are inlined across units with optimization. No small r

[Ada] Predicate checks when Assertion policy is Ignore

2016-05-02 Thread Arnaud Charlet
This patch implements the proper semantics of predicated subtypes in various contexts when the assertion policy is Ignore. This affects the semantics of case constructs and object declarations when values that do not satisfy the predicate are present. Tested in ACATS 4.0J tests C54003 and C457005

[Ada] Handling of attribute definition clauses for ASIS with GNSA

2016-05-02 Thread Arnaud Charlet
This patch introduces new switch -gnatd.H to enabled ASIS_GNSA mode. When active, this mode disabled the call to gigi. In addition, the patch suppresses various error checks with respect to attribute definition clauses in ASIS mode. -- Source -- -- clauses.ads package

[Ada] Optimization of anonymous access-to-controlled types

2016-05-02 Thread Arnaud Charlet
This patch modifies the creation of finalization masters for anonymous access- to-controlled types. Prior to this change, each compilation unit utilized a single heterogeneous finalization master to service all allocations where the associated type is anonymous access-to-controlled. This patch remo

Re: Fix PR rtl-optimization/70886

2016-05-02 Thread Eric Botcazou
> Dangling as in it has a null VAL_PTR because it was decided it's useless? Yes, discard_useless_values was invoked on it and the VALUE had not been preserved (no VALUE is preserved during scheduling). But it's referenced in the address of a MEM present in one of the lists maintained by the sch

[Ada] Minimize internally built wrappers of protected types

2016-05-02 Thread Arnaud Charlet
This patch minimizes the generation of wrappers of protected type dispatching primitives since they may cause reporting spurious ambiguity in correct code. After this patch the following test compiles without errors: package Ambig is type Lim_Iface is limited interface; type Prot is synchro

Re: [PATCH] Fix spec-options.c test case

2016-05-02 Thread Bernd Schmidt
On 05/01/2016 09:52 AM, Bernd Edlinger wrote: Hi, I took a closer look at this test case, and I found, except that it triggers a dejagnu bug, it is also wrong. I have tested with a cross-compiler for target=sh-elf and found that the test case actually FAILs because the foo.specs uses "cppruntim

[C PATCH] Fix ICE-on-invalid with enum forward declaration (PR c/70851)

2016-05-02 Thread Marek Polacek
Here, the problem was that we weren't diagnosing invalid code when an array dimension was of incomplete enum type. That led to an ICE in gimplifier. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2016-05-02 Marek Polacek PR c/70851 * c-decl.c (grokdeclarator): Diagnose

[Ada] Crash on inlined call to subprogram declared in package instance

2016-05-02 Thread Arnaud Charlet
This patch fixes a compiler crash on an inlined call in a nested instantiation when the corresponding generic unit has aspect specifications. The following must compile quietly: gcc -c inst.ads -gnatn -O --- with Pointer; package Inst is package I is new Pointer (Integer); end; --- package

[Ada] Speed up memory management

2016-05-02 Thread Arnaud Charlet
This patch speeds up "new" and Unchecked_Deallocation in simple cases. No change in behavior; no test available. Tested on x86_64-pc-linux-gnu, committed on trunk 2016-05-02 Bob Duff * s-memory.adb (Alloc, Realloc): Move checks for Size = 0 or size_t'Last into the Result = Sys

[Ada] Remove spurious accessibility check for aggregate component

2016-05-02 Thread Arnaud Charlet
This patch removes an accessibility check that was improperly applied, via a type conversion, to an an operand that is an access parameter that also requires a non-null check. Test in ACATS 4.0K C3A0030. Tested on x86_64-pc-linux-gnu, committed on trunk 2016-05-02 Ed Schonberg * sem_

[Ada] Crash on illegal allocator for limited type.

2016-05-02 Thread Arnaud Charlet
This patch fixes a compiler crash on an allocator for an object of a limited type, when the expression of the qualified expression is a type conversion. Compiling bug1.adb must yield: bug1.adb:29:08: illegal expression for initialized allocator of a limited type (RM 7.5 (2.7/2)) --- pragma Ada_

Re: [PATCH 2/4] PR c++/62314: add fixit hint for "expected ';' after class definition"

2016-05-02 Thread Bernd Schmidt
On 04/28/2016 04:28 PM, David Malcolm wrote: whereas clang reportedly emits: test.c:2:12: error: expected ';' after struct struct a {} ^ ; (note the offset of the location, and the fix-it hint) The following patch gives us the latter, more readable output. Huh. On

Re: [C PATCH] Fix ICE-on-invalid with enum forward declaration (PR c/70851)

2016-05-02 Thread Bernd Schmidt
On 05/02/2016 12:27 PM, Marek Polacek wrote: Here, the problem was that we weren't diagnosing invalid code when an array dimension was of incomplete enum type. That led to an ICE in gimplifier. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2016-05-02 Marek Polacek PR c/70

Re: [PATCH #2], Fix _Complex when there are multiple FP types the same size

2016-05-02 Thread Bernd Schmidt
On 04/30/2016 06:00 PM, Segher Boessenkool wrote: On Fri, Apr 29, 2016 at 04:51:27PM -0400, Michael Meissner wrote: 2016-04-29 Michael Meissner * config/rs6000/rs6000.c (rs6000_hard_regno_nregs_internal): Add support for __float128 complex datatypes. (rs6000_hard_regn

Re: [PATCH v2] [libatomic] Add RTEMS support

2016-05-02 Thread Sebastian Huber
If nobody objects, I will back port this to GCC 6 next Monday. On 20/04/16 14:40, Joel Sherrill wrote: As the other RTEMS target maintainer. I second the request. --joel On Apr 20, 2016 7:35 AM, "Sebastian Huber" > wrote: Hello, I know th

Re: Enabling -frename-registers?

2016-05-02 Thread Uros Bizjak
Hello! > On 04/17/2016 08:59 PM, Jeff Law wrote: > >> invoke.texi has an independent list (probably incomplete! ;( of all the >> things that -O2 enables. Make sure to add -frename-registers to that >> list and this is Ok for the trunk (gcc-7). > > This is what I committed. The patch introduced b

Re: Enabling -frename-registers?

2016-05-02 Thread Bernd Schmidt
On 05/02/2016 01:12 PM, Uros Bizjak wrote: On 04/17/2016 08:59 PM, Jeff Law wrote: invoke.texi has an independent list (probably incomplete! ;( of all the things that -O2 enables. Make sure to add -frename-registers to that list and this is Ok for the trunk (gcc-7). This is what I committed

Re: Enabling -frename-registers?

2016-05-02 Thread Uros Bizjak
On Mon, May 2, 2016 at 1:15 PM, Bernd Schmidt wrote: > On 05/02/2016 01:12 PM, Uros Bizjak wrote: > >>> On 04/17/2016 08:59 PM, Jeff Law wrote: >>> invoke.texi has an independent list (probably incomplete! ;( of all the things that -O2 enables. Make sure to add -frename-registers to tha

RE: [PATCH 6/6] [ARC] Various instruction pattern fixes

2016-05-02 Thread Claudiu Zissulescu
> > gcc/ > > 2016-04-18 Claudiu Zissulescu > > > > * config/arc/arc.md (mulsidi3): Change operand 0 predicate to > > register_operand. > > (umulsidi3): Likewise. > > (indirect_jump): Fix jump instruction assembly patterns. > > (arcset): Change operand 1 predicate to > nonmemo

Re: Avoid NULL cfun ICE in gcc/config/nvptx/nvptx.c:nvptx_libcall_value

2016-05-02 Thread Thomas Schwinge
Hi! On Thu, 28 Apr 2016 13:42:39 +0200, Bernd Schmidt wrote: > On 04/28/2016 01:15 PM, Alexander Monakov wrote: > > So if my understanding is correct, additional !cfun check can be acceptable > > as > > a fix along the existing hack. Perhaps with a note about the nature of the > > hack. > > Ye

[testuite,AArch64] Make scan for 'br' more robust

2016-05-02 Thread Christophe Lyon
Hi, I've noticed a "regression" of AArch64's noplt_3.c in the gcc-6-branch because my validation script adds the branch name to gcc/REVISION. As a result scan-assembler-times "br" also matched "gcc-6-branch", hence the failure. The small attached patch replaces "br" by "br\t" to fix the problem.

Re: Enabling -frename-registers?

2016-05-02 Thread Uros Bizjak
On Mon, May 2, 2016 at 1:21 PM, Uros Bizjak wrote: On 04/17/2016 08:59 PM, Jeff Law wrote: > invoke.texi has an independent list (probably incomplete! ;( of all the > things that -O2 enables. Make sure to add -frename-registers to that > list and this is Ok for the trunk (g

Re: [PATCH] Fix PR tree-optimization/51513

2016-05-02 Thread Peter Bergner
On Mon, 2016-05-02 at 10:49 +0200, Richard Biener wrote: > Again, the wild jump is not a bug but at most a missed optimization > (to remove it). Sorry, came down with a cold and haven't looked into this yet. I'll do that today. I agree it's a missed optimization bug. We noticed this with a post c

[ada, build] Fix make install-gcc-specs with empty GCC_SPEC_FILES

2016-05-02 Thread Rainer Orth
Installing gcc 6.1.0 on Solaris 10 with /bin/ksh failed for install-gcc-specs (I'd already seen that for 5.1.0, but forgotten about it): make[3]: Entering directory `/var/gcc/gcc-6.1.0/10-gcc-gas/gcc/ada' for f in ; do \ cp -p /vol/src/gnu/gcc/gcc-6.1.0/gcc/ada/$f \ /vol/gc

Re: [ada, build] Fix make install-gcc-specs with empty GCC_SPEC_FILES

2016-05-02 Thread Arnaud Charlet
> Installing gcc 6.1.0 on Solaris 10 with /bin/ksh failed for > install-gcc-specs (I'd already seen that for 5.1.0, but forgotten about > it): > > make[3]: Entering directory `/var/gcc/gcc-6.1.0/10-gcc-gas/gcc/ada' > for f in ; do \ > cp -p /vol/src/gnu/gcc/gcc-6.1.0/gcc/ada/$f \ >

Re: Thoughts on memcmp expansion (PR43052)

2016-05-02 Thread Richard Biener
On Thu, Apr 28, 2016 at 8:36 PM, Bernd Schmidt wrote: > On 01/18/2016 10:22 AM, Richard Biener wrote: >> >> See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52171 - the >> inline expansion >> for small sizes and equality compares should be done on GIMPLE. Today the >> strlen pass might be an

Re: Thoughts on memcmp expansion (PR43052)

2016-05-02 Thread Bernd Schmidt
On 05/02/2016 02:52 PM, Richard Biener wrote: +struct pieces_addr +{ ... + void *m_cfndata; +public: + pieces_addr (rtx, bool, by_pieces_constfn, void *); unless you strick private: somewhere the public: is redundant Yeah, ideally I want to turn these into a classes rather than structs. May

Re: Thoughts on memcmp expansion (PR43052)

2016-05-02 Thread Richard Biener
On Mon, May 2, 2016 at 2:57 PM, Bernd Schmidt wrote: > On 05/02/2016 02:52 PM, Richard Biener wrote: >> >> +struct pieces_addr >> +{ >> ... >> + void *m_cfndata; >> +public: >> + pieces_addr (rtx, bool, by_pieces_constfn, void *); >> >> unless you strick private: somewhere the public: is redunda

Re: Enabling -frename-registers?

2016-05-02 Thread Bernd Schmidt
On 05/02/2016 01:57 PM, Uros Bizjak wrote: With the referred testcase, the compare-debug failure trips on (debug_insn 101) Ok, INDEX_REG_CLASS is NO_REGS on alpha, and apparently the contents of the MEM isn't a valid address. Try this? Bernd Index: gcc/regrename.c

Re: Enabling -frename-registers?

2016-05-02 Thread Jeff Law
On 04/29/2016 07:32 AM, Bernd Schmidt wrote: On 04/29/2016 03:02 PM, David Edelsohn wrote: How has this show general benefit for all architectures to deserve enabling it by default at -O2? It should improve postreload scheduling in general, and it can also help clear up bad code generation lef

[libvtv, build] Don't install libvtv without --enable-vtable-verify

2016-05-02 Thread Rainer Orth
When installing gcc 6.1.0 on Solaris 12, installation failed in libvtv: libtool: install: /usr/gnu/bin/install -c .libs/libvtv.lai /var/gcc/gcc-6.1.0/12-gcc-gas/install/vol/gcc-6/lib/amd64/libvtv.la libtool: install: /usr/gnu/bin/install -c .libs/libvtv.a /var/gcc/gcc-6.1.0/12-gcc-gas/install/vo

Re: [PATCH, rs6000] Add support for int versions of vec_adde

2016-05-02 Thread Andreas Schwab
Bill Seurer writes: > * gcc.target/powerpc/vec-adde.c: New test. > * gcc.target/powerpc/vec-adde-int128.c: New test. -m32: FAIL: gcc.target/powerpc/vec-adde.c execution test FAIL: gcc.target/powerpc/vec-adde-int128.c (test for excess errors) Excess errors: /daten/gcc/gcc-20160501/gcc/testsuite/

PING: [PATCH] PR target/70454: Build x86 libgomp with -march=i486 or better

2016-05-02 Thread H.J. Lu
On Mon, Apr 25, 2016 at 1:36 PM, H.J. Lu wrote: > If x86 libgomp isn't compiled with -march=i486 or better, append > -march=i486 XCFLAGS for x86 libgomp build. > > Tested on i686 with and without --with-arch=i386. Tested on > x86-64 with and without --with-arch_32=i386. OK for trunk? > > > H.J.

Re: [PATCH] Drop excess size used for run time allocated stack variables.

2016-05-02 Thread Dominik Vogt
> static rtx > -round_push (rtx size) > +round_push (rtx size, int already_added) round_push also needs to know about the required alignment in case that is more strict than a simple stack slot alignment. > { > - rtx align_rtx, alignm1_rtx; > + rtx align_rtx, add_rtx; > >if (!SUPPORTS_S

Re: [PATCH] Fix spec-options.c test case

2016-05-02 Thread Bernd Edlinger
On 02.05.2016 12:26, Bernd Schmidt wrote: > On 05/01/2016 09:52 AM, Bernd Edlinger wrote: >> Hi, >> >> I took a closer look at this test case, and I found, except that >> it triggers a dejagnu bug, it is also wrong. I have tested with >> a cross-compiler for target=sh-elf and found that the test c

[PATCH] [ARC] Use GOTOFFPC relocation for pc-relative accesses.

2016-05-02 Thread Claudiu Zissulescu
This patch makes the pc-relative access to be more safe by using @pcl syntax. This new syntax generates a pc-relative relocation which will be handled by assembler. OK to apply? Claudiu gcc/ 2016-05-02 Claudiu Zissulescu Joern Rennecke * config/arc/arc.c (arc_print_opera

Re: [PATCH] Fix PR target/70669 (allow __float128 to use direct move)

2016-05-02 Thread Andreas Schwab
Michael Meissner writes: > PR target/70669 > * gcc.target/powerpc/pr70669.c: New test. FAIL: gcc.target/powerpc/pr70669.c scan-assembler mtvsrd FAIL: gcc.target/powerpc/pr70669.c scan-assembler-times stxvd2x 1 foo: .quad .L.foo,.TOC.@tocbase,0 .previous .ty

Re: [PATCH] Fix spec-options.c test case

2016-05-02 Thread Bernd Schmidt
On 05/02/2016 03:43 PM, Bernd Edlinger wrote: Yes, you are right. Only the original use-case seems to be sh-superh-elf specific. But there are also spec strings that are always available. I think adding -DFOO to "cpp_unique_options" will work on any target, and make the test case even more use

Re: [PATCH] Drop excess size used for run time allocated stack variables.

2016-05-02 Thread Jeff Law
On 04/29/2016 04:12 PM, Dominik Vogt wrote: The attached patch removes excess stack space allocation with alloca in some situations. Plese check the commit message in the patch for details. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany 0001-ChangeLog gcc/ChangeLog * explow.c

Re: [PATCH][genrecog] Fix warning about potentially uninitialised use of label

2016-05-02 Thread Jeff Law
On 05/02/2016 03:47 AM, Richard Sandiford wrote: Kyrill Tkachov writes: Hi all, I'm getting a warning when building genrecog that 'label' may be used uninitialised in: uint64_t label = 0; if (d->test.kind == rtx_test::CODE && d->if_statement_p (&label) && label ==

Re: [PATCH] c++/66561 - __builtin_LINE at al. should yield constant expressions

2016-05-02 Thread Jeff Law
On 04/29/2016 01:32 PM, Jason Merrill wrote: On 04/26/2016 07:59 PM, Martin Sebor wrote: * builtins.c (fold_builtin_FILE): New function. (fold_builtin_FUNCTION, fold_builtin_LINE): New functions. (fold_builtin_0): Call them. Can we now remove the handling for these built-ins from g

Fix for PR70909 in Libiberty Demangler (4)

2016-05-02 Thread Marcel Böhme
Hi, This fixes several stack overflows due to infinite recursion in d_print_comp (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70909). The method d_print_comp in cp-demangle.c recursively constructs the d_print_info dpi from the demangle_component dc. The method d_print_comp_inner traverses dc

Re: [PATCH] Clean up tests where a later dg-do completely overrides another.

2016-05-02 Thread Jeff Law
On 04/29/2016 05:56 PM, Dominik Vogt wrote: Yeah, sorry, I really should have mentioned this but forgot about it. It's a bug in DejaGnu. When it encounters a conditional dg-do and the condition does not match, it *still* replaces the do-action of a prior dg-do with the current one. With DejaG

Re: [libvtv, build] Don't install libvtv without --enable-vtable-verify

2016-05-02 Thread Jeff Law
On 05/02/2016 07:33 AM, Rainer Orth wrote: When installing gcc 6.1.0 on Solaris 12, installation failed in libvtv: libtool: install: /usr/gnu/bin/install -c .libs/libvtv.lai /var/gcc/gcc-6.1.0/12-gcc-gas/install/vol/gcc-6/lib/amd64/libvtv.la libtool: install: /usr/gnu/bin/install -c .libs/libvt

Re: [patch] cleanups for vtable-verify

2016-05-02 Thread Jeff Law
On 05/01/2016 07:34 AM, Steven Bosscher wrote: Hello, This patch is random cleanups on the vtable-verify code. OK for trunk? Ciao! Steven gcc/ * vtable-verify.h (verify_vtbl_ptr_fndecl): Add GTY markers. (num_vtable_map_nodes): Remove extern declaration. (vtbl_mangled_name_ty

Re: [PATCH][CilkPlus] Merge libcilkrts from upstream

2016-05-02 Thread Jeff Law
On 04/29/2016 05:36 AM, Ilya Verbin wrote: Hi! This patch brings the latest libcilkrts from upstream. Regtested on i686-linux and x86_64-linux. Abidiff: Functions changes summary: 0 Removed, 1 Changed (16 filtered out), 2 Added functions Variables changes summary: 0 Removed, 0 Changed (1 filte

Re: [PATCH] Re-use cc1-checksum.c for stage-final

2016-05-02 Thread Jeff Law
On 04/29/2016 05:36 AM, Richard Biener wrote: On Thu, 28 Apr 2016, Jeff Law wrote: On 04/28/2016 02:49 AM, Richard Biener wrote: The following prototype patch re-uses cc1-checksum.c from the previous stage when compiling stage-final. This eventually allows to compare cc1 from the last two st

[committed] Fix internal-fn handling in ipa-pure-const.c (PR rtl-optimization/70467)

2016-05-02 Thread Jakub Jelinek
Hi! During testing of my PR70467 patch I've run into execute/va-arg-13.c miscompilation, caused by ipa-pure-const.c in ipa mode saying a function using VA_ARG internal function is pure - it might not be, e.g. on x86_64 where va_list is [1] array of struct and is passed to this "pure" function, it

Re: [PATCH] Clean up tests where a later dg-do completely overrides another.

2016-05-02 Thread Dominik Vogt
On Mon, May 02, 2016 at 09:29:50AM -0600, Jeff Law wrote: > On 04/29/2016 05:56 PM, Dominik Vogt wrote: > > ... > >Maybe a comment should be added to the test case > > > > /* If this test is *run* (not just compiled) and therefore fails > > on non sh*-targets, this is because of a bug older De

[PATCH] Improve add/sub TImode double word splitters (PR rtl-optimization/70467)

2016-05-02 Thread Jakub Jelinek
On Fri, Apr 01, 2016 at 08:29:17PM +0200, Uros Bizjak wrote: > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for stage1 > > (while the previous patch looks simple enough that I'd like to see it in > > 6.x, this one IMHO can wait). > > Yes, please. This is not a regression. So, I'm r

[PATCH] Allow arg promotion in gimple_builtin_call_types_compatible_p (PR target/49244)

2016-05-02 Thread Jakub Jelinek
Hi! Most of the builtins don't pass arguments in char/short types, except for some sync/atomic builtins, some sanitizer builtins and TM builtins. On targets where targetm.calls.promote_prototypes returns true (e.g. always on x86_64/i686), unfortunately this means that gimple_call_builtin_p often r

[PATCH] Optimize bit test and * atomics into lock; bt[src] (PR target/49244)

2016-05-02 Thread Jakub Jelinek
Hi! This patch adds pattern recognition (see attached testcase on what it e.g. can handle) of the i?86/x86_64 lock; bt[src] operations. It is too late to do this during or after RTL expansion, so it is done late during gimple, by recognizing these sequences in the fold builtins pass, turning those

Re: [PATCH] Improve add/sub TImode double word splitters (PR rtl-optimization/70467)

2016-05-02 Thread Bernd Schmidt
2016-05-02 Jakub Jelinek PR rtl-optimization/70467 * cse.c (cse_insn): Handle no-op MEM moves after folding. * gcc.target/i386/pr70467-1.c: New test. I seem to have a memory of acking this before. Certainly looks OK. Bernd

Re: [PATCH] Better location info for "incomplete type" error msg (PR c/70756)

2016-05-02 Thread Marek Polacek
On Fri, Apr 29, 2016 at 04:04:13PM -0400, Jason Merrill wrote: > On 04/28/2016 11:59 AM, Marek Polacek wrote: > > 3) for the C++ FE I used a macro so that I don't have to change all the > > cxx_incomplete_type_error calls now, > > How about an inline overload, instead? I realized the macro w

Re: Inline across -ffast-math boundary

2016-05-02 Thread Jan Hubicka
> On Thu, 21 Apr 2016, Jan Hubicka wrote: > > > Hi, > > this patch implements the long promised logic to inline across -ffast-math > > boundary when eitehr caller or callee has no fp operations in it. This is > > needed to resolve code quality regression on Firefox with LTO where > > -O3/-O2/-Ofa

Re: Fix for PR70498 in Libiberty Demangler

2016-05-02 Thread Bernd Schmidt
On 05/01/2016 06:24 PM, Marcel Böhme wrote: Please attach it (text/plain) instead. Done. That still seemed to be inlined, but I managed to apply this version. Committed. Bernd

Re: Inline across -ffast-math boundary

2016-05-02 Thread Marek Polacek
On Mon, May 02, 2016 at 07:01:38PM +0200, Jan Hubicka wrote: > This patch impleemnts the suggested check for presence of FP parameters. > We can play with special casing the moves incrementally. This patch has broken the build: /home/marek/src/gcc/gcc/ipa-inline.c: In function ‘bool can_inline_ed

Re: [PATCH] Better location info for "incomplete type" error msg (PR c/70756)

2016-05-02 Thread Jason Merrill
On 05/02/2016 12:41 PM, Marek Polacek wrote: On Fri, Apr 29, 2016 at 04:04:13PM -0400, Jason Merrill wrote: On 04/28/2016 11:59 AM, Marek Polacek wrote: 3) for the C++ FE I used a macro so that I don't have to change all the cxx_incomplete_type_error calls now, How about an inline overlo

Re: Inline across -ffast-math boundary

2016-05-02 Thread Jan Hubicka
> On Mon, May 02, 2016 at 07:01:38PM +0200, Jan Hubicka wrote: > > This patch impleemnts the suggested check for presence of FP parameters. > > We can play with special casing the moves incrementally. > > This patch has broken the build: > > /home/marek/src/gcc/gcc/ipa-inline.c: In function ‘bool

[SPARC] Support for --with-{cpu,tune}-{32,64} in sparc*-* targets

2016-05-02 Thread Jose E. Marchesi
Hi people. This patch adds support for the --with-{cpu,tune}-{32,64} configure options to sparc*-* targets. This allows to separately select cpus and tune options for -m32 and -m64 modes in multilib compilers. Tested in sparc64-*-* and sparcv9-*-* targets. 2016-04-28 Jose E. Marchesi

[OpenACC] minor code cleanup

2016-05-02 Thread Nathan Sidwell
While working on some more loop partitioning improvements, I noticed some unnecessary checking. By construction an openacc loop must have at least one head/tail marker, so we should assert that earlier when lowering the loop (in the common compiler) and then rely on it later when processing th

  1   2   >