[MLton-user] experimental release 20051109
Matthew Fluet
fluet@cs.cornell.edu
Sun, 13 Nov 2005 19:34:05 -0500 (EST)
>> John sent me the log and C code, and we discovered that his
>> MLton-generated C code is identical to mine. The difference we're
>> seeing is due to the fact that John is using gcc 4.0.1, while I am
>> using gcc 3.3. At this point, I suspect we are running into a gcc
>> 4.0.1 optimizer bug, or possibly a problem due to MLton generating
>> non-compliant C. As further evidence, I had John compile the C code
>> with -O0, and it worked perfectly.
>
> As another data point, I get errors with time profiling with gcc 4.0.1 on
> x86-linux with -codegen c:
>
> [fluet@localhost temp]$ mlton-stable -verbose 1 -profile time -codegen c
> -keep g -keep o z.sml
> MLton MLTONVERSION (built Sat Nov 12 16:56:13 2005 on localhost.localdomain)
> MLton starting
> Compile SML starting
> pre codegen starting
> pre codegen finished in 1.92 + 1.02 (35% GC)
> C code gen starting
> C code gen finished in 0.02 + 0.00 (0% GC)
> Compile SML finished in 1.94 + 1.02 (34% GC)
> Compile C and Assemble starting
> gcc -std=gnu99 -c -I/home/fluet/mlton/mlton-stable/build/lib/include \
> -O1 -fno-strict-aliasing -fomit-frame-pointer -w -m32 \
> -mtune=opteron -o z.1.o z.1.c
> z.1.c:162: error: 'MLtonProfile0 aliased to undefined symbol MLtonProfile0_internal'
Also, these errors do not go away with -O0.