This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Apple's gcc -fast. revisited...
- From: Gordon Royle <gordon at csse dot uwa dot edu dot au>
- To: gcc-help at gcc dot gnu dot org
- Date: 10 Oct 2003 17:03:54 +0800
- Subject: Apple's gcc -fast. revisited...
I have been having weird behaviour with Apple's gcc...
Consider the following program:
#include <stdio.h>
main(int argc, char **argv) {
unsigned long long y;
y = 0xffcc000000000000ULL;
printf("%llx\n",y);
}
Using
gcc version 3.3 20030304 (Apple Computer, Inc. build 1435)
if I compile it just with "gcc -o test test.c" and run it, I get the
output of
ffcc000000000000
If I use "gcc -fast -o test test.c" and then run it, I get
0
But if I add a few more options, just for fun,
gcc -fast -mcpu=970 -mtune=970 -mpowerpc64 -o test test.c
then it reverts to
ffcc000000000000
Am I doing something dumb with the use of "unsigned long long" or is
that genuinely a problem?
I have a range of other, but much more complicated programs that either
crash, or cause the copmiler to barf when compiled with "-fast", but on
the other hand, using it with the other flags gives me a huge speedup on
one program that I want to run!
--
Dr. Gordon Royle, http://www.csse.uwa.edu.au, gordon(AT)csse.uwa.edu.au
--