public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: ee96090@fe.up.pt
To: gcc-gnats@gcc.gnu.org
Subject: c/2995: __complex__ int typecasts maybe broken
Date: Tue, 29 May 2001 11:06:00 -0000	[thread overview]
Message-ID: <20010529180254.6305.qmail@sourceware.cygnus.com> (raw)

>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


             reply	other threads:[~2001-05-29 11:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-29 11:06 ee96090 [this message]
2003-05-08  8:46 Dara Hazeghi
2003-05-08  8:56 Joseph S. Myers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010529180254.6305.qmail@sourceware.cygnus.com \
    --to=ee96090@fe.up.pt \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).