pfalstad@phoenix.Princeton.EDU (Paul John Falstad) (03/27/90)
[I downloaded this off the Manx BBS. Hope it helps.]
Following is a quick list I put together of known Amiga 5.0a bugs and common
problems. If your 'favorite' bug is not listed, fear not - it probably
just was reported too late to make it on this list or we're still looking into
it. However, you may want to just send me a brief reminder just to make sure
that it didn't get lost in the shuffle.
KNOWN AMIGA 5.0a BUGS & 3.6a INCOMPATABILITIES
----------------------------------------------
Description
------------------------------------------------------------------------------
Internal compiler error 'Attempt to release item already free'.
Workaround: simplify expression.
------------------------------------------------------------------------------
The stderr stream is fully buffered when redirected to a file. This can
cause you to lose information if your program terminates abnormally and
you needed to see the stderr messages (i.e., your program crashes).
------------------------------------------------------------------------------
The d0 register is extraneously loaded for code like:
int i,j;
for (i = j = 0; whatever; i++, j++);
Not really a bug per se, but it makes for un-optimal code.
------------------------------------------------------------------------------
The BeginIO function trashes the A6 register.
------------------------------------------------------------------------------
'ls' dates are 8 years off.
------------------------------------------------------------------------------
The code 'char name[][] = {"asdf","asdf"};' should generate an
error (only allowed one open array index), but doesn't.
------------------------------------------------------------------------------
The code 'char name[][][] = {"asdf","asdf"};' crashes the compiler.
------------------------------------------------------------------------------
The compiler's -qa option generates bad prototypes for function
arguments w/ type modifiers such as const, volatile, etc.
------------------------------------------------------------------------------
Bad code is generated when local arrays are initialized to an
odd number of bytes (e.g., char foo[] = "ab"; as the last local
variable).
------------------------------------------------------------------------------
The macro 'FUNCDEF' is missing from the assembly headers. The definition for
it is:
COUNT SET -30
FUNCDEF MACRO
_LVO\1 EQU COUNT
COUNT SET COUNT-6
ENDM
------------------------------------------------------------------------------
Functions.h has incorrect prototypes, mostly in the Dos functions.
------------------------------------------------------------------------------
Compiler generates a 'cmp.s' instruction (which is illegal) for
passing of a float constant of 0 to a function.
Workaround: have the function prototype/definition use a double instead of a
float.
------------------------------------------------------------------------------
Compiler crashes upon encountering 'error 12: illegal pointer
reference'. This can be done by trying to de-refernce a variable
of type 'char'.
------------------------------------------------------------------------------
SDB occasionally gurus unexepectantly. Not confirmed - if you have a
reproducible example of this, please get it to us ASAP.
------------------------------------------------------------------------------
SDB can take a long time to trace over library functions (30-60
seconds). Also not confirmed, but there seems to be a significant # of people
reporting this.
------------------------------------------------------------------------------
SDB acts strangely when the -sn or -so options are used. Not really a bug,
but a consequence of design. Obvious fix is don't use those options
when using SDB.
------------------------------------------------------------------------------
The compiler option -qa generates bad prototypes for structure-
typedef's where the structure does not have a tag name (e.g.,
typedef struct { int i; char c; } foo;). The compiler always uses the struct
name instead of the typedef, which gets you into trouble in cases like this.
------------------------------------------------------------------------------
The compiler option -qa does not give any diagnostic messages if
the '.pro' file is not created (like if there's a disk error).
------------------------------------------------------------------------------
See Bix Message # 1981 for alternate __main() startup code. This hasn't been
fully evaluated by us at Manx, but may be useful if you're having problems.
Sorry, I haven't uploaded it to the BBS yet.
------------------------------------------------------------------------------
The 'setdat' utility doesn't work.
------------------------------------------------------------------------------
The 'obd' utility gives sporadic 'out of memory' error messages.
------------------------------------------------------------------------------
The cia resource functions are missing from the library and from
functions.h.
------------------------------------------------------------------------------
The -qa compiler option generates incompatible prototypes for
functions defined using K&R style.
Workaround: change 'char' and 'float' in prototypes to 'int' and 'double'.
------------------------------------------------------------------------------
The -pp option (chars unsigned by default) is not implimented in 5.0a.
------------------------------------------------------------------------------
Enum function arguments generate 'argument type mismatch' errors
on prototyped functions when used w/ -wa. Works fine if -wa is not used.
------------------------------------------------------------------------------
'Expression too complex' internal compiler error message can occur on some
complex code.
Workaround: simplify expression/code.
------------------------------------------------------------------------------
'Attempted to free reg not allocated!' error message. See above.
------------------------------------------------------------------------------
'scanf ("%f",&a_double);' does not work w/ -f8. Not really a bug, but a 3.6a
incompatability. Should say 'scanf ("%lf",&a_double);' instead.
------------------------------------------------------------------------------
The -qf option (QuickFix) does not give an error if it can't exec
the editor, or if the 'CCEDIT' environment variable doesn't exist.
------------------------------------------------------------------------------
The compiler generates incorrect code for small code/small data for array
accesses like "c = lookup[c-'A'];". Works OK in large data model.
------------------------------------------------------------------------------
The register allocator (-sr option) does not automatically allocate floating
point variables to floating point registers if the -f8 option is used.
------------------------------------------------------------------------------pfalstad@phoenix.Princeton.EDU (Paul John Falstad) (03/27/90)
The following is a series of code fragments that demonstrate bugs in Manx
5.0a. I have notified Manx of all these problems.
/* compiled with ccopts = -bs -hi inc: -mbe -papl0t -sn -wlopd */
/* program 1 */
/* gives internal errors */
typedef struct {
int hm,strg,dex;
} npc;
int Random(int);
void NewLevel(const int who)
{
npc *Npc;
Npc->strg += Random(2)+5;
Npc->dex += Random(2)+5;
Npc->hm += 100;
}
/* program 2 */
typedef enum {YES,NO} maybe;
void main(void),decide(maybe);
void main(void)
{
decide(YES); /* <- what's wrong with that? */
}
void decide(maybe not){return;}
/* program 3 */
typedef enum {YES,NO} maybe;
void SayHello(int,int,int,maybe,maybe,int,int,int);
void main(void)
{
SayHello(1,2,3,YES,NO,4,5,6);
}
void SayHello(int a,int b,int c,maybe d,maybe e,int f,int g,int h)
{
printf("%ld %ld %ld %ld %ld %ld\n",a,b,c,f,g,h);
printf("%ld %ld\n",d,e);
}
/* program 4 */
typedef enum {YES,NO} maybe;
struct choice {
maybe choice;
int count;
};
void main(void);
void main(void)
{
static struct choice pick = {NO,1};
printf("%ld\n",pick.choice); /* these two give wrong output */
printf("%ld\n",pick.count);
}
/* program 5 */
main()
{
printf("%s","A\x20" "B"); /* this gives wrong output */
}