powerpc-eabi signed char arguments and optimization
Brian Ford
ford@vss.fsi.com
Fri Oct 23 10:21:00 GMT 1998
I have a sparc-sun-solaris2.6 -> powerpc-unknown-eabi cross compiler from
egcs1.1b - current CVS sources that gives me this problem. Note that this
is a simulation of the actual problem as the embedded system I use cannot
execute this exact code.
#include <stdio.h>
void test(signed char a) {
printf("a: %x\n", a);
}
int main(void) {
signed char a = -60;
test(a);
return 0;
}
Output with -O0:
a: c4
Output with -O1+
a: 107cec4
Anybody know why this happens? GCC 2.8.1 does not do this.
--
Brian Ford
Software Engineer
Vital Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax: 314-551-8444
More information about the Gcc-bugs
mailing list