Related articles |
---|
RS/6000 Optimizer breaks code -- suggestions? banshee@ucscb.ucsc.edu (1990-08-18) |
RS/6000 Optimizer breaks code -- suggestions? jar@florida.eng.ileaf.com (1990-08-21) |
Re: RS/6000 Optimizer breaks code -- suggestions? worley@compass.com (1990-08-24) |
Re: RS/6000 Optimizer breaks code -- suggestions? daveg@near.cs.caltech.edu (1990-08-25) |
Re: RS/6000 Optimizer breaks code -- suggestions? johnv@metaware.uucp (1990-08-27) |
Re: RS/6000 Optimizer breaks code -- suggestions? johnv@metaware.com (1990-08-27) |
Re: RS/6000 Optimizer breaks code -- suggestions? worley@compass.com (1990-08-29) |
Newsgroups: | comp.compilers |
From: | johnv@metaware.com (John Vinopal) |
Keywords: | debug, optimize, C |
Organization: | Metaware Incorporated, Santa Cruz, CA |
References: | <9008241836.AA07588@sn1987a.compass.com> <DAVEG.90Aug25210918@near.cs.caltech.edu> |
Date: | 27 Aug 90 20:48:40 GMT |
[Commentary deleted]
>But, having said all that, I actually agree with your assertion that the
>implentation is not "sane", but only because the situations where it's
>safe to rearrange a union are probably rare, and more often than not will
>occur because the programmer was trying to use the union to fake up a
>type cast. So the optimization is more likely to hurt than to help.
>
>[Can someone run the original code through the RS/6000 compiler, look at
>the object code, and report whether the compiler is in fact doing something
>strange? IBM is usually pretty good at reading standards. -John]
The union in this case was in fact used as a type cast of sorts; a method
to prevent a short from overflowing. Bad style and not portable begins to
sum up this approach. However...
This has been submitted to IBM tech and verified as a real bug. If anyone
would like a 'clean' copy of the code in question, please mail requests to
banshee@ucscb.UCSC.EDU.
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.