Why system gcc that is 4.2.1 produces different code than gcc-4.2.1 compiled from sources?

2010-04-25 Thread Yuri
I ran this simple example: #include stdlib.h #include stdio.h int fib(int AnArg) { if (AnArg = 2) return (1); return (fib(AnArg-1)+fib(AnArg-2)); } int main(int argc, char* argv[]) { int n = atoi(argv[1]); printf(fib(%i)=%i\n, n, fib(n)); } through system gcc and gcc built from sources.

Re: Why system gcc that is 4.2.1 produces different code than gcc-4.2.1 compiled from sources?

2010-04-25 Thread Leonidas Tsampros
Yuri y...@rawbw.com writes: I ran this simple example: #include stdlib.h #include stdio.h int fib(int AnArg) { if (AnArg = 2) return (1); return (fib(AnArg-1)+fib(AnArg-2)); } int main(int argc, char* argv[]) { int n = atoi(argv[1]); printf(fib(%i)=%i\n, n, fib(n)); } through

Re: Why system gcc that is 4.2.1 produces different code than gcc-4.2.1 compiled from sources?

2010-04-25 Thread Michaël Grünewald
Leonidas Tsampros wrote: I'm pretty sure that a small difference in execution time does not mean that the produced code is different. Actually, execution time of a process is very sensitive to the environment of this process. See for instance: