RE: What happened when using -Os with gcc?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry, it's my fault.

I tried again in GCC 3.4.6 in a separate program with -Os, it's a problem.
But it's running okay in GCC 4.3.x. So Ian is right, it should be a bug in
3.4.6.
Thanks a lot,

Win.

-----Original Message-----
From: gcc-help-owner@xxxxxxxxxxx [mailto:gcc-help-owner@xxxxxxxxxxx] On
Behalf Of Tech Win
Sent: July 1, 2009 20:09
To: 'Ian Lance Taylor'
Cc: gcc-help@xxxxxxxxxxx
Subject: RE: What happened when using -Os with gcc?

I have to bear with GCC 3.4.6 because I don't have permission to upgrade it.

The thing is this piece of code doesn't work if putting it in our system and
with the -Os option, if I try it separately, seems okay. Maybe you suspect
it's our system's bug, but if I don't use gcc optimization (-O0), or use
-O1, -O2, -O3, all no problem.

-----Original Message-----
From: Ian Lance Taylor [mailto:iant@xxxxxxxxxx] 
Sent: July 1, 2009 19:34
To: Tech Win
Cc: gcc-help@xxxxxxxxxxx
Subject: Re: What happened when using -Os with gcc?

"Tech Win" <tech_win@xxxxxxx> writes:

> But if I use -Os when compiling, the result is: 
> ================= LAST =============== 
> 1 --- 1 
> 1 --- 0 
> 1 --- 0 
> t=2525.00

This certainly suggests a bug in the compiler.


> My GCC version is 3.4.6.

I tried 4.3.2 on i686-unknown-linux-gnu, and it worked as expected with
both -O2 and -O2.

The current version of gcc is 4.4.0.

Ian
Checked by AVG - www.avg.com 
Version: 8.5.375 / Virus Database: 270.13.2/2213 - Release Date: 07/01/09
18:07:00

Checked by AVG - www.avg.com 
Version: 8.5.375 / Virus Database: 270.13.2/2213 - Release Date: 07/01/09
18:07:00


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux