Re: Fix tree-ssa-dce Ada LTO bootstrap ice

2015-12-08 Thread Jan Hubicka
> Jan, > > > this patch fixes tree-ssa-dce ICE seen during Ada bootstrap. It is updated > > version of https://gcc.gnu.org/ml/gcc-patches/2015-05/msg02876.html for > > current mainline > > > > Bootstrapped/regtested x86_64-linux, OK? > > > > PR middle-end/65337 > > * tree-ssa-dce.c (bb_

Re: -fstrict-aliasing fixes 5/6: make type system independent of flag_strict_aliasing

2015-12-08 Thread Jan Hubicka
Hi this patch implements the trik for punting if we get too many nested pointers. This fixes the ada tstcases. Curiously enough I would like to replace safe_push by quick_push but doing so I get weird error about freeing non-heap object in the auto_vec desructor... Bootstraping/regtesting x86_64-l

Re: [Patch, Fortran] PR45859 - Permit array elements to coarray dummy arguments

2015-12-08 Thread Tobias Burnus
PING On 4 December 2015, Tobias Burnus wrote: I pressed "Send" too early - as the testsuite fails unless the following patch is applied. I think I will just use this test case (with patch) instead of adding a new test-suite file. Required patch: --- a/gcc/testsuite/gfortran.dg/coarray_args_2.f9

Re: [Fortran, Patch] Memory sync after coarray image control statements and assignment

2015-12-08 Thread Tobias Burnus
Alessandro Fanfarillo wrote: in attachment the new patch. I also checked the behavior with move_alloc: it synchronizes right after the deregistration of the destination. I also noticed that __asm__ __volatile__ ("":::"memory") is called before sync all and not after. It shouldn't be a problem, ri

Re: Fix tree-ssa-dce Ada LTO bootstrap ice

2015-12-08 Thread Eric Botcazou
Jan, > this patch fixes tree-ssa-dce ICE seen during Ada bootstrap. It is updated > version of https://gcc.gnu.org/ml/gcc-patches/2015-05/msg02876.html for > current mainline > > Bootstrapped/regtested x86_64-linux, OK? > > PR middle-end/65337 > * tree-ssa-dce.c (bb_postorder): New

Re: [PATCH, testsuite] Fix sse4_1-round* inline asm statements

2015-12-08 Thread Uros Bizjak
On Tue, Dec 8, 2015 at 9:13 PM, Bernd Edlinger wrote: > Hi, > > Am 08.12.2015 um 19:23 schrieb Uros Bizjak: >> On Tue, Dec 8, 2015 at 7:10 PM, Uros Bizjak wrote: >>> Hello! >>> this patch fixes the asm statements in the gcc.target/i386/sse4_1-round* test cases. They do lots o

Re: Wrap fewer refs for LTO

2015-12-08 Thread Jan Hubicka
> Hi, > while debugging an renaming issue I run into ADDR_EXPR of MEM_REF of ADDR_EXPR > which seemed somewhat odd + we don't really get the CONSTANT and other flags > right because recompute_tree_invariant_for_addr_expr punts on ADDR_EXPR inside > ADDR_EXPR. > > The expression is created by wrap_

Wrap fewer refs for LTO

2015-12-08 Thread Jan Hubicka
Hi, while debugging an renaming issue I run into ADDR_EXPR of MEM_REF of ADDR_EXPR which seemed somewhat odd + we don't really get the CONSTANT and other flags right because recompute_tree_invariant_for_addr_expr punts on ADDR_EXPR inside ADDR_EXPR. The expression is created by wrap_refs. While lo

[RFA] Transparent alias suport part 10: Fix base+offset alias analysis oracle WRT aliases

2015-12-08 Thread Jan Hubicka
Hi, this patch fixes base+offset alias oracles to consider variable aliases. With this patch and one extra hack I can LTO bootstrap with variale symbol merging disabled in lto-symtab.c The basic idea is simple - there is new comparer compare_base_decls which knows how to handle aliases via symbol

Transparent alias suport part 9 (ipa-reference fixes)

2015-12-08 Thread Jan Hubicka
Hi, this patch makes ipa-reference safe WRT aliases. The basic idea is to use ultimate alias targets as representative for each group of aliases via ipa_reference_var_uid. Bootstrapped/regtested x86_64-linux with slightly earlier version. Re testing with last minute changes and plan to commit aft

Transparent alias suport part 8 (equal_address_to support)

2015-12-08 Thread Jan Hubicka
Hi, this patch makes symtab_node::equal_address_to to understand transparent aliases and always return true for symbol and its transparent alias. In addition I introduced new parameter MEMORY_ACCESSED which makes the function useful for base/ofset alias oracle implementation. We are bit schisofren

Re: [PATCH] [ARC] Add support for atomic memory built-in.

2015-12-08 Thread Joern Wolfgang Rennecke
On 07/12/15 13:25, Claudiu Zissulescu wrote: Tested with dg.exp (when passing -matomic to gcc compiler line, the atomic tests are also successfully executed). The comment before "*memory_barrier" could use some elaboration on what it does for TARGET_HS. Otherwise, this is OK.

Re: [PATCH][ARC] Refurbish emitting DWARF2 for epilogue.

2015-12-08 Thread Joern Wolfgang Rennecke
On 09/12/15 04:43, Joern Wolfgang Rennecke wrote: You can also consider having separate options to control optimizations that affect debugging. If leaving out epilogue cfi is what it takes to allow epilogue scheduling without the compiler crashing, then that is what should be done by default

