This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: This is probably an egcs 2.91.66 introduced compiler optimization b ug,


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]