Thread View: net.unix-wizard
1 messages
1 total messages
Started by utzoodecvaxharposeismodmy
Tue, 14 Dec 1982 16:48
c2 (c optimizer) bug
Author: utzoodecvaxharposeismodmy
Date: Tue, 14 Dec 1982 16:48
Date: Tue, 14 Dec 1982 16:48
27 lines
943 bytes
943 bytes
/*
The following program contains, as one line, the smallest version of a
c-optimizer bug that I could construct. I looked at the erroneous assembler
code produced by the optimizer, and this is definitely a compiler problem.
Anyone know of this bug before?
On our 4.1absd, running a.out after cc -O test.c produces 840.
After cc test.c, it produces the correct value of 50.
The bug (in the optimized object code) is a missing cvtdl (I believe).
*/
main()
{
float f;
int n;
f = 50.0;
n = (int)f & 07777; /* this statement is the bug */
printf("%d\n",n);
}
/*
--dmy--
*/
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads