Gcc-mcore -O3?
Nick Clifton
nickc@redhat.com
Thu Jan 18 20:29:00 GMT 2001
Hi Yanbo,
: Me again. You are the expert of GCC for MCore. Can I have your help
: again?
Sure, send $5 in unmarked bills to.... :-)
: When I compile several c modules and run on the MCore EVB with "-g
: -c", everything is OK. But, when I apply "-c -O3" on the same files,
: the activities become unpredictable. I don't know why? Please help
: me.
This is probably due to a bug in the MCore port. Most likely an
optimisation is being performed that is generating incorrect code.
Without any more information I cannot narrow down the source of the
problem.
Here are some things you can try, in order to help locate the problem:
* Does the problem occur at -O2 ? How about -Os ?
* Are there any other switches that you are passing to gcc ?
If so, does the problem go away when you remove them from the
command line ?
* Does the problem still occur if you add the -g flag to gcc's
command line, in order to enable debugging ? If so, then cvan you
use a debugger to narrow down where this unpredictable behavior
is occurring ?
* Can you create a small, reproducible test case that demonstrates
the problem ? If so, if you past that test case to the list,
along with instructions on how to make the problem happen, then
other people can have a go at tracking down the bug.
* Does the problem happen in the simulator as well as on the
hardware ? can you use the instruction tracing feature of the
simulator to track down where the misbehavior occurs ?
Cheers
Nick
More information about the Gcc-help
mailing list