c/2995: __complex__ int typecasts maybe broken
ee96090@fe.up.pt
ee96090@fe.up.pt
Tue May 29 11:06:00 GMT 2001
>Number: 2995
>Category: c
>Synopsis: __complex__ int typecasts maybe broken
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue May 29 11:06:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: egcs
>Release: egcs-2.91.66
>Organization:
>Environment:
Slackware 7.1
>Description:
The attached program has the following output:
real = 1; imag = -1; y = 5
Which means the typecasts from (__complex__ short int) to
(__complex__ int) are not working. There is a computation
with complex int (x) and another with normal int (y). y is
computed correctly (as expected) whilst x isn't.
>How-To-Repeat:
Just compile and run the program.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="test.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test.c"
I2luY2x1ZGUgPGNvbXBsZXguaD4KI2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxsaW1pdHMu
aD4KCgp2b2lkIG1haW4odm9pZCkKewogICAgLyoqLyAgICAgICAgc2hvcnQgaW50IHk7CiAgICBf
X2NvbXBsZXhfXyBzaG9ydCBpbnQgeDsKICAgIAogICAgeCA9IDEwICsgN2o7CiAgICB5ID0gNTsK
ICAgIHggPSAoKChfX2NvbXBsZXhfXyBpbnQpeCkgKiBTSFJUX01BWCkgLyBTSFJUX01BWDsKICAg
IHkgPSAoKCggICAgICAgICAgICBpbnQpeSkgKiBTSFJUX01BWCkgLyBTSFJUX01BWDsKICAgIHBy
aW50ZigicmVhbCA9ICVoaTsgaW1hZyA9ICVoaTsgeSA9ICVoaVxuIiwgX19yZWFsX18geCwgX19p
bWFnX18geCwgeSk7Cn0K
More information about the Gcc-prs
mailing list