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]

c/2995: __complex__ int typecasts maybe broken



>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


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