This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

egcs problem by someone else


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]