This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: This is probably an egcs 2.91.66 introduced compiler optimization bug,
- To: vonbrand at pincoya dot inf dot utfsm dot cl
- Subject: Re: This is probably an egcs 2.91.66 introduced compiler optimization bug,
- From: wtenhave at sybase dot com
- Date: Thu, 6 Jan 2000 21:35:57 +0100 (CET)
- cc: egcs-bugs at egcs dot cygnus dot com, gcc-bugs at gcc dot gnu dot org, bug-gcc at gnu dot org
- Reply-To: wtenhave at sybase dot com
On 6 Jan, Horst von Brand wrote:
> 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.
As does alpha-linux (Red Hat 6.1, egcs-1.1.2-24). You have to change the
declarations to 'int' or define CHK_B for 0x8000000000000000 here of course.
--
-- Wim ten Have. AUDIX: 245 2981
Phone: (+31) 346 582981, Fax: Euro (+31) 346 552884, Room (+31) 346 558415