Re: -O2 cause optimization issues while va parameters functions

2011-04-27 Thread Michael Hope
On Wed, Apr 27, 2011 at 9:52 PM, Barry Song <21cn...@gmail.com> wrote: > 2011/4/27 Andrew Stubbs : >> On 27/04/11 10:23, Barry Song wrote: >>> >>> the target binary got crash while running on armv7 board, not gcc :-) >> >> I suspect I know what the problem is here. >> >> Can you try again with -fno

Re: -O2 cause optimization issues while va parameters functions

2011-04-27 Thread Barry Song
2011/4/27 Andrew Stubbs : > On 27/04/11 10:23, Barry Song wrote: >> >> the target binary got crash while running on armv7 board, not gcc :-) > > I suspect I know what the problem is here. > > Can you try again with -fno-shrink-wrap, please? i guess it is related with this bug: https://bugs.launchp

Re: -O2 cause optimization issues while va parameters functions

2011-04-27 Thread Andrew Stubbs
On 27/04/11 10:23, Barry Song wrote: the target binary got crash while running on armv7 board, not gcc :-) I suspect I know what the problem is here. Can you try again with -fno-shrink-wrap, please? Andrew ___ linaro-toolchain mailing list linaro-t

Re: -O2 cause optimization issues while va parameters functions

2011-04-27 Thread Barry Song
2011/4/27 Andrew Stubbs : > On 27/04/11 10:08, Barry Song wrote: >> >> Hi All, >> >> As i have frequently said, we are using 2011.3 4.5 linaro gcc. For the >> following codes, if we compile it by -O2, it will crash with "segment >> fault", if we just comment " if(unifi_debug>= level) {", all will b

Re: -O2 cause optimization issues while va parameters functions

2011-04-27 Thread Andrew Stubbs
On 27/04/11 10:08, Barry Song wrote: Hi All, As i have frequently said, we are using 2011.3 4.5 linaro gcc. For the following codes, if we compile it by -O2, it will crash with "segment fault", if we just comment " if(unifi_debug>= level) {", all will be ok. If we don't compile it by -O2, all wi

-O2 cause optimization issues while va parameters functions

2011-04-27 Thread Barry Song
Hi All, As i have frequently said, we are using 2011.3 4.5 linaro gcc. For the following codes, if we compile it by -O2, it will crash with "segment fault", if we just comment " if(unifi_debug >= level) {", all will be ok. If we don't compile it by -O2, all will be ok too. #include #include #in