[net.bugs.usg] Fatal bugs with

gm@lmi-angel.UUCP (07/18/86)

The following C code fragments cause fatal compiler errors.
The compiler is PCC2 as distributed with System 5.0 for the
68K from Motorola.  The comments summarize what works and
what doesn't. (including the compiler error messages)

foo()
{
	register double	*rdp;
	double		*dp;
	double		d;

	/* these are OK */

	d = *dp++;

	*rdp++;
	d = *rdp;

	/*      vv  compiler error: Illegal byte address (ZB) */
	d = *rdp++;
}

bar()
{
	double		*dp;
	double		d;

	/* these are OK */

	d = dp[0];
	d = dp[1];

	dp[0] = d;
	dp[1] = d;


	/*    vvv  compiler error: allocation fails, op STAR */
	d = dp[0] = 0;

	/*    vvv  compiler error: cfix trouble */
	d = dp[1] = 0;
}

I imagine that these have been found and fixed before and that
they probably work in 5.2 and/or 5.3.  Unfortunately, my company
is only peripherally involved as a UNIX vendor and doesn't want
to spend any money to upgrade.  So... I would greatly appreciate
any patches available that fix this or any other nasty bugs in
5.0.  Does anyone have a standard kit of patches for 5.0? (Doug Gwyn?)

BTW, I found a couple more fatal bugs that result from too-small
table sizes.  I'm pretty irritated that PCC's tables are allocated
statically.  Is this still the case with newer C compilers from AT&T?

Thanks Mucho,
-- 
-- Greg McGary        {decvax!cca,harvard,mit-eddie}!lmi-angel!gm
--
``Make something of yourself! ... Try a casserole!''

gwyn@brl-smoke.UUCP (07/20/86)

In article <76@lmi-angel.UUCP> gm@lmi-angel.UUCP (Greg McGary) writes:
>	/*      vv  compiler error: Illegal byte address (ZB) */
>	/*    vvv  compiler error: allocation fails, op STAR */
>	/*    vvv  compiler error: cfix trouble */
>Does anyone have a standard kit of patches for 5.0? (Doug Gwyn?)

Sorry; I don't have access to PCC2.  The first error may be due
to a deficiency in the code-generation table; the second I would
guess is a problem with double register allocation (does the m68
SGS even support floating-point?  Perhaps you have to turn on an
option to get it).

As to general patches to UNIX System V user-mode code:  I have
many of these, but they're embedded in our copy of the sources
(usually with comments containing "DAG" as a cheap form of log)
and not as a special "patch package".