public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* other/10182: wrong conversion [unsigned -> double] with [-masm=intel]
@ 2003-03-21 13:26 markus.mauhart
0 siblings, 0 replies; 2+ messages in thread
From: markus.mauhart @ 2003-03-21 13:26 UTC (permalink / raw)
To: gcc-gnats
>Number: 10182
>Category: other
>Synopsis: wrong conversion [unsigned -> double] with [-masm=intel]
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Mar 21 13:26:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: markus.mauhart@chello.at
>Release: gcc version 3.2 20020927 (prerelease)
>Organization:
>Environment:
cygwin under winXP, AMD Duron
>Description:
When using option "-masm=intel", then all conversions from unsigned u (with u>=0x8000 (32768)) to double fail. One effect then is that all conversions from "[U]LONGLONG" to double fail for x>0x8000.
This is with C and C++ code.
>How-To-Repeat:
Compile 123.c like ...
gcc -v -save-temps -masm=intel -o 123.exe -g 123.c
... and then run 123.exe: it then displays correct conversions (all signed -> double) and incorrect conversions (all unsigned>=32768)
//file 123.c
#include <stdio.h>
int main (int x,char const* const y[])
{
unsigned int u = 0x4000 ;
for ( ;u ;u*=2)
{
int i ;
double du ;
double di ;
i = --u , du = u , di = i ;
printf ("u=% 8x, double(u)=% 14.1f, i=int(u)=% 11i, double(i)=% 14.1f\n"
,u ,du ,i ,di) ;
i = ++u , du = u , di = i ;
printf ("u=% 8x, double(u)=% 14.1f, i=int(u)=% 11i, double(i)=% 14.1f\n"
,u ,du ,i ,di) ;
}
return 0 ;
}
>Fix:
AFAIK the only workaround is to remove the option [-masm=intel]
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: other/10182: wrong conversion [unsigned -> double] with [-masm=intel]
@ 2003-03-21 13:55 paolo
0 siblings, 0 replies; 2+ messages in thread
From: paolo @ 2003-03-21 13:55 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, markus.mauhart, nobody
Synopsis: wrong conversion [unsigned -> double] with [-masm=intel]
State-Changed-From-To: open->closed
State-Changed-By: paolo
State-Changed-When: Fri Mar 21 13:55:09 2003
State-Changed-Why:
See other/10181.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10182
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-03-21 13:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-21 13:26 other/10182: wrong conversion [unsigned -> double] with [-masm=intel] markus.mauhart
2003-03-21 13:55 paolo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).