[11182] in Athena Bugs
decmips 7.6G: cygnus gcc (/mit/cygnus/decmipsbin/gcc)
daemon@ATHENA.MIT.EDU (tlc@MIT.EDU)
Sat Oct 9 18:17:13 1993
From: tlc@MIT.EDU
To: bugs@MIT.EDU
Date: Sat, 09 Oct 93 18:17:05 EDT
System name: w20-575-79
Type and version: KN02ba 7.6G
Display type: PMAGB-BA
What were you trying to do?
Writing a fast counting sort procedure.
What's wrong:
Used gcc with -O2, and the sort occured correctly. Used
gcc with -O2 -funroll-loops, and the numbers were no
longer sorted despite no changes to the code.
What should have happened:
The list should have been sorted correctly -- I believe my code is
correct, and the fact that it functioned with -O2 leads me to
believe that there is something wrong with -funroll-loops.
Please describe any relevant documentation references:
The file which I tried to compile is available as
/mit/tlc/misc/courses/6.046/one/one.c -- the relevant function is
sort_words.
I hope this helps.
max