This is probably an egcs 2.91.66 introduced compiler optimization b ug,
Horst von Brand
vonbrand@pincoya.inf.utfsm.cl
Thu Jan 6 11:36:00 GMT 2000
wtenhave@sybase.com said:
[...]
> #define CHK_A (long)0x40000000
> #define CHK_B (long)0x80000000
>
> main ()
> {
> long rdata = CHK_B;
>
> if ((rdata & CHK_A) ||
> !(rdata & CHK_B))
> {
> printf ("BAD NEWS\n");
> } else
> {
> printf ("GOOD NEWS\n");
> }
> }
The reported bug is present on sparc-linux (Red Hat 6.1, egcs-1.1.2-24)
too; egcs-20000103 doesn't have it. Also, on SPARC Solaris 2.6 gcc-2.95.2
doesn't show the problem, so it apperas fixed.
--
Dr. Horst H. von Brand mailto:vonbrand@inf.utfsm.cl
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria +56 32 654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513
More information about the Gcc-bugs
mailing list