[2070] in Athena Bugs
Re: saber & gcc sources: internal errors
daemon@ATHENA.MIT.EDU (Ken Raeburn)
Tue Apr 11 11:50:28 1989
Date: Tue, 11 Apr 89 11:50:07 EDT
From: Ken Raeburn <raeburn@ATHENA.MIT.EDU>
To: kendall%saber@harvard.harvard.edu
Cc: saber-bugs@ATHENA.MIT.EDU, bugs@ATHENA.MIT.EDU
In-Reply-To: kendall%saber@harvard.harvard.edu's message of Tue, 11 Apr 89 00:49:03 EDT,
Date: Tue, 11 Apr 89 00:49:03 EDT
From: kendall%saber@harvard.harvard.edu
Date: Mon, 27 Mar 89 01:07:53 EST
From: Ken Raeburn <raeburn@ATHENA.MIT.EDU>
void elc () {
asf = ((tree)0) -> common.type -> type.mode == BLKmode;
}
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?
This was done as part of a macro, which was something like
#define FOO(x) ((x) && TREE_TYPE(TYPE_MODE(x))==BLKmode)
so that the indirection would never have been evaluated for the case
of null. In a couple of instances, "(tree)0" was getting passed to
the macro.
-- Ken