optimization/4570: error reading bytes from double variable
philippe_ribet@hotmail.com
philippe_ribet@hotmail.com
Mon Oct 15 02:06:00 GMT 2001
>Number: 4570
>Category: optimization
>Synopsis: error reading bytes from double variable
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Oct 15 02:06:02 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: philippe_ribet@hotmail.com
>Release: gcc version 3.0.2 20010922
>Organization:
>Environment:
Athlon processor
>Description:
gcc-3.0.1 give good result up to -O2, bad one with -O3
gcc-3.0.2 give good result without optimization, bad with -O2
May be relative to optimization recently moved from -O3 to -O2.
main()
{
double e=0;
e=(double)(0.5);
printf("e=%08x%08x\n",*((int *)(((char *)(&e)))),*((int *)(((char *)(&e))+4)));
}
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list