Re: g++ -Wl,--as-needed -pthread behaviour

2013-09-23 Thread Alan Modra
On Mon, Sep 23, 2013 at 02:08:03PM +0200, Matthias Klose wrote: > With binutils from the 2.24 branch or trunk, the behaviour of --as-needed did > change, and what worked with binutils 2.23, now fails with 2.24: > > $ cat thread.cpp > #include > > void factorial(int n, unsigned long long int *res

Re: Question about a IRA/LRA bug

2013-09-23 Thread Wei Mi
Thanks for your guidance! I see that ira-color.c::check_hard_reg_p take endianess into account already. A difficulty is the param of ira-color.c::assign_hard_reg only contains candidate allocno, so we need to put the correct mode in ira_allocno in a early stage, for example, in ira-build.c::create

Re: Question about a IRA/LRA bug

2013-09-23 Thread Vladimir Makarov
On 09/20/2013 07:31 PM, Wei Mi wrote: > Here is a bug in google branch which couldn't be reproduced in trunk. > But I think the same problem could probably exist in trunk too, just > havn't been exposed. I havn't created a small testcase successfully so > just describe the bug here and ask for sugg

Re: [RFC] GCC vectorizer misses an opportunity to hoist loop invariant load after loop versioning.

2013-09-23 Thread Cong Hou
I have submitted a bugreport through GCC Bugzilla. The link is http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58508. thanks, Cong On Fri, Sep 20, 2013 at 12:57 AM, Richard Biener wrote: > On Wed, Sep 18, 2013 at 10:59 PM, Xinliang David Li > wrote: >> On Wed, Sep 18, 2013 at 1:23 PM, Cong Hou w

Re: Modifying the values of Gimple Instruction Operands

2013-09-23 Thread tturhan
Can you guys please help me for variables and pointers ? Any ideas or pointers will be fine! Thank you very much in advance. > Thank you very much Richard, > > Very good starter for me but I am actually having the hardest time with > variables, pointers etc... > > I know this may be a lot to ask

Re: ARM calling conventions generated in gcc with different optimizations

2013-09-23 Thread Richard Earnshaw
On 23/09/13 16:23, Vasily Golubev wrote: > Thank you a lot for your answer, Mr. Radhakrishnan! > > I think it was my mistake to use phrase "I will save LR at some > place"... I mean I can catch the first instruction of any function > precisely. And save LR value at that time to my local storage. A

Re: ARM calling conventions generated in gcc with different optimizations

2013-09-23 Thread Vasily Golubev
Thank you a lot for your answer, Mr. Radhakrishnan! I think it was my mistake to use phrase "I will save LR at some place"... I mean I can catch the first instruction of any function precisely. And save LR value at that time to my local storage. And I also can catch the first instruction after exi

Re: ARM calling conventions generated in gcc with different optimizations

2013-09-23 Thread Ramana Radhakrishnan
> And my main question is it possible to rely on this fact when > compiling with gcc and different levels of optimizations? No it is not , the compiler (especially trunk) is free to use LR as a temporary after epilogue has been generated at higher optimization levels. > Is it > possible to gener

ARM calling conventions generated in gcc with different optimizations

2013-09-23 Thread Vasily Golubev
Hello, all. I am trying to find some way for detection of function's entry and exit analyzing binary at runtime. It is possible to use Valgrind (www.valgrind.org) and detect all Basic Blocks (1 entry, multiple exits) that correspond to entry\exit of function. As far as I understand, at the start

[c++11] Question about __cxa_throw_bad_array_new_length

2013-09-23 Thread Alexander Ivchenko
Hi, When I compile the following code (modified version of g++.dg/cpp0x/bad_array_new1.C without try/catch): // { dg-options -std=c++11 } // { dg-do run } #include void * f(int i) { return new int[i]; } int main() { f(-1); } with -fno-exceptions option, I still get the call to __cxa_

g++ -Wl,--as-needed -pthread behaviour

2013-09-23 Thread Matthias Klose
With binutils from the 2.24 branch or trunk, the behaviour of --as-needed did change, and what worked with binutils 2.23, now fails with 2.24: $ cat thread.cpp #include void factorial(int n, unsigned long long int *result) { if (n==1) { *result=1; return;