public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: adi@drcomp.erfurt.thur.de
To: gcc-gnats@gcc.gnu.org
Subject: ada/9087: Component_Size for packed array returns wrong values
Date: Sat, 28 Dec 2002 15:26:00 -0000	[thread overview]
Message-ID: <20021228232209.6462.qmail@sources.redhat.com> (raw)


>Number:         9087
>Category:       ada
>Synopsis:       Component_Size for packed array returns wrong values
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 28 15:26:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     adi@drcomp.erfurt.thur.de
>Release:        gcc version 3.4 20021220 (experimental)
>Organization:
>Environment:
i586-pc-linux-gnu
>Description:
By applying a pragma Pack to an unconstrained array of (e.g. boolean) the output of Component_Size for the array's subtype is
wrong.

According to this, the calculated 'Size for the whole array is
wrong as well.
>How-To-Repeat:
Compile the attached file. As you can see the array is really packed (the elements 1 and 5 are within the same byte), but the read-access to Component_Size returned the wrong value, 8. It should return 1 here.
>Fix:

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

d2l0aCBBZGEuVGV4dF9JTzsgdXNlIEFkYS5UZXh0X0lPOwp3aXRoIFN5c3RlbTsgdXNlIFN5c3Rl
bTsKCnByb2NlZHVyZSBrYXJsIGlzCiAgIHR5cGUgdW5jb25zdHJhaW5lZF9hcnJheSBpcyBhcnJh
eSAoUG9zaXRpdmUgcmFuZ2UgPD4pIG9mIEJvb2xlYW47CiAgIGZvciB1bmNvbnN0cmFpbmVkX2Fy
cmF5J0NvbXBvbmVudF9TaXplIHVzZSAxOwoKICAgcHJhZ21hIFBhY2sgKHVuY29uc3RyYWluZWRf
YXJyYXkpOwogICB0eXBlIHVjc19hcnJheV9wdHIgaXMgYWNjZXNzIHVuY29uc3RyYWluZWRfYXJy
YXk7CiAgIEEgOiB1Y3NfYXJyYXlfcHRyIDo9IG5ldyB1bmNvbnN0cmFpbmVkX2FycmF5ICgxIC4u
IDEwMCk7CgpiZWdpbgogICBQdXRfTGluZSAoSW50ZWdlcidJbWFnZSAodW5jb25zdHJhaW5lZF9h
cnJheSdDb21wb25lbnRfU2l6ZSkpOwoKICAgaWYgKEEgKDEpJ0FkZHJlc3MgPSBBICg1KSdBZGRy
ZXNzKSB0aGVuCiAgICAgIFB1dF9MaW5lICgiQSAoMSkgYW5kIEEgKDUpIGFyZSB3aXRoaW4gdGhl
IHNhbWUgYnl0ZSIpOwogICBlbmQgaWY7CmVuZCBrYXJsOwo=


             reply	other threads:[~2002-12-28 23:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-28 15:26 adi [this message]
2003-05-13  0:16 Dara Hazeghi

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=20021228232209.6462.qmail@sources.redhat.com \
    --to=adi@drcomp.erfurt.thur.de \
    --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).