public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/4573: Test of NOT with Logical*1 inbetween (IEEE) fails
@ 2002-04-23  1:40 rth
  0 siblings, 0 replies; 2+ messages in thread
From: rth @ 2002-04-23  1:40 UTC (permalink / raw)
  To: andreas.krakowczyk, erwin.unruh, joachim.canisius, gcc-bugs,
	gcc-prs, nobody

Synopsis: Test of NOT with Logical*1 inbetween (IEEE) fails

State-Changed-From-To: open->closed
State-Changed-By: rth
State-Changed-When: Tue Apr 23 01:40:39 2002
State-Changed-Why:
    Fixed for gcc 3.1.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4573


^ permalink raw reply	[flat|nested] 2+ messages in thread

* c/4573: Test of NOT with Logical*1 inbetween (IEEE) fails
@ 2001-10-15  8:26 andreas.krakowczyk
  0 siblings, 0 replies; 2+ messages in thread
From: andreas.krakowczyk @ 2001-10-15  8:26 UTC (permalink / raw)
  To: gcc-gnats; +Cc: erwin.unruh, joachim.canisius

>Number:         4573
>Category:       c
>Synopsis:       Test of NOT with Logical*1 inbetween (IEEE) fails
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Oct 15 08:26:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     andreas.krakowczyk@fujitsu-siemens.com
>Release:        gcc-3.0
>Organization:
>Environment:
sparc-sun-solaris2.8
>Description:
Test of NOT with Logical*1 inbetween (IEEE) fails

It is wrong that an expression has a different result than breaking it up into parts. 
I think the relevant code is in file c-typeck.c, function build_binary_op,
following the case label for BIT_XOR_EXPR.

There an explicit comment describes the situation above, a short type combined
with a constant. It then states to do the operation on the small type.

That is wrong when the sign extension rules are complex as in the example above.

Detected with "GNU C version 2.95.2 19991024 (release) (sparc-sun-solaris2.8)",
and "GNU C version 3.0.1 (sparc-sun-solaris2.8)".
>How-To-Repeat:
gcc bug13.c  && ./a.out
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="bug13.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bug13.c"

CnNpZ25lZCBjaGFyIGkxID0gLTE7CgppbnQgbWFpbigpCnsKCXNpZ25lZCBjaGFyIHMxOwoJdW5z
aWduZWQgc2hvcnQgdXM7Cglsb25nIGwxLGwyOwoKCWwxID0gKHNpZ25lZCBjaGFyKSAweDk5IF4g
KHVuc2lnbmVkIHNob3J0KSBpMSA7CgoJczEgPSAweDk5OwoJdXMgPSBpMTsKCWwyID0gczEgXiB1
czsKCglwcmludGYoIldyb25nOiAleCwgcmlnaHQ6ICV4XG4iLCBsMSwgbDIpOwoJLyogRGlkIHBy
aW50ICJXcm9uZzogNjYsIHJpZ2h0OiBmZmZmMDA2NiIgKi8KfQoKLyoKCkl0IGlzIHdyb25nIHRo
YXQgYW4gZXhwcmVzc2lvbiBoYXMgYSBkaWZmZXJlbnQgcmVzdWx0IHRoYW4gYnJlYWtpbmcgaXQg
dXAgaW50bwpwYXJ0cy4gCgpJIHRoaW5rIHRoZSByZWxldmFudCBjb2RlIGlzIGluIGZpbGUgYy10
eXBlY2suYywgZnVuY3Rpb24gYnVpbGRfYmluYXJ5X29wLApmb2xsb3dpbmcgdGhlIGNhc2UgbGFi
ZWwgZm9yIEJJVF9YT1JfRVhQUi4KCkhlcmUgYW4gZXhwbGljaXQgY29tbWVudCBkZXNjcmliZXMg
dGhlIHNpdHVhdGlvbiBhYm92ZSwgYSBzaG9ydCB0eXBlIGNvbWJpbmVkCndpdGggYSBjb25zdGFu
dC4gSXQgdGhlbiBzdGF0ZXMgdG8gZG8gdGhlIG9wZXJhdGlvbiBvbiB0aGUgc21hbGwgdHlwZS4K
ClRoYXQgaXMgd3Jvbmcgd2hlbiB0aGUgc2lnbiBleHRlbnNpb24gcnVsZXMgYXJlIGNvbXBsZXgg
YXMgaW4gdGhlIGV4YW1wbGUKYWJvdmUuCgpEZXRlY3RlZCB3aXRoICJHTlUgQyB2ZXJzaW9uIDIu
OTUuMiAxOTk5MTAyNCAocmVsZWFzZSkgKHNwYXJjLXN1bi1zb2xhcmlzMi44KSIsCmFuZCAiR05V
IEMgdmVyc2lvbiAzLjAuMSAoc3BhcmMtc3VuLXNvbGFyaXMyLjgpIi4KCgoqLwo=


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-04-23  8:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-23  1:40 c/4573: Test of NOT with Logical*1 inbetween (IEEE) fails rth
  -- strict thread matches above, loose matches on Subject: below --
2001-10-15  8:26 andreas.krakowczyk

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).