Fix partition WRT static variables taking address of labels

2015-03-30 Thread Jan Hubicka
Hi, this patch fixes problem with partitioning WRT named labels. This problem reproduces with linux kernel LTO and also on firefox with -fno-toplevel-reorder at least. Bootstrapped/regtested x86_64-linux and tested it fixes the problem on Firefx, intend to commit it tomorrow after some more testi

[PATCH][PR65511] Fix edge probabilities in gimple_duplicate_sese_tail

2015-03-30 Thread Tom de Vries
Hi, this patch fixes PR65511. For the testcase, before transform_to_exit_first_loop the back-edge probability is 99%: ... ;; basic block 5, loop depth 1, count 0, freq 7920, maybe hot ;; prev block 11, next block 6, flags: (NEW) ;; pred: 11 [100.0%] (FALLTHRU) ;; 7 [100.0

Re: [PATCH][PR65511] Fix edge probabilities in gimple_duplicate_sese_tail

2015-03-30 Thread Jan Hubicka
> diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c > index 64bdc92..c7a7c4d 100644 > --- a/gcc/tree-cfg.c > +++ b/gcc/tree-cfg.c > @@ -6177,6 +6177,7 @@ gimple_duplicate_sese_tail (edge entry > ATTRIBUTE_UNUSED, edge exit ATTRIBUTE_UNU >gphi *phi; >tree def; >struct loop *target, *aloop, *

Re: [PATCH][PR65511] Fix edge probabilities in gimple_duplicate_sese_tail

2015-03-30 Thread Jan Hubicka
Hi, also this code ignores counts and probabilities: /* Rewire the entry and exit blocks. The successor to the entry block turns into the successor of DEST_FN's ENTRY_BLOCK_PTR in the child function. Similarly, the predecessor of DEST_FN's EXIT_BLOCK_PTR turns into the predecesso

Re: Silence merge warnings on artiical types

2015-03-30 Thread Richard Biener
On Mon, 30 Mar 2015, Jan Hubicka wrote: > Hi, > when compiling C++ program that define different number of virtual method > in different classes, we output warnings about their virtual tables > being of different type. THese warnings looks ugly and we are able > to diagnose the situation in more s

Re: Silence merge warnings on artiical types

2015-03-30 Thread Jan Hubicka
> On Mon, 30 Mar 2015, Jan Hubicka wrote: > > > Hi, > > when compiling C++ program that define different number of virtual method > > in different classes, we output warnings about their virtual tables > > being of different type. THese warnings looks ugly and we are able > > to diagnose the situa

Re: Fix partition WRT static variables taking address of labels

2015-03-30 Thread Jan Hubicka
Hi, unforutnately the patch ICE on: int i; struct C { C(); }; C::C() { static void *labelref = &&label; goto *labelref; label: i = 1; } int main() { C c; return (i != 1); } The problem is that decl_function_context of labelref is not C::C itself but an abstract function that is abst

Re: Fix detailed mem report WRT hash tables

2015-03-30 Thread Richard Biener
On Fri, Mar 27, 2015 at 4:26 PM, Jan Hubicka wrote: > Hi, > I notieced that GGC hash tables are now accounted to > hash-table.h:alloc_entries > that is not very informative (we do not have any stats for heap hash tables > that > would be nice to have). > > This patch fixes the first problem by a

Re: Inliner badness metric tweak

2015-03-30 Thread Richard Biener
On Mon, Mar 30, 2015 at 3:45 AM, Jan Hubicka wrote: > Hi, > this patch makes inline metric to be >estimate_speedup > (over) > edge_growth^2*overall_growth > > This is intended to make stronger push on inliner to preffer functions with > smaller growth and d

Re: Fix partition WRT static variables taking address of labels

2015-03-30 Thread Richard Biener
On Mon, Mar 30, 2015 at 11:07 AM, Jan Hubicka wrote: > Hi, > unforutnately the patch ICE on: > int i; > struct C > { > C(); > }; > > C::C() > { > static void *labelref = &&label; > goto *labelref; > label: i = 1; > } > > int main() > { > C c; > return (i != 1); > } > > The problem is th

Re: [PATCH][PR65511] Fix edge probabilities in gimple_duplicate_sese_tail

2015-03-30 Thread Tom de Vries
On 30-03-15 10:15, Jan Hubicka wrote: Also move_sese_region_to_fn seem to mis updating of counts. Can you, please, add that and send updated patch? Like this? OK for stage1 if bootstrap and reg-test on x86_64 are ok? Thanks, - Tom Preserve edge count in move_sese_region_to_fn 2015-03-30

Re: [PATCH][PR65511] Fix edge probabilities in gimple_duplicate_sese_tail

2015-03-30 Thread Tom de Vries
On 30-03-15 10:15, Jan Hubicka wrote: diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 64bdc92..c7a7c4d 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -6177,6 +6177,7 @@ gimple_duplicate_sese_tail (edge entry ATTRIBUTE_UNUSED, edge exit ATTRIBUTE_UNU gphi *phi; tree def; struc

Re: Fix ice on comdat groups with -check-pointer-bounds

2015-03-30 Thread Ilya Enkovich
2015-03-27 18:23 GMT+03:00 Jan Hubicka : > Hi, > this patch fixes bug in symtab_node::verify_symtab_nodes pointed out by Ilya. > The loop checking that there all comdats are linked by same_comdat_group was > completely bogus. In addition it checked also external symbols that are > currently not ke

Re: [PATCH] Fix another wrong-code bug with -fstrict-volatile-bitfields

2015-03-30 Thread Richard Biener
On Mon, Mar 16, 2015 at 11:53 AM, Bernd Edlinger wrote: > > Hi, > > > when looking at the m68k I realized the following, which is > a general problem... > > If the alignment of the structure is less than sizeof(field), the > strict volatile bitfields code may read beyond the end of the > structure

Re: Fix ice on comdat groups with -check-pointer-bounds

2015-03-30 Thread Ilya Enkovich
2015-03-27 18:23 GMT+03:00 Jan Hubicka : > Hi, > this patch fixes bug in symtab_node::verify_symtab_nodes pointed out by Ilya. > The loop checking that there all comdats are linked by same_comdat_group was > completely bogus. In addition it checked also external symbols that are > currently not ke

[PATCH] Fix PR ipa/65557

2015-03-30 Thread Martin Liška
Hello. Following patch fixed the issue, where we have to check if function summary for IPA CP has been already created. Tested on x86_64-linux-pc w/o any new regression introduced. Ready for trunk? Thanks, Martin >From c33680093e67328863836a845e847bf1b1b23d0e Mon Sep 17 00:00:00 2001 Fr

Re: [PATCH][MIPS] Enable load-load/store-store bonding

2015-03-30 Thread sameera
Hi! Sorry for delay in sending this patch for review. Please find attached updated patch. In P5600, 2 consecutive loads/stores of same type which access contiguous memory locations are bonded together by instruction issue unit to dispatch single load/store instruction which accesses both locati

Re: Fix ice on comdat groups with -check-pointer-bounds

2015-03-30 Thread Ilya Enkovich
On 30 Mar 14:05, Ilya Enkovich wrote: > 2015-03-27 18:23 GMT+03:00 Jan Hubicka : > > Index: symtab.c > > === > > --- symtab.c(revision 221734) > > +++ symtab.c(working copy) > > @@ -1130,15 +1130,20 @@ symtab_node::verify_symta

Re: ipa-cp heuristic tweek

2015-03-30 Thread Martin Jambor
Hi, On Sun, Mar 29, 2015 at 05:43:20PM +0200, Jan Hubicka wrote: > Hi, thanks for committing the patch, I'm just wondering why... > this patch improve crafty performance by avoiding ipa-cp clonning of > Search function that specializes the first iteration of the recursion. > The patch is by Mart

New regression on ARM Linux (was: Re: [PATCH] Fix regression caused by PR65310 fix)

2015-03-30 Thread Alan Lawrence
We've been seeing a bunch of new failures in the *libffi* testsuite on ARM Linux (arm-none-linux-gnueabi, arm-none-linux-gnueabihf), following this one-liner fix. I've reduced the testcase down to the attached (including removing any dependency on libffi); with gcc r221347, this prints the expec

Re: New regression on ARM Linux

2015-03-30 Thread Alan Lawrence
...actually attach the testcase... Alan Lawrence wrote: We've been seeing a bunch of new failures in the *libffi* testsuite on ARM Linux (arm-none-linux-gnueabi, arm-none-linux-gnueabihf), following this one-liner fix. I've reduced the testcase down to the attached (including removing any depe

Re: New regression on ARM Linux

2015-03-30 Thread Richard Biener
On Mon, 30 Mar 2015, Alan Lawrence wrote: > ...actually attach the testcase... What compile options? > Alan Lawrence wrote: > > We've been seeing a bunch of new failures in the *libffi* testsuite on ARM > > Linux (arm-none-linux-gnueabi, arm-none-linux-gnueabihf), following this > > one-liner fi

Re: New regression on ARM Linux

2015-03-30 Thread Richard Biener
On Mon, 30 Mar 2015, Richard Biener wrote: > On Mon, 30 Mar 2015, Alan Lawrence wrote: > > > ...actually attach the testcase... > > What compile options? Just tried -O2. The GIMPLE IL assumes 64bit alignment of .LC0 but I can't see anything not guaranteeing that: .section.roda

[PATCH] Fix PR65626

2015-03-30 Thread Richard Biener
The following patch fixes PR65626 - an ordering issue with removing BBs and fixing up noreturn stmts. The fix is simple - delay BB removal to the CFG cleanup run and only split the BB at fixup_noreturn_stmt time so CFG cleanup can find it in O(1). (similarly EH/abnormal cleanup should only remove

RE: [PATCH] Fix another wrong-code bug with -fstrict-volatile-bitfields

2015-03-30 Thread Bernd Edlinger
Hi, On Mon, 30 Mar 2015 12:33:47, Richard Biener wrote: > > On Mon, Mar 16, 2015 at 11:53 AM, Bernd Edlinger > wrote: >> >> Hi, >> >> >> when looking at the m68k I realized the following, which is >> a general problem... >> >> If the alignment of the structure is less than sizeof(field), the >> s

Re: [PATCH][ARM] PR 65489: Accept VSTRUCT constants in arm_legitimate_constant_p

2015-03-30 Thread Kyrill Tkachov
Ping. https://gcc.gnu.org/ml/gcc-patches/2015-03/msg01196.html Thanks, Kyrill On 23/03/15 16:15, Kyrill Tkachov wrote: Hi all, The ICE in the PR happens on arm during the hoist pass when the code generates a SET rtx of the form: (set (reg:OI) (const_int 0)). It checks whether const_int 0 is a g

Re: C++ PATCH for c++/65556 (ICE with switch and bit-fields)

2015-03-30 Thread James Greenhalgh
On Fri, Mar 27, 2015 at 11:14:31PM +, H.J. Lu wrote: > On Fri, Mar 27, 2015 at 7:38 AM, Marek Polacek wrote: > > In this testcase we were crashing while trying to gimplify a switch, because > > the types of the switch condition and case constants didn't match. This ICE > > started with my -Ws

[PATCH][ada][PR65490] Fix bzero warning in child_setup_tty

2015-03-30 Thread Tom de Vries
Hi, This patch fixes the warning: ... terminals.c:1266:21: warning: argument to ‘sizeof’ in ‘bzero’ call is the same expression as the destination; did you mean to remove the addressof? [-Wsizeof-pointer-memaccess] ... bootstrapped and reg-tested on x86_64. OK for stage 4/stage1? Thanks, -

[PATCH, PR target/65602] Fix check_effective_target_mpx to check lib availability

2015-03-30 Thread Ilya Enkovich
Hi, Currently check_effective_target_mpx doesn't check libs availability for non Linux targets but tests require them. This patch modifies test to requre wrappers library to link. I suppose it should fix failing tests on Solaris and other non-Linux systems. Patch also replaces alloca calls w

Re: C++ PATCH for c++/65556 (ICE with switch and bit-fields)

2015-03-30 Thread Jakub Jelinek
On Mon, Mar 30, 2015 at 03:00:54PM +0100, James Greenhalgh wrote: > Likewise on ARM. The testcase is fairly obviously not going to work > for any target with 32-bit long: > > struct S > { > long l: 1; > long l2: 41; > unsigned long ul: 1; > unsigned long ul2: 41; > } s; > >

Re: Fix partition WRT static variables taking address of labels

2015-03-30 Thread Jason Merrill
On 03/30/2015 05:32 AM, Richard Biener wrote: IMHO that's bogus. But I thought we decided that functions with non-local labels shouldn't be cloned? Yes, why isn't copy_forbidden flagging this function? It has a check for exactly this situation. And cloning static vars looks bogus as well

Re: C++ PATCH for c++/65556 (ICE with switch and bit-fields)

2015-03-30 Thread Marek Polacek
On Mon, Mar 30, 2015 at 04:02:36PM +0200, Jakub Jelinek wrote: > On Mon, Mar 30, 2015 at 03:00:54PM +0100, James Greenhalgh wrote: > > Likewise on ARM. The testcase is fairly obviously not going to work > > for any target with 32-bit long: > > > > struct S > > { > > long l: 1; > > long

Re: C++ PATCH for c++/65556 (ICE with switch and bit-fields)

2015-03-30 Thread Jakub Jelinek
On Mon, Mar 30, 2015 at 04:06:56PM +0200, Marek Polacek wrote: > On Mon, Mar 30, 2015 at 04:02:36PM +0200, Jakub Jelinek wrote: > > On Mon, Mar 30, 2015 at 03:00:54PM +0100, James Greenhalgh wrote: > > > Likewise on ARM. The testcase is fairly obviously not going to work > > > for any target with 3

[committed] Fix c++/65556 testcase

2015-03-30 Thread Marek Polacek
Apparently 41-bit bit-fields with type long can't be used on archs with 32-bit long. Applying to trunk. 2015-03-30 Marek Polacek * c-c++-common/pr65556.c: Change the width of bit-fields. diff --git gcc/testsuite/c-c++-common/pr65556.c gcc/testsuite/c-c++-common/pr65556.c index c672

C++ PATCH for c++/65398 (valid constexpr rejected once again)

2015-03-30 Thread Marek Polacek
Turned out that my earlier fix for this PR didn't handle cases where we aren't dealing with an INDIRECT_REF expression, which means we fail to compile valid code. Fixed by moving the folding to cxx_eval_constant_expression, where we ought to be able to reduce all POINTER_PLUS_EXPRs in a constexpr

Re: Silence merge warnings on artiical types

2015-03-30 Thread Ilya Verbin
On Mon, Mar 30, 2015 at 05:02:57 +0200, Jan Hubicka wrote: > * lto-symtab.c (lto_symtab_merge_decls_2): Silence warnings on > artificial decls. Shouldn't this patch fix libgomp.c++/target-3.C in an offloading-enabled configuration? It still fails... libgomp/testsuite/libgomp.c++/../l

Re: libgomp nvptx plugin: rework initialisation and support the proposed load/unload hooks (was: Merge current set of OpenACC changes from gomp-4_0-branch)

2015-03-30 Thread Jakub Jelinek
On Thu, Mar 26, 2015 at 11:41:30PM +0300, Ilya Verbin wrote: > Here is the latest patch for libgomp and mic plugin. > make check-target-libgomp using intelmic emul passed. > Also I used a testcase from the attachment. This applies cleanly. > Latest ptx part is here, I guess: > https://gcc.gnu.org

Re: New regression on ARM Linux

2015-03-30 Thread Alan Lawrence
-O2 was what I first used; it also occurs at -O1. -fno-tree-sra fixes it. The problem appears to be in laying out arguments, specifically varargs. From the "good" -fdump-rtl-expand: (insn 18 17 19 2 (set (mem:SI (reg/f:SI 107 virtual-outgoing-args) [0 S4 A32]) (reg:SI 111 [ b1$16 ]))

Re: [PATCH] Fix PR ipa/65557

2015-03-30 Thread Jan Hubicka
> Hello. > > Following patch fixed the issue, where we have to check if function summary > for IPA CP has been already created. > > Tested on x86_64-linux-pc w/o any new regression introduced. > Ready for trunk? > > Thanks, > Martin > >From c33680093e67328863836a845e847bf1b1b23d0e Mon Sep

Re: ipa-cp heuristic tweek

2015-03-30 Thread Jan Hubicka
> > Index: ipa-cp.c > > === > > --- ipa-cp.c(revision 221757) > > +++ ipa-cp.c(working copy) > > @@ -811,6 +811,41 @@ set_all_contains_variable (struct ipcp_p > >return ret; > > } > > > > +/* Worker of call_for_s

Re: Silence merge warnings on artiical types

2015-03-30 Thread Jan Hubicka
> On Mon, Mar 30, 2015 at 05:02:57 +0200, Jan Hubicka wrote: > > * lto-symtab.c (lto_symtab_merge_decls_2): Silence warnings on > > artificial decls. > > Shouldn't this patch fix libgomp.c++/target-3.C in an offloading-enabled > configuration? It still fails... > > libgomp/testsuite/libg

Re: Silence merge warnings on artiical types

2015-03-30 Thread Ilya Verbin
On Mon, Mar 30, 2015 at 19:06:39 +0200, Jan Hubicka wrote: > > On Mon, Mar 30, 2015 at 05:02:57 +0200, Jan Hubicka wrote: > > > * lto-symtab.c (lto_symtab_merge_decls_2): Silence warnings on > > > artificial decls. > > > > Shouldn't this patch fix libgomp.c++/target-3.C in an offloading-enable

Re: Silence merge warnings on artiical types

2015-03-30 Thread Jan Hubicka
> On Mon, Mar 30, 2015 at 19:06:39 +0200, Jan Hubicka wrote: > > > On Mon, Mar 30, 2015 at 05:02:57 +0200, Jan Hubicka wrote: > > > > * lto-symtab.c (lto_symtab_merge_decls_2): Silence warnings on > > > > artificial decls. > > > > > > Shouldn't this patch fix libgomp.c++/target-3.C

Re: Fix partition WRT static variables taking address of labels

2015-03-30 Thread Jan Hubicka
> On 03/30/2015 05:32 AM, Richard Biener wrote: > >IMHO that's bogus. But I thought we decided that functions with > >non-local labels shouldn't be cloned? > > Yes, why isn't copy_forbidden flagging this function? It has a > check for exactly this situation. I think the problem is that C++ FE d

Re: Fix ice on comdat groups with -check-pointer-bounds

2015-03-30 Thread Jan Hubicka
> On 30 Mar 14:05, Ilya Enkovich wrote: > > 2015-03-27 18:23 GMT+03:00 Jan Hubicka : > > > Index: symtab.c > > > === > > > --- symtab.c(revision 221734) > > > +++ symtab.c(working copy) > > > @@ -1130,15 +1130,20 @@ symtab_node

Re: Silence merge warnings on artiical types

2015-03-30 Thread Jakub Jelinek
On Mon, Mar 30, 2015 at 07:06:39PM +0200, Jan Hubicka wrote: > > On Mon, Mar 30, 2015 at 05:02:57 +0200, Jan Hubicka wrote: > > > * lto-symtab.c (lto_symtab_merge_decls_2): Silence warnings on > > > artificial decls. > > > > Shouldn't this patch fix libgomp.c++/target-3.C in an offloading-enab

Re: Silence merge warnings on artiical types

2015-03-30 Thread Jan Hubicka
> On Mon, Mar 30, 2015 at 07:06:39PM +0200, Jan Hubicka wrote: > > > On Mon, Mar 30, 2015 at 05:02:57 +0200, Jan Hubicka wrote: > > > > * lto-symtab.c (lto_symtab_merge_decls_2): Silence warnings on > > > > artificial decls. > > > > > > Shouldn't this patch fix libgomp.c++/target-3

gccgo patch committed: Permit conversion from any uintptr type to unsafe.Pointer

2015-03-30 Thread Ian Lance Taylor
The Go language permits converting any type whose underlying type is uintptr to unsafe.Pointer. The Go frontend did not implement this correctly. This is http://golang.org/issue/10284. This patch from Minux fixes the problem. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Commi

Re: [PINGv4][PATCH] ASan on unaligned accesses

2015-03-30 Thread Jakub Jelinek
On Thu, Mar 26, 2015 at 03:28:53PM +0300, Marat Zakirov wrote: > 2015-02-25 Marat Zakirov > > * asan.c (asan_emit_stack_protection): Support for misalign accesses. > (asan_expand_check_ifn): Likewise. > * params.def: New option asan-catch-misaligned. > * params.h: New

[Patch, fortran, PR44672, v1] [F08] ALLOCATE with SOURCE and no array-spec

2015-03-30 Thread Andre Vehreschild
Dear all, please find attach a patch fixing pr44672: integer, dimension(:) :: arr allocate(arr, source = [1,2,3]) as for F2008:C633 now is no longer flagged, beside when you insist on -std=f2003 or lower. Furthermore does the patch implement the F2008 feature of obsoleting the explicit array spe

Re: Silence merge warnings on artiical types

2015-03-30 Thread Jason Merrill
On 03/30/2015 01:23 PM, Jan Hubicka wrote: Jason probably knows better, but I think only real C++ types comply the One Defintion Type and should be merged. Anything we create artifically in compiler is probably not covered by this. Agreed, compiler internals are outside the scope of the langu

Re: C++ PATCH for c++/65398 (valid constexpr rejected once again)

2015-03-30 Thread Jason Merrill
OK, thanks. Jason

[committed] Fix Fortran linear clause handling (PR fortran/65597)

2015-03-30 Thread Jakub Jelinek
Hi! This patch makes sure we have OMP_CLAUSE_LINEAR_NO_COPYIN set on iterator vars, both with implicit and explicit linear clause, so that we don't ICE on those - the iterator vars don't need original list item value. The patch also fixes up the step value for the artificial count iterator var, w

[patch] libstdc++/65630 add exports for operator+() with std::__cxx11::basic_string

2015-03-30 Thread Jonathan Wakely
In the library we instantiate these functions: template S operator+(const C*, const S&); template S operator+(C, const S&); template S operator+(const S&, const S&); We have a Fedora bug report for a package which uses -fno-implicit-templates and then expects to find these instantations in th

[WIP] Avoid -fcompare-debug regressions due to ipa-polymorphic-call stuff (PR ipa/65610)

2015-03-30 Thread Jakub Jelinek
Hi! As discussed in the PR, we have -fcompare-debug failures, because remove_unused_scope_block_p can sometimes remove blocks relevant to ipa-polymorphic-call.c analysis (where it is checking if there is some ctor or dtor in BLOCKs from current tree block upward in BLOCK_SUPERCONTEXT hierarchy) -

Re: [patch] libstdc++/65630 add exports for operator+() with std::__cxx11::basic_string

2015-03-30 Thread Jonathan Wakely
On 30/03/15 18:59 +0100, Jonathan Wakely wrote: In the library we instantiate these functions: template S operator+(const C*, const S&); template S operator+(C, const S&); template S operator+(const S&, const S&); Hmm, that's a bit cryptic, sorry :-) It would have been useful to explain that

Re: Fix partition WRT static variables taking address of labels

2015-03-30 Thread Jason Merrill
On 03/30/2015 01:19 PM, Jan Hubicka wrote: I think the problem is that C++ FE does not ask about copy_forbidden and clone ctor anyway? maybe_clone_body checks tree_versionable_function_p and doesn't clone if it's false. ...ok, now I've actually checked the testcase. In this case there is a

Re: Fix partition WRT static variables taking address of labels

2015-03-30 Thread Jan Hubicka
> On 03/30/2015 01:19 PM, Jan Hubicka wrote: > >I think the problem is that C++ FE does not ask about copy_forbidden and > >clone > >ctor anyway? > > maybe_clone_body checks tree_versionable_function_p and doesn't > clone if it's false. > > ...ok, now I've actually checked the testcase. In this

Re: Fix partition WRT static variables taking address of labels

2015-03-30 Thread Jason Merrill
On 03/30/2015 02:36 PM, Jan Hubicka wrote: Will there be only one copy even on targets that do not support aliases? Yes, on those targets we use thunks. Still, it would be great if we can make context to be the actual function. That sounds messy. Otherwise I will need to figure out some w

Re: [WIP] Avoid -fcompare-debug regressions due to ipa-polymorphic-call stuff (PR ipa/65610)

2015-03-30 Thread Jan Hubicka
> Hi! > > As discussed in the PR, we have -fcompare-debug failures, because > remove_unused_scope_block_p can sometimes remove blocks relevant > to ipa-polymorphic-call.c analysis (where it is checking if > there is some ctor or dtor in BLOCKs from current tree block upward in > BLOCK_SUPERCONTEXT

Re: Fix partition WRT static variables taking address of labels

2015-03-30 Thread Jan Hubicka
> On 03/30/2015 02:36 PM, Jan Hubicka wrote: > >Will there be only one copy even on targets that do not support aliases? > > Yes, on those targets we use thunks. I see, and only if thinks fails on variadic arguments we lose, right? > > >Still, it would be great if we can make context to be the

Re: [WIP] Avoid -fcompare-debug regressions due to ipa-polymorphic-call stuff (PR ipa/65610)

2015-03-30 Thread Jakub Jelinek
On Mon, Mar 30, 2015 at 08:45:51PM +0200, Jan Hubicka wrote: > We do another round of polymorphic call analysis in PRE pass. (it is not that > important to do so as it is too late to inline the call, but we do that) Ok. > > Also, looking for better name of the function if you have ideas. > > I t

[PATCH] [UPDATED] Fix another wrong-code bug with -fstrict-volatile-bitfields

2015-03-30 Thread Bernd Edlinger
Hi, On Mon, 30 Mar 2015 12:33:47, Richard Biener wrote: > > So - shouldn't the check be > > if (MEM_ALIGN (op0) < GET_MODE_ALIGNMENT (fieldmode)) > return false; > No. Because this example would access memory beyond the end of structure on m66k: volatile struct s {   unsigned x:15; } g; int x =

Re: [PATCH, PR target/65602] Fix check_effective_target_mpx to check lib availability

2015-03-30 Thread Jeff Law
On 03/30/2015 08:00 AM, Ilya Enkovich wrote: Hi, Currently check_effective_target_mpx doesn't check libs availability for non Linux targets but tests require them. This patch modifies test to requre wrappers library to link. I suppose it should fix failing tests on Solaris and other non-Lin

Re: New regression on ARM Linux

2015-03-30 Thread Richard Biener
On March 30, 2015 6:45:34 PM GMT+02:00, Alan Lawrence wrote: >-O2 was what I first used; it also occurs at -O1. -fno-tree-sra fixes >it. > >The problem appears to be in laying out arguments, specifically >varargs. From >the "good" -fdump-rtl-expand: > >(insn 18 17 19 2 (set (mem:SI (reg/f:SI 107

[PATCH] Fix for PR26702: Emit .size for BSS variables on arm-eabi

2015-03-30 Thread Kwok Cheung Yeung
This is a simple patch that ensures that a .size directive is emitted when space is allocated for a static variable in the BSS on bare-metal ARM targets. This allows other tools such as GDB to look up the size of the object correctly. Before: $ readelf -s pr26702.o Symbol table '.symtab' con

Re: [PATCH, PR target/65602] Fix check_effective_target_mpx to check lib availability

2015-03-30 Thread Rainer Orth
Jeff Law writes: > On 03/30/2015 08:00 AM, Ilya Enkovich wrote: >> Hi, >> >> Currently check_effective_target_mpx doesn't check libs availability for >> non Linux targets but tests require them. This patch modifies test to >> requre wrappers library to link. I suppose it should fix failing test

Re: [WIP] Avoid -fcompare-debug regressions due to ipa-polymorphic-call stuff (PR ipa/65610)

2015-03-30 Thread Jan Hubicka
> > 2015-03-30 Jakub Jelinek > > PR ipa/65610 > * ipa-utils.h (inlined_polymorphic_ctor_dtor_block_p): Declare. > * ipa-polymorphic-call.c (inlined_polymorphic_ctor_dtor_block_p): New > function. > (decl_maybe_in_construction_p, noncall_stmt_may_be_vtbl_ptr_store)

Re: libgomp nvptx plugin: rework initialisation and support the proposed load/unload hooks (was: Merge current set of OpenACC changes from gomp-4_0-branch)

2015-03-30 Thread Julian Brown
On Mon, 30 Mar 2015 18:42:02 +0200 Jakub Jelinek wrote: > On Thu, Mar 26, 2015 at 11:41:30PM +0300, Ilya Verbin wrote: > > Here is the latest patch for libgomp and mic plugin. > > make check-target-libgomp using intelmic emul passed. > > Also I used a testcase from the attachment. > > This appli

[PATCH] [AArch64] Add support for the Samsung Exynos M1 processor

2015-03-30 Thread Evandro Menezes
The Samsung Exynos M1 implements the ARMv8 ISA and this patch adds support for it through the -mcpu command-line option. The patch was checked on aarch64-unknown-linux-gnu without new failures. OK for trunk? -- Evandro Menezes Austin, TX 0001-AArch64-Add-option-

[PATCH] [ARM] Add support for the Samsung Exynos M1 processor

2015-03-30 Thread Evandro Menezes
The Samsung Exynos M1 implements the ARMv8 ISA and this patch adds support for it through the -mcpu command-line option. The patch was checked on arm-unknown-linux-gnueabihf without new failures. OK for trunk? -- Evandro Menezes Austin, TX 0001-ARM-Add-option-fo

Re: [PATCH] Fix PR ipa/65557

2015-03-30 Thread Martin Liška
On 03/30/2015 07:03 PM, Jan Hubicka wrote: Hello. Following patch fixed the issue, where we have to check if function summary for IPA CP has been already created. Tested on x86_64-linux-pc w/o any new regression introduced. Ready for trunk? Thanks, Martin >From c33680093e67328863836

Re: PATCH] PR target/65612: Multiversioning doesn't work with DSO nor PIE

2015-03-30 Thread H.J. Lu
On Sun, Mar 29, 2015 at 7:40 PM, H.J. Lu wrote: > On Sun, Mar 29, 2015 at 7:34 PM, H.J. Lu wrote: >> On Sun, Mar 29, 2015 at 7:25 PM, H.J. Lu wrote: >>> We shouldn't call external function, __cpu_indicator_init, while an object >>> is being relocated since its .got.plt section hasn't been update

Go patch committed: Mark erroneous builtin calls as erroneous

2015-03-30 Thread Ian Lance Taylor
This patch to the Go frontend marks some builtin calls with erroneous as erroneous. This avoids a compiler crash on invalid code (http://golang.org/issue/10285). Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian diff -r 6780bf5a7069 go/expressions.cc ---

Re: PATCH] PR target/65612: Multiversioning doesn't work with DSO nor PIE

2015-03-30 Thread Jack Howarth
-Wwrite-strings -Wcast-qual -Wno-format -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -pipe -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -pipe -fno-common -I. -I. -I../../.././gcc -I../../../../gcc-5-20150330/libgcc -I../../../.

Re: PATCH] PR target/65612: Multiversioning doesn't work with DSO nor PIE

2015-03-30 Thread H.J. Lu
g-libgcc -fno-stack-protector -pipe > -fno-common -I. -I. -I../../.././gcc > -I../../../../gcc-5-20150330/libgcc > -I../../../../gcc-5-20150330/libgcc/. > -I../../../../gcc-5-20150330/libgcc/../gcc > -I../../../../gcc-5-20150330/libgcc/../include -DHAVE_CC_TLS > -DUSE_EMUTLS -fv

Re: PATCH] PR target/65612: Multiversioning doesn't work with DSO nor PIE

2015-03-30 Thread H.J. Lu
s -Wmissing-prototypes >> -Wold-style-definition -isystem ./include -pipe -fno-common -g >> -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -pipe >> -fno-common -I. -I. -I../../.././gcc >> -I../../../../gcc-5-20150330/libgcc >> -I../../../../gcc-5-20150330/libgcc/

Re: PATCH] PR target/65612: Multiversioning doesn't work with DSO nor PIE

2015-03-30 Thread Jack Howarth
./include -pipe -fno-common -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -pipe -fno-common -I. -I. -I../../.././gcc -I../../../../gcc-5-20150330/libgcc -I../../../../gcc-5-20150330/libgcc/. -I../../../../gcc-5-20150330/libgcc/../gcc -I../../../../gcc-5-20150330/libgcc/../include

Re: PATCH] PR target/65612: Multiversioning doesn't work with DSO nor PIE

2015-03-30 Thread Jack Howarth
;> -g -O2 -DIN_GCC-W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual >>> -Wno-format -Wstrict-prototypes -Wmissing-prototypes >>> -Wold-style-definition -isystem ./include -pipe -fno-common -g >>> -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -pipe >&g

Re: PATCH] PR target/65612: Multiversioning doesn't work with DSO nor PIE

2015-03-30 Thread H.J. Lu
-Wall -Wno-narrowing -Wwrite-strings -Wcast-qual > -Wno-format -Wstrict-prototypes -Wmissing-prototypes > -Wold-style-definition -isystem ./include -pipe -fno-common -g > -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -pipe > -fno-common -I. -I. -I../../.././gcc > -I../../..

Re: [PR64164] drop copyrename, integrate into expand

2015-03-30 Thread Jeff Law
On 03/28/2015 01:21 PM, Alexandre Oliva wrote: On Mar 27, 2015, Alexandre Oliva wrote: This patch reworks the out-of-ssa expander to enable coalescing of SSA partitions that don't share the same base name. This is done only when optimizing. The test we use to tell whether two partitions ca

Re: [PATCH] Fix size & type for cold partition names (hot-cold function partitioning)

2015-03-30 Thread Jeff Law
On 03/27/2015 10:44 AM, Caroline Tice wrote: It took me a while to get a test case I'm happy with, so I'm re-submitting the whole patch for approval. 2015-03-27 Caroline Tice * final.c (final_scan_insn): Change 'cold_function_name' to 'cold_partition_name' and make it a gl

Re: [PATCH] Install all gcc/*.{h,def} headers for plugins (PR plugins/61176)

2015-03-30 Thread Jeff Law
On 03/26/2015 07:40 AM, Jakub Jelinek wrote: Hi! Rather than adding 130 or so missing headers to PLUGIN_HEADERS, this just adds all *.h and *.def files from gcc/ directory. For files from different directories, one has to still add them into PLUGIN_HEADERS. Tested on x86_64-linux and i686-linux

Re: PATCH] PR target/65612: Multiversioning doesn't work with DSO nor PIE

2015-03-30 Thread Jakub Jelinek
On Mon, Mar 30, 2015 at 07:08:00PM -0700, H.J. Lu wrote: > --- a/gcc/gcc.c > +++ b/gcc/gcc.c > @@ -1566,11 +1566,13 @@ init_spec (void) > if (in_sep && *p == '-' && strncmp (p, "-lgcc", 5) == 0) > { > init_gcc_specs (&obstack, > + "-lgcc_nonshared " >

Re: PATCH] PR target/65612: Multiversioning doesn't work with DSO nor PIE

2015-03-30 Thread Rainer Orth
Jakub Jelinek writes: >> @@ -424,3 +424,8 @@ __cpu_indicator_init (void) >> >>return 0; >> } >> + >> +#if defined SHARED && !defined _WIN32 >> +__asm__ (".symver __cpu_indicator_init, __cpu_indicator_init@GCC_4.8.0"); >> +__asm__ (".symver __cpu_model, __cpu_model@GCC_4.8.0"); >> +#endif >

Re: [PR64164] drop copyrename, integrate into expand

2015-03-30 Thread Steven Bosscher
On Sat, Mar 28, 2015 at 8:21 PM, Alexandre Oliva wrote: > Regstrapped on x86_64-linux-gnu native and on i686-pc-linux-gnu native > on x86_64, so without lto plugin. The only regression is in > gcc.dg/guality/pr54200.c, that explicitly disables VTA. What about memory footprint? IIRC this pass was