The actual gcc version is gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
When compiled and run with this gcc version, using the command line gcc -O xxx.c && a.out the attached program outputs -1, whereas the correct output is 0. If I use gcc 3.3.6 or leave away the -O flag, the program produces correct output. -- Summary: -(x>y) generates wrong code Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: anton at mips dot complang dot tuwien dot ac dot at GCC host triplet: arm-linux-gnu GCC target triplet: arm-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31152