public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: daa@orcsoftware.spb.ru
To: gcc-gnats@gcc.gnu.org
Subject: objc/6960: Compiler doesn't correct allocate object from -fconstant-string-class=
Date: Fri, 07 Jun 2002 09:46:00 -0000	[thread overview]
Message-ID: <20020607163841.1169.qmail@sources.redhat.com> (raw)


>Number:         6960
>Category:       objc
>Synopsis:       Compiler doesn't correct allocate object from -fconstant-string-class=
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 07 09:46:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Aleksey Dukhnyakov
>Release:        unknown-1.0
>Organization:
>Environment:
Redhat Linux
>Description:
Compiler doesn't correct allocate object :

Please see minimized testcase bug1.m:

$ gcc -v
Reading specs from /home/daa/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: ./configure  : (reconfigured) ./configure
Thread model: single
gcc version 3.1
$ gcc bug2.m -fconstant-string-class=NSConstantString -lobjc
bug2.m:1:2: warning: #import is obsolete, use an #ifndef wrapper in the header f
ile
$ a.out
isa=0x8055c40
_info=134556911
buffer=0x5
length=0
str=Hello len=5

As you can see compiler writes buffer to _info and length to buffer.
>How-To-Repeat:

>Fix:

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

I2ltcG9ydCA8b2JqYy9vYmpjLmg+DQoNCkBpbnRlcmZhY2UgTlNPYmplY3Qgew0KQHB1YmxpYyAN
CiAgICBDbGFzcyAgIGlzYTsNCiAgICB1bnNpZ25lZCBpbnQgX2luZm87IA0KfQ0KQGVuZA0KDQpA
aW50ZXJmYWNlIE5TQ29uc3RhbnRTdHJpbmcgOiBOU09iamVjdCB7DQpAcHVibGljDQogICBjaGFy
ICpidWZmZXI7DQogICB1bnNpZ25lZCBpbnQgbGVuZ3RoOw0KfQ0KLSAodW5zaWduZWQgaW50KSBs
ZW5ndGg7DQotIChjaGFyICopIGNTdHJpbmc7DQpAZW5kDQoNCkBpbXBsZW1lbnRhdGlvbiBOU09i
amVjdA0KQGVuZA0KDQpAaW1wbGVtZW50YXRpb24gTlNDb25zdGFudFN0cmluZw0KLSAodW5zaWdu
ZWQgaW50KSBsZW5ndGggeyByZXR1cm4gc2VsZi0+bGVuZ3RoIDsgfQ0KLSAoY2hhciAqKSBjU3Ry
aW5nIHsgcmV0dXJuIHNlbGYtPmJ1ZmZlciA7IH0NCkBlbmQNCg0KaW50IG1haW4oKQ0Kew0KICAg
IE5TQ29uc3RhbnRTdHJpbmcgKiBzdHIgPSBAIkhlbGxvIjsgDQogICAgcHJpbnRmKCJpc2E9MHgl
eFxuX2luZm89JWRcbmJ1ZmZlcj0weCV4XG5sZW5ndGg9JWRcbiIsc3RyLT5pc2Esc3RyLT5faW5m
byxzdHItPmJ1ZmZlcixzdHItPmxlbmd0aCk7DQoNCiAgICBwcmludGYoInN0cj0lcyBsZW49JWRc
biIsKGNoYXIgKilzdHItPl9pbmZvLCh1bnNpZ25lZCBpbnQpc3RyLT5idWZmZXIpOw0KICAgIA0K
ICAgIHJldHVybiAwOw0KfQ0KDQo=


             reply	other threads:[~2002-06-07 16:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-07  9:46 daa [this message]
2002-09-01  5:22 nicola

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=20020607163841.1169.qmail@sources.redhat.com \
    --to=daa@orcsoftware.spb.ru \
    --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).