egcs problem by someone else

Alex Buell alex.buell@tahallah.demon.co.uk
Mon Jul 6 04:08:00 GMT 1998


The test program below posted by someone on the list:

---
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
--
 /\_/\  Legalise cannabis now! 
( o.o ) Smoke some cannabis today!
 > ^ <  Peace, Love, Unity and Respect to all.

http://www.tahallah.demon.co.uk




More information about the Gcc mailing list