Article View: comp.sys.atari.st
Article #29485Alcyon C Bug N++
From: aking
Date: Sat, 05 Dec 1987 12:58
Date: Sat, 05 Dec 1987 12:58
46 lines
1810 bytes
1810 bytes
Has anybody seen the following bug in version 4.14 of Alcyon C?
Neil: Is there a bug list for 4.14? This bug cost me 6 hours to find,
and I've found many others. When is the next rev going to be out?
Will it fix this?
/*
* The Alcyon C compiler (Version 4.14) gets confused with the following
* fragment, thinking that "y" in the assignment to F->y (line 10) is of
* type "struct in".
*
* The fault seems to require that the same names be used in the two structs,
* and that the two seemingless senseless compound statements are present.
* (Why put them there? Well this is boiled down from a 300+ line program
* which exhibited the same funnyness).
*
* A fragment of the .s file is shown below
*/
main ()
{ register struct fl {float x, y;} *F;
register struct in {int x, y;} *I;
{
{
I += 2;
}
F->y = F->y - 3.0; /* line 10 */
}
}
------------------------------ produces: --------------------
~I=R12 | yep, they're register based
~F=R13
*line 8
add.l #8,R12
*line 10
move.l #$c00000c2,-(sp) | -3.0
move.l $4(R13),-(sp) | F->y
jsr _fpadd
addq.l #8,sp
move.l R0,-(sp)
jsr _fpftol | Floating Point to Long !
addq.l #4,sp
move R0,$2(R13) | offset looks like "struct in"
| to me
Technical Details
Message-ID:
<8712051307.AA12109@ucbvax.Berkeley.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!labrea!jade!ucbvax!BFLY-VAX.BBN.COM!akingShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!rutgers!labrea!jade!ucbvax!BFLY-VAX.BBN.COM!aking From: aking@BFLY-VAX.BBN.COM.UUCP Newsgroups: comp.sys.atari.st Subject: Alcyon C Bug N++ Message-ID: <8712051307.AA12109@ucbvax.Berkeley.EDU> Date: Sat, 5-Dec-87 07:58:28 EST Article-I.D.: ucbvax.8712051307.AA12109 Posted: Sat Dec 5 07:58:28 1987 Date-Received: Thu, 10-Dec-87 04:53:53 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 46