[2069] in Athena Bugs
Re: saber & gcc sources: internal errors
daemon@ATHENA.MIT.EDU (kendall%saber@harvard.harvard.edu)
Tue Apr 11 00:49:15 1989
Date: Tue, 11 Apr 89 00:49:03 EDT
From: kendall%saber@harvard.harvard.edu
To: raeburn@ATHENA.MIT.EDU
Cc: saber-bugs@ATHENA.MIT.EDU, bugs@ATHENA.MIT.EDU
In-Reply-To: Ken Raeburn's message of Mon, 27 Mar 89 01:07:53 EST <8903270607.AA11029@PROMETHEUS.MIT.EDU>
Date: Mon, 27 Mar 89 01:07:53 EST
From: Ken Raeburn <raeburn@ATHENA.MIT.EDU>
After a bit of narrowing down, I've come up with this file which
causes saber 2.1-beta2 to get a seg fault while loading.
enum foo {
BLKmode,
stuff
};
typedef struct {
struct {
enum foo mode;
} type;
} *x;
typedef union {
struct {
x type;
} common;
} *tree;
extern int asf;
void elc () {
asf = ((tree)0) -> common.type -> type.mode == BLKmode;
}
It doesn't seem to lose if the "0" is replaced by a variable, or if
there are fewer levels of indirection, but I haven't really pursued it
much past the above...
The problem is that Saber-C gives an internal error (segfault) to any
indirection of a constant pointer that is bad.
Does this sort of thing, indirection of the constant null pointer, go on
in the gcc sources? If so, why? To compute structure offsets?
----
Sam Kendall kendall%saber@harvard.harvard.edu
Saber Software, Inc. uunet!harvard!saber!kendall
(617) 876-7636