Re: [PATCH][ARC] Refurbish emitting DWARF2 for epilogue.

2015-12-08 Thread Joern Wolfgang Rennecke
On 07/12/15 09:19, Claudiu Zissulescu wrote: Hi Joern, + insn = emit_insn (gen_blockage ()); Is this actually part of the patch to fix cfi generation? This instruction prevents the delay branch scheduler to speculatively use epilogue instructions to fill up the delay slots. Hence, gen

[rx] avoid long calls

2015-12-08 Thread DJ Delorie
Immediate mode jumps have limits; this new option tells gcc to avoid those instructions (by using indirect mode ones) in those rare cases where the user has a program that big. Committed. * config/rx/rx.opt (-mjsr): Add. * config/rx/predicates.md (rx_call_operand): Avoid overflow

[PATCH] Make basic asm implicitly clobber memory, pr24414

2015-12-08 Thread Bernd Edlinger
Hi, from the recent discussion on g...@gcc.gnu.org I became aware that the so called "basic asm" which is an asm without colon, has no way to specify the clobber list. That makes it rather useless, because everyone would expect it to be able to use at least global memory. Furthermore there i

[PATCH] v2 Re: [PATCH] RFC: Use Levenshtein spelling suggestions in Fortran FE

2015-12-08 Thread David Malcolm
On Sat, 2015-12-05 at 20:53 +0100, Mikael Morin wrote: > Hello, > > to get things moving again, a few comments on top of David Malcolm's: > > Le 01/12/2015 13:55, Bernhard Reutner-Fischer a écrit : > > > > David Malcolm nice Levenshtein distance spelling check helpers > > were used in some parts

Re: [RFA] [PATCH] [PR tree-optimization/68619] Avoid direct cfg cleanups in tree-ssa-dom.c [1/3]

2015-12-08 Thread Jeff Law
On 12/08/2015 08:36 AM, Trevor Saunders wrote: Thinking about this more I wonder if we could move more of this into the dom walker, and skip calling before / after dom_children on unreachable blocks all together. That would seem to work for sccvn, but I'm not sure about what tree-ssa-dom.c is d

Re: [DOC, PATCH] Mention --enable-valgrind-annotations in install.texi

2015-12-08 Thread Gerald Pfeifer
On Tue, 8 Dec 2015, Martin Liška wrote: > I would like to add a missing configure option. I saw that Jeff approved while I was mulling over the patch, but still have two questons: 1. Why did you sort this in where you did? (It's not alphabetic.) +Specify that the compiler should interact with v

[gomp4] Add Fortran runtime test

2015-12-08 Thread James Norris
Hi, Add test to exercise the kernels construct with the pcreate clause. Committed to gomp-4_0-branch. Jim Index: libgomp/ChangeLog.gomp === --- libgomp/ChangeLog.gomp (revision 231430) +++ libgomp/ChangeLog.gomp (working copy) @@

Re: [PATCH] Fix phiopt ICE in Factor conversion in COND_EXPR (PR tree-optimization/66949)

2015-12-08 Thread Kugan
On 09/12/15 03:21, Marek Polacek wrote: > The following is a conservative fix for this PR. This is an ICE transpiring > in the new "Factor conversion in COND_EXPR" optimization added in r225722. > > Before this optimization kicks in, we have > : > ... > p1_32 = (short unsigned int) _20; >

Re: [RFA] [PATCH] [PR tree-optimization/68619] Avoid direct cfg cleanups in tree-ssa-dom.c [1/3]

2015-12-08 Thread Jeff Law
On 12/08/2015 07:23 AM, Richard Biener wrote: I wonder if it makes more sense to integrate this with the domwalker itself. I seriously considered that. Essentially, letting the optimizer concern itself merely with asking for the improved domwalk and clearing EDGE_EXECUTABLE when the optimizer

Re: [Patch] Fix bug for frame instructions in annulled delay slots

2015-12-08 Thread Jeff Law
On 12/07/2015 02:18 PM, Steve Ellcey wrote: On Mon, 2015-12-07 at 12:30 -0700, Jeff Law wrote: On 12/07/2015 12:28 PM, Bernd Schmidt wrote: On 12/07/2015 07:54 PM, Steve Ellcey wrote: if (must_annul) -used_annul = 1; +{ + /* Frame related instructions cannot

Re: [DOC, PATCH] Mention --enable-valgrind-annotations in install.texi

2015-12-08 Thread Jeff Law
On 12/08/2015 08:58 AM, Martin Liška wrote: Hello. I would like to add a missing configure option. Thanks, Martin 0001-Mention-enable-valgrind-annotations-in-install.texi.patch From f828b34177908aebb1efab194f749bbdac0b1dbb Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 8 Dec 2015 16:54:4

Re: [hsa 1/10] Configury changes and new options

2015-12-08 Thread Richard Sandiford
[Sorry for the low-quality review, was just reading out of interest...] Martin Jambor writes: > +If you configure GCC with HSA offloading but do not have the HSA > +run-time library installed in a standard location then you can > +explicitely specify the directory where they are installed. The

Transparent alias suport part 7 (lto-symtab support)

2015-12-08 Thread Jan Hubicka
Hi, this patch adds support to lto-symtab.c to prevent merging of certain declarations. The new predicate lto_symtab_merge_p can be used to decide about this. The change is pretty straigforward. lto_symtab_merge_decls_2 makes the decisions about what decls to merge and lto_symtab_merge_symbols_

[Patch,rtl Optimization]: Better register pressure estimate for Loop Invariant Code Motion.

2015-12-08 Thread Ajit Kumar Agarwal
Based on the comments on RFC patch this patch incorporates all the comments from Jeff. Thanks Jeff for the valuable feedback. This patch enables the better register pressure estimate for Loop Invariant code motion. This patch Calculate the Loop Liveness used for regs_used used to calculate the

[C++ Patch] PR 60218

2015-12-08 Thread Paolo Carlini
Hi, I while ago I tested a few fixes for minor ICEs affecting the __bases extension. This one is about an ICE during error recovery when the TYPE_BINFO information is not set yet. Still passes testing on x86_64-linux. Thanks, Paolo. /cp 2015-12-08 Paolo Carlini

[AArch64] Emit square root using the Newton series

2015-12-08 Thread Evandro Menezes
Emit square root using the Newton series 2015-12-03 Evandro Menezes gcc/ * config/aarch64/aarch64-protos.h (aarch64_emit_swsqrt): Declare new function. * config/aarch64/aarch64-simd.md (sqrt2): New expansion and insn definitions.

[PTX] initialization fragment emission

2015-12-08 Thread Nathan Sidwell
This patch completes the reworking of the initializer emission machinery. I've collected all the global variables it uses to hold state into a single structure, and simplified the variables there -- for instance we don't need a mode variable and cons up a CONST_INT rtx for each fragment. na

Transparent alias suport part 6 (lto-cgraph fixes)

2015-12-08 Thread Jan Hubicka
Hi, this patch modifies lto-cgraph to ship the alias target into every partition that use the alias. This is again needed to keep the information that the two declarations are in fact in same place so we can fix alias.c Honza * lto-cgraph.c (compute_ltrans_boundary): Add transparent alia

Transparent alias suport part 5 (varpool fixes)

2015-12-08 Thread Jan Hubicka
Hi, this patch fixes ICE in varpool_node::get_availability which happens when you dump a node with weakref and makes symbol_table::remove_unreferenced_decls to keep aliases in the boundary so we do not lose the information that they actually represent the same location in the binary. This is neede

Transparent alias suport part 4 (ipa-visibility fixes)

2015-12-08 Thread Jan Hubicka
Hi, this patch fixes two issues with transparent laiases in ipa-visibility. First one can't replace weakrefs by local aliases because those would lose the weakness and second transparent aliases do not really have resolution info set in all cases, so we want to skip them when considering a comdat f

Transparent alias suport part 3 (lto-symtab fixes)

2015-12-08 Thread Jan Hubicka
Hi, this patch fixes and ICE in symtab_node::verify_base when there is a missing entry in the symol table - bug I noticed while debugging the patch. Second fix makes symtab_node::noninterposable_alias to skip all transaprent aliases because these can not change visibility. (this is needed because t

Re: [PTX] remove some test skipping

2015-12-08 Thread Nathan Sidwell
On 12/08/15 14:35, Alexander Monakov wrote: On Tue, 8 Dec 2015, Nathan Sidwell wrote: These tests no longer cause the PTX assembler to seg fault, so no reason to skip them. Shouldn't all such cases use 'dg-xfail' rather than 'dg-skip-if'? Should be more reasonable to still run the test and e

Re: [PATCH, ARM] PR68674 Fix LTO support for neon builtins and error catching

2015-12-08 Thread Ramana Radhakrishnan
On 08/12/15 13:53, Christian Bruel wrote: > >> >> The __builtin_neon* aren't published anywhere and people really >> shouldn't be using that directly in source code and only use the >> interface in arm_neon.h which implements pretty much all the Neon >> intrinsics in the ACLE document. >> > > y

[gomp4] libgomp documentation: CUDA Streams Usage

2015-12-08 Thread Thomas Schwinge
Hi! On Mon, 12 Jan 2015 13:55:47 -0600, James Norris wrote: > The attached patch adds a new section to the documentation > for libgomp. This section describes the use of streams > within the OpenACC portion of the library. That never made it upstream; with a little bit of copy-editing now commi

Re: [PATCH] Fix warnings from including fdl.texi into gnat-style.texi

2015-12-08 Thread Mike Stump
On Dec 8, 2015, at 10:10 AM, Gerald Pfeifer wrote: > On Tue, 8 Dec 2015, Tom de Vries wrote: Can you approve the fdl part? >>> Let's assume I can. Okay. >> was the 'Okay' above: >> - a figure of speech (as I read it), or >> - an actual approval (conditional on the adding of the comment) >> ?

Re: [PATCH, testsuite] Fix sse4_1-round* inline asm statements

2015-12-08 Thread Bernd Edlinger
Hi, Am 08.12.2015 um 19:23 schrieb Uros Bizjak: > On Tue, Dec 8, 2015 at 7:10 PM, Uros Bizjak wrote: >> Hello! >> >>> this patch fixes the asm statements in the gcc.target/i386/sse4_1-round* >>> test cases. >>> >>> They do lots of things that are just absolutely forbidden, like clobber >>> regi

[gomp4] [WIP] OpenACC bind, nohost clauses (was: [OpenACC] C, C++: bind and nohost clauses)

2015-12-08 Thread Thomas Schwinge
Hi! On Sat, 14 Nov 2015 09:36:36 +0100, I wrote: > Initial support for the OpenACC bind and nohost clauses (routine > directive) for C, C++. Fortran to follow. Middle end handling and more > complete testsuite coverage also to follow once we got a few details > clarified. OK for trunk? (Has no

Transparent alias suport part 2 (lto-partition fixes)

2015-12-08 Thread Jan Hubicka
Hi, this patch fixes lto-partition WRT transparent aliases. Normal aliases are always put to the same partition as their target and in other partitions they become part of the boundary (so we know that the two symbols are in fact equivalent). Weakrefs and transparent aliases go only into the part

Re: -fstrict-aliasing fixes 5/6: make type system independent of flag_strict_aliasing

2015-12-08 Thread Eric Botcazou
> OK, the code already pre-allocates the vector to be 8 elements. What about > simply punting when reaching this depth? I do not think real world program > have more than 8 nested pointers often enough for this to matter. > They will then get same alias set as void *. Fine with me, but the len<8

Re: [GOOGLE] Remove overly-aggressive LIPO assert

2015-12-08 Thread Xinliang David Li
ok. David On Fri, Dec 4, 2015 at 11:29 AM, Teresa Johnson wrote: > Ping. > Thanks, Teresa > > On Wed, Dec 2, 2015 at 12:46 PM, Teresa Johnson wrote: >> Remove an assert that was overly-strict and already partially redundant >> with an immediately prior assert. In this case we had a hidden visib

Re: [PTX] remove some test skipping

2015-12-08 Thread Alexander Monakov
On Tue, 8 Dec 2015, Nathan Sidwell wrote: > These tests no longer cause the PTX assembler to seg fault, so no reason to > skip them. Shouldn't all such cases use 'dg-xfail' rather than 'dg-skip-if'? Should be more reasonable to still run the test and eventually get XPASS'es as ptxas improves. A

[PATCH] Encode alignment info in MASK_{LOAD,STORE} ifns (PR tree-optimization/68786)

2015-12-08 Thread Jakub Jelinek
Hi! As written in the PR, with MASK_{LOAD,STORE} ifns we lose info on the alignment of the point, unless the referenced SSA_NAME has pointer info with alignment mask, but that is just an optimization issue rather than requirement. As the second argument to these builtins is always 0 (used just to

Re: -fstrict-aliasing fixes 5/6: make type system independent of flag_strict_aliasing

2015-12-08 Thread Jan Hubicka
> > Usually cycles happen through structure members and it might be that > > all other frontends have the pointed-to type incomplete. But the > > above recursion shouldn't apply for the structure case. > > All types are equal in Ada and can be forward declared; the language > specifies > that t

Re: [PATCH] Fix PR ipa/68790

2015-12-08 Thread Jan Hubicka
> Hi. > > I'm sending patch for the PR, unfortunately I've back-ported Honza's patch > that introduced the regression to GCC 5.3. > > Fix is obvious, I've been running regression tests for both > trunk and gcc-5-branch. Identical patch can be applied (modulo a line with > 'cleanup-ipa-dump'). >

[RFC] Request for comments on ivopts patch

2015-12-08 Thread Steve Ellcey
I have an ivopts optimization question/proposal. When compiling the attached program the ivopts pass prefers the original ivs over new ivs and that causes us to generate less efficient code on MIPS. It may affect other platforms too. The Source code is a C strcmp: int strcmp (const char *p1, co

Re: [patch] Fix PR middle-end/68291 & 68292

2015-12-08 Thread Eric Botcazou
> I think that is ok if the testing passes. Thanks. It did on the 3 architectures so I have applied the patch. -- Eric Botcazou

[PTX] remove some test skipping

2015-12-08 Thread Nathan Sidwell
These tests no longer cause the PTX assembler to seg fault, so no reason to skip them. nathan 2015-12-08 Nathan Sidwell * gcc.c-torture/compile/920723-1.c: Remove PTX skip. * gcc.c-torture/compile/pr33855.c: Likewise. * gcc.c-torture/execute/981019-1.c: Remove PTX -O2 skip. Index: gcc.c

[PATCH, i386]: Fix PR68701: ICE with -ffixed-ebp

2015-12-08 Thread Uros Bizjak
Hello! Attached patch fixes a compilation corner case, where -ffixed-ebp option interferes with stack realignment requirements (the realignment without -maccumulate-outgoing-args needs live %ebp). The ICE can be worked around by adding -maccumulate-outgoing-args to compile flags, and this is what

Re: [PATCH, testsuite] Fix sse4_1-round* inline asm statements

2015-12-08 Thread Uros Bizjak
On Tue, Dec 8, 2015 at 7:10 PM, Uros Bizjak wrote: > Hello! > >> this patch fixes the asm statements in the gcc.target/i386/sse4_1-round* >> test cases. >> >> They do lots of things that are just absolutely forbidden, like clobber >> registers >> that are not mentioned in the clobber list, and c

Re: [PATCH, testsuite] Fix sse4_1-round* inline asm statements

2015-12-08 Thread Uros Bizjak
Hello! > this patch fixes the asm statements in the gcc.target/i386/sse4_1-round* test > cases. > > They do lots of things that are just absolutely forbidden, like clobber > registers > that are not mentioned in the clobber list, and create a hidden data flow. > > The test cases work just by cha

Re: [PATCH] Fix warnings from including fdl.texi into gnat-style.texi

2015-12-08 Thread Gerald Pfeifer
Hi Tom, On Tue, 8 Dec 2015, Tom de Vries wrote: >>> Can you approve the fdl part? >> Let's assume I can. Okay. > was the 'Okay' above: > - a figure of speech (as I read it), or > - an actual approval (conditional on the adding of the comment) > ? I should have written this as "Let's assume I can

[PATCH] Fix PR ipa/68790

2015-12-08 Thread Martin Liška
Hi. I'm sending patch for the PR, unfortunately I've back-ported Honza's patch that introduced the regression to GCC 5.3. Fix is obvious, I've been running regression tests for both trunk and gcc-5-branch. Identical patch can be applied (modulo a line with 'cleanup-ipa-dump'). Ready after it fi

Re: [gomp4] Fix Fortran deviceptr

2015-12-08 Thread Cesar Philippidis
On 12/08/2015 08:22 AM, James Norris wrote: >> 2. It appears that deviceptr code in GOACC_parallel_keyed is mostly >> identical to GOACC_data_start. Can you put that duplicate code into >> a function? That would be easier to maintain in the long run. >> > > Fixed. Where? I don't see

Re: [C] Issue an error on scalar va_list with reverse storage order

2015-12-08 Thread Eric Botcazou
> The new gcc.dg/sso-9.c test is failing for aarch64 and arm targets. There's > no error generated if I compile the test from the command line for > aarch64-none-elf. GCC for x86_64 does generate the error. Fixed like so, applied as obvious, thanks for the heads up. * gcc.dg/sso-9.c (foo

Re: -fstrict-aliasing fixes 5/6: make type system independent of flag_strict_aliasing

2015-12-08 Thread Eric Botcazou
> Usually cycles happen through structure members and it might be that > all other frontends have the pointed-to type incomplete. But the > above recursion shouldn't apply for the structure case. All types are equal in Ada and can be forward declared; the language specifies that their "elaborati

Re: Ping [PATCH] c++/42121 - diagnose invalid flexible array members

2015-12-08 Thread Martin Sebor
Thanks for the review and the helpful hints! I've reworked and simplified the diagnostic part of the patch and corrected the remaining issues I uncovered while testing the new version (failing to reject some invalid flexible array members in base classes). Please find the new version in the atta

Re: [PATCH] Convert SPARC to LRA

2015-12-08 Thread David Miller
From: Sebastian Huber Date: Tue, 8 Dec 2015 11:17:53 +0100 > since the LRA patch is still reverted on the trunk, I guess the > switch to LRA will not happen in GCC 6? Indeed, it is unlikely I will have time to work on this for at least a month.

[PATCH, testsuite] Fix sse4_1-round* inline asm statements

2015-12-08 Thread Bernd Edlinger
Hi, this patch fixes the asm statements in the gcc.target/i386/sse4_1-round* test cases. They do lots of things that are just absolutely forbidden, like clobber registers that are not mentioned in the clobber list, and create a hidden data flow. The test cases work just by chance, and You can

Re: [gomp4] Fix Fortran deviceptr

2015-12-08 Thread James Norris
Cesar, On 12/07/2015 09:55 AM, Cesar Philippidis wrote: [snip snip] Two observations: 1. Why is deviceptr so special that gomp_map_vars can't handle it directly? Recall that the deviceptr clause in Fortran presents as two mappings: FORCE_DEVICEPTR and POINTER. The former has the devic

PING^1: [PATCH] Add TYPE_EMPTY_RECORD for C++ empty class

2015-12-08 Thread H.J. Lu
On Mon, Nov 23, 2015 at 12:53 PM, H.J. Lu wrote: > On Mon, Nov 23, 2015 at 1:57 AM, Richard Biener > wrote: >> On Sat, Nov 21, 2015 at 12:46 AM, H.J. Lu wrote: >>> On Fri, Nov 20, 2015 at 2:17 PM, Jason Merrill wrote: On 11/20/2015 01:52 PM, H.J. Lu wrote: > > On Tue, Nov 17, 2015

[PATCH] Fix phiopt ICE in Factor conversion in COND_EXPR (PR tree-optimization/66949)

2015-12-08 Thread Marek Polacek
The following is a conservative fix for this PR. This is an ICE transpiring in the new "Factor conversion in COND_EXPR" optimization added in r225722. Before this optimization kicks in, we have : ... p1_32 = (short unsigned int) _20; : ... iftmp.0_18 = (short unsigned int) _20; :

Re: [PATCH 1/2] PR c/68757: fix uninitialied src_range for various builtins

2015-12-08 Thread Bernd Schmidt
On 12/08/2015 05:02 PM, David Malcolm wrote: I actually implemented something like this when implementing these two patches. Work-in-progress patch attached, which introduces an INVALID_LOCATION value for source_location/location_t, and uses it to "poison" the initial value of c_expr's src_rang

Re: [PATCH,RFC] Introduce RUN_UNDER_VALGRIND in test-suite

2015-12-08 Thread Jeff Law
On 12/08/2015 08:33 AM, Bernd Schmidt wrote: On 12/08/2015 04:28 PM, Martin Liška wrote: Majority of them (~2600 BTs) are in fortran FE (BT contains 'gfc_'): [2]. The rest contains some issues in CP FE, many GGC invalid read/write operations ([4]) and many memory leaks in gcc.c (for instance op

Re: [PATCH 1/2] PR c/68757: fix uninitialied src_range for various builtins

2015-12-08 Thread David Malcolm
On Tue, 2015-12-08 at 16:38 +0100, Bernd Schmidt wrote: > On 12/08/2015 04:43 PM, David Malcolm wrote: > > This fixes various uninitialized src_range of c_expr, this time > > in the various builtins that are parsed via c_parser_get_builtin_args. > > > > Bootstrapped®rtested on x86_64-pc-linux-gnu.

[DOC, PATCH] Mention --enable-valgrind-annotations in install.texi

2015-12-08 Thread Martin Liška
Hello. I would like to add a missing configure option. Thanks, Martin >From f828b34177908aebb1efab194f749bbdac0b1dbb Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 8 Dec 2015 16:54:43 +0100 Subject: [PATCH] Mention --enable-valgrind-annotations in install.texi gcc/ChangeLog: 2015-12-08 Mart

Re: [patch] Fix PR middle-end/68291 & 68292

2015-12-08 Thread Bernd Schmidt
On 12/08/2015 11:50 AM, Eric Botcazou wrote: I'm going to test it on x86-64, SPARC64 and Aarch64. PR middle-end/68291 PR middle-end/68292 * cfgexpand.c (set_rtl): Always accept mode mismatch for SSA names with BLKmode promoted mode based on RESULT_DECLs. I thi

Re: [PATCH 1/2] PR c/68757: fix uninitialied src_range for various builtins

2015-12-08 Thread Bernd Schmidt
On 12/08/2015 04:43 PM, David Malcolm wrote: This fixes various uninitialized src_range of c_expr, this time in the various builtins that are parsed via c_parser_get_builtin_args. Bootstrapped®rtested on x86_64-pc-linux-gnu. OK for trunk? I think both of these patches are OK. Some questions t

[COMMITTED][Testcase] Skip big-endian as well for gcc.target/aarch64/got_mem_hoist_1.c

2015-12-08 Thread Jiong Wang
The same skip should be applied to big-endian for tiny and large code model. Applied to trunk as obvious r231413. 2015-12-08 Jiong Wang gcc/testsuite/ * gcc.target/aarch64/got_mem_hoist_1.c (dg-skip-if): Match big-endian as well. diff --git a/gcc/testsuite/gcc.target/aarch64/got_mem_hoist

Re: [RFA] [PATCH] [PR tree-optimization/68619] Avoid direct cfg cleanups in tree-ssa-dom.c [1/3]

2015-12-08 Thread Trevor Saunders
On Mon, Dec 07, 2015 at 11:15:33PM -0700, Jeff Law wrote: > > First in the series. This merely refactors code from tree-ssa-sccvn.c into > domwalk.c so that other walkers can use it as they see fit. > > > There's an initialization function which sets all edges to executable. > > There's a test

Re: [C] Issue an error on scalar va_list with reverse storage order

2015-12-08 Thread Matthew Wahab
Hello On 03/12/15 14:53, Eric Botcazou wrote: further testing revealed an issue with va_arg handling and reverse scalar storage order on some platforms: when va_list is scalar, passing a field of a structure with reverse SSO as first argument to va_start/va_arg/va_end doesn't work because the

Re: [PATCH,RFC] Introduce RUN_UNDER_VALGRIND in test-suite

2015-12-08 Thread Bernd Schmidt
On 12/08/2015 04:28 PM, Martin Liška wrote: Majority of them (~2600 BTs) are in fortran FE (BT contains 'gfc_'): [2]. The rest contains some issues in CP FE, many GGC invalid read/write operations ([4]) and many memory leaks in gcc.c (for instance option handling). My question is if a bug shou

Re: [PATCH,RFC] Introduce RUN_UNDER_VALGRIND in test-suite

2015-12-08 Thread Martin Liška
On 12/03/2015 03:15 PM, Bernd Schmidt wrote: > On 11/23/2015 10:34 AM, Martin Liška wrote: >> On 11/21/2015 05:26 AM, Hans-Peter Nilsson wrote: >>> IIRC you can replace the actual dg-runtest proc with your own >>> (implementing a wrapper). Grep aroung, I think we do that >>> already. That's certa

[PATCH 1/2] PR c/68757: fix uninitialied src_range for various builtins

2015-12-08 Thread David Malcolm
This fixes various uninitialized src_range of c_expr, this time in the various builtins that are parsed via c_parser_get_builtin_args. Bootstrapped®rtested on x86_64-pc-linux-gnu. OK for trunk? gcc/c/ChangeLog: PR c/68757 * c-parser.c (c_parser_get_builtin_args): Add "out

[PATCH 2/2] C: fix uninitialized ranges for __alignof__

2015-12-08 Thread David Malcolm
This fixes another uninitialized src_range of a c_expr, this time in __alignof__ expressions. Bootstrapped®rtested on x86_64-pc-linux-gnu. OK for trunk? gcc/c/ChangeLog: * c-parser.c (c_parser_alignof_expression): Capture location of closing parenthesis (if any), or of end of una

Re: [gomp4.5] Handle #pragma omp declare target link

2015-12-08 Thread Ilya Verbin
On Tue, Dec 01, 2015 at 20:05:04 +0100, Jakub Jelinek wrote: > This is racy, tsan would tell you so. > Instead of a global var, I'd just change the devicep->is_initialized > field from bool into a 3 state field (perhaps enum), with states > uninitialized, initialized, finalized, and then say in re

Re: [PATCH] Add testcase for c++/68116

2015-12-08 Thread Bernd Schmidt
On 12/08/2015 03:21 PM, Marek Polacek wrote: +C::T C::b[] +{ + T (&C::foo) +}; The problem I have with approving C++ testcases is that I have no idea whether this is valid or not or what it expresses. You should Cc Jason (which I've now done). That's odd code--I don't approve of the cast in

Re: [RFA] [PATCH] [PR tree-optimization/68619] Avoid direct cfg cleanups in tree-ssa-dom.c [1/3]

2015-12-08 Thread Richard Biener
On Tue, Dec 8, 2015 at 3:23 PM, Richard Biener wrote: > On Tue, Dec 8, 2015 at 7:15 AM, Jeff Law wrote: >> >> First in the series. This merely refactors code from tree-ssa-sccvn.c into >> domwalk.c so that other walkers can use it as they see fit. >> >> >> There's an initialization function whic

Re: [RFA] [PATCH] [PR tree-optimization/68619] Avoid direct cfg cleanups in tree-ssa-dom.c [1/3]

2015-12-08 Thread Richard Biener
On Tue, Dec 8, 2015 at 7:15 AM, Jeff Law wrote: > > First in the series. This merely refactors code from tree-ssa-sccvn.c into > domwalk.c so that other walkers can use it as they see fit. > > > There's an initialization function which sets all edges to executable. > > There's a test function to

Re: [PATCH] Add testcase for c++/68116

2015-12-08 Thread Marek Polacek
On Tue, Dec 08, 2015 at 09:15:33AM -0500, Jason Merrill wrote: > On 12/08/2015 06:54 AM, Bernd Schmidt wrote: > >On 12/07/2015 06:49 PM, Marek Polacek wrote: > > > >>diff --git gcc/testsuite/g++.dg/cpp0x/pr68116.C > >>gcc/testsuite/g++.dg/cpp0x/pr68116.C > >>index e69de29..04ed901 100644 > >>--- gc

Re: [Fortran, Patch] Memory sync after coarray image control statements and assignment

2015-12-08 Thread Alessandro Fanfarillo
Hi, in attachment the new patch. I also checked the behavior with move_alloc: it synchronizes right after the deregistration of the destination. I also noticed that __asm__ __volatile__ ("":::"memory") is called before sync all and not after. It shouldn't be a problem, right? 2015-12-08 11:01 GM

Re: [PATCH] Add testcase for c++/68116

2015-12-08 Thread Jason Merrill
On 12/08/2015 06:54 AM, Bernd Schmidt wrote: On 12/07/2015 06:49 PM, Marek Polacek wrote: diff --git gcc/testsuite/g++.dg/cpp0x/pr68116.C gcc/testsuite/g++.dg/cpp0x/pr68116.C index e69de29..04ed901 100644 --- gcc/testsuite/g++.dg/cpp0x/pr68116.C +++ gcc/testsuite/g++.dg/cpp0x/pr68116.C @@ -0,0

[PATCH, i386, AVX-512] Fix assembler for broadcast pattern.

2015-12-08 Thread Kirill Yukhin
Hello, Patch in the bottom fixes assembler strings for broadcast patterns. Fixes spec2k6/464.h264ref compilation fail with -march=skylake-avx512. Bootsatrapped, regtested & committed to main trunk. gcc/ * config/i386/sse.md (define_insn "_vec_dup_1"): Fix assembler to make source

[patch] Backport libstdc++ documentation improvements

2015-12-08 Thread Jonathan Wakely
This syncs the gcc-5-branch docs with those on trunk (which I should have done before the 5.3 release, sorry). Committed to gcc-5-branch. commit 677f6293e1c961ba75fba97509b613f28b4afc33 Author: Jonathan Wakely Date: Tue Dec 8 13:41:50 2015 + Backport libstdc++ documentation improvem

Re: [PATCH, i386, PR68627] Prohibit AVX-512VL broadcasts generation on KNL.

2015-12-08 Thread Kirill Yukhin
On 08 Dec 13:01, Uros Bizjak wrote: > On Tue, Dec 8, 2015 at 11:40 AM, Kirill Yukhin > wrote: > > Hello, > > On 08 Dec 09:47, Andreas Schwab wrote: > >> FAIL: gfortran.dg/pr68627.f -O (test for excess errors) > >> Excess errors: > >> gfortran: error: unrecognized command line option '-mavx512f

Re: [6/6] OpenMP 4.0 library testsuite

2015-12-08 Thread Ilya Verbin
Hi! On Tue, Oct 08, 2013 at 21:54:47 +0200, Jakub Jelinek wrote: > * testsuite/libgomp.c++/udr-1.C: New test. > * testsuite/libgomp.c++/udr-3.C: New test. > * testsuite/libgomp.c++/udr-9.C: New test. I've just noticed that these tests fail fith -flto (on latest trunk and on Oct

Re: [PATCH, ARM] PR68674 Fix LTO support for neon builtins and error catching

2015-12-08 Thread Ramana Radhakrishnan
On Tue, Dec 8, 2015 at 1:29 PM, Christian Bruel wrote: > Hello Ramana, > > On 12/08/2015 02:01 PM, Ramana Radhakrishnan wrote: >> >> On Tue, Dec 8, 2015 at 12:53 PM, Christian Bruel >> wrote: >>> >>> Hi, >>> >>> The order of the NEON builtins construction has led to complications >>> since >>> th

Re: [PATCH, ARM] PR68674 Fix LTO support for neon builtins and error catching

2015-12-08 Thread Ramana Radhakrishnan
On Tue, Dec 8, 2015 at 12:53 PM, Christian Bruel wrote: > Hi, > > The order of the NEON builtins construction has led to complications since > the attribute target support. This was not a problem when driven from the > command line, but was causing various issues when the builtins was mixed > betw

Re: [PATCH 8/N] Fix memory leak in tree-vectorizer.h

2015-12-08 Thread Richard Biener
On Tue, Dec 8, 2015 at 1:01 PM, Richard Biener wrote: > On Tue, Dec 8, 2015 at 12:30 PM, Martin Liška wrote: >> Hello. >> >> The patch removes memory leaks that are caused by overwriting an existing >> item in stmt_vec_info_vec (in set_vinfo_for_stmt). My first attempt was to >> call >> free_stm

Re: [PATCH PR68542]

2015-12-08 Thread Yuri Rumyantsev
Hi Richard, Here is the second part of patch. Is it OK for trunk? I assume that it should fix huge degradation on 481.wrf for -march=bdver4 also. ChangeLog: 2015-12-08 Yuri Rumyantsev PR middle-end/68542 * config/i386/i386.c (ix86_expand_branch): Implement integral vector comparison with bo

[Patch 3/3][Arm] Add support for IEEE-conformant versions of scalar fmin* and fmax*

2015-12-08 Thread David Sherwood
Hi, Here is the last patch of the fmin/fmax change, which adds the optabs to the arm backend. Tested: arm-none-eabi: no regressions Good to go? David Sherwood. ChangeLog: 2015-12-08 David Sherwood gcc/ * config/arm/iterators.md: New iterators. * config/arm/unspecs.md:

Re: -fstrict-aliasing fixes 5/6: make type system independent of flag_strict_aliasing

2015-12-08 Thread Richard Biener
On Tue, 8 Dec 2015, Eric Botcazou wrote: > > The problem is with the type: > > (gdb) p debug_tree (p) > > > > sizes-gimplified public visited unsigned DI > > size > bitsizetype> constant visited 64> unit size > type constant visited 8> align 64 > > symtab 0 alias set -1 canonical type

Re: -fstrict-aliasing fixes 5/6: make type system independent of flag_strict_aliasing

2015-12-08 Thread Eric Botcazou
> The problem is with the type: > (gdb) p debug_tree (p) > > sizes-gimplified public visited unsigned DI > size bitsizetype> constant visited 64> unit size type constant visited 8> align 64 > symtab 0 alias set -1 canonical type 0x76af02a0 > pointer_to_this > > > it is a recur

Re: [PATCH] Fix Changelog entry and add pr66896.C

2015-12-08 Thread Bernd Schmidt
On 12/07/2015 04:05 PM, Martin Liška wrote: As Jakub pointed out in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66896#c15, I forgot to add a test-case to both GCC-5-branch and trunk. May I please installed the suggested patch to both these branches? Sure. Bernd

Re: [PATCH, i386, PR68627] Prohibit AVX-512VL broadcasts generation on KNL.

2015-12-08 Thread Uros Bizjak
On Tue, Dec 8, 2015 at 11:40 AM, Kirill Yukhin wrote: > Hello, > On 08 Dec 09:47, Andreas Schwab wrote: >> FAIL: gfortran.dg/pr68627.f -O (test for excess errors) >> Excess errors: >> gfortran: error: unrecognized command line option '-mavx512f' > Thanks for pointing. > > I've checked in this a

Re: [PATCH 8/N] Fix memory leak in tree-vectorizer.h

2015-12-08 Thread Richard Biener
On Tue, Dec 8, 2015 at 12:30 PM, Martin Liška wrote: > Hello. > > The patch removes memory leaks that are caused by overwriting an existing > item in stmt_vec_info_vec (in set_vinfo_for_stmt). My first attempt was to > call > free_stmt_vec_info for old entries that are overwritten, but it caused

Re: [PATCH] Fix -Werror= handling for Joined warnings, add a few missing Warning keywords (PRs c/48088, c/68657)

2015-12-08 Thread Bernd Schmidt
On 12/07/2015 11:41 PM, Jakub Jelinek wrote: On Mon, Dec 07, 2015 at 04:11:48PM +0100, Bernd Schmidt wrote: Let's document arguments; for the ones identical to read_cmdline_option an explicit pointer there is sufficient, but errors is new. This also needs an update to the function comment. O

Re: [PATCH] Add testcase for c++/68116

2015-12-08 Thread Bernd Schmidt
On 12/07/2015 06:49 PM, Marek Polacek wrote: diff --git gcc/testsuite/g++.dg/cpp0x/pr68116.C gcc/testsuite/g++.dg/cpp0x/pr68116.C index e69de29..04ed901 100644 --- gcc/testsuite/g++.dg/cpp0x/pr68116.C +++ gcc/testsuite/g++.dg/cpp0x/pr68116.C @@ -0,0 +1,12 @@ +// PR c++/68116 +// { dg-do compile

  1   2   >