This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: egcs problem by someone else
- To: alex dot buell at tahallah dot demon dot co dot uk
- Subject: Re: egcs problem by someone else
- From: Carlo Wood <carlo at runaway dot xs4all dot nl>
- Date: Tue, 7 Jul 1998 01:54:39 +0200 (CEST)
- Cc: egcs at cygnus dot com (egcs at cygnus dot com)
| static int f(int) __attribute__((const));
|
| int main()
| {
| int f1, f2, x;
| x = 1; f1 = f(x);
| x = 2; f2 = f(x);
| if (f1 != 1 || f2 != 2)
| abort ();
| exit (0);
| }
|
| static int f(int x) { return x; }
| ---
|
| This works fine on my system - at least, it doesn't call abort().
| egcs-1.0.3a (2.90.29), i486, linux-2.1.108, binutils-2.1.9.0.7. Hope this
| helps someone.
|
| Cheers,
| Alex
You must compile it with -O2
--
Carlo Wood <carlo@runaway.xs4all.nl>