public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ben dot midgley at ultra-datel dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ada/26317] Accessing array embedded in a record with representation clause
Date: Mon, 20 Feb 2006 14:22:00 -0000	[thread overview]
Message-ID: <20060220142156.17398.qmail@sourceware.org> (raw)
In-Reply-To: <bug-26317-12193@http.gcc.gnu.org/bugzilla/>



------- Comment #5 from ben dot midgley at ultra-datel dot com  2006-02-20 14:21 -------
I believe this is the same problem, if not it is a very similar and likely
related problem. I have nested the data types from the first code into an array
and have a similar message. 


$ gcc -v
Using built-in specs.
Target: i686-pc-cygwin
Configured with: ../gcc-4.1-20060210/configure --disable-win32-registry
--enable-languages=ada
Thread model: single
gcc version 4.1.0 20060210 (prerelease)


$ gcc -c scratch.adb
+===========================GNAT BUG DETECTED==============================+
| 4.1.0 20060210 (prerelease) (i686-pc-cygwin) GCC error:                  |
| in expand_expr_addr_expr_1, at expr.c:6376                               |
| Error detected at scratch.adb:15:9                                       |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.            |
| Use a subject line meaningful to you and us to track the bug.            |
| Include the entire contents of this bug box in the report.               |
| Include the exact gcc or gnatmake command that you entered.              |
| Also include sources listed below in gnatchop format                     |
| (concatenated together with no headers between files).                   |
+==========================================================================+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.

scratch.adb
scratch.ads

compilation abandoned




-------------------------------------------------------------------------------------

-- Begin scratch.ads

package Scratch is

        subtype Trigram_Type is String (1 .. 3);

    type MyInteger is new Integer range 1..99;

    type MyRecordType is
        record
            Trigram : Trigram_Type;
        end record;

    for MyRecordType use
        record
            Trigram at 0 range 20 .. 43;
        end record;

        for MyRecordType'Size use 44;

    type MyTableType is
       array (MyInteger) of MyRecordType;

    pragma Pack (MyTableType);

    type MyDataType is
        record
            StudTable : MyTableType; 
        end record;

    procedure Set ( Trigram : in Trigram_Type; NestedData : in out MyDataType
);

end Scratch;

-- end scratch.ads

-------------------------------------------------------------------------------------

-- begin scratch.adb 

package body Scratch is

    procedure Set ( Trigram : in Trigram_Type ; NestedData : in out MyDataType
) is

        Index : MyInteger := 1;           

                begin

                        if NestedData.StudTable(Index).Trigram = Trigram then
                                Index:=2; 
                        end if;

    end Set;

end Scratch;

-- end scratch.adb


-- 

ben dot midgley at ultra-datel dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|FIXED                       |
            Version|4.2.0                       |4.1.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26317


  parent reply	other threads:[~2006-02-20 14:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-16 12:29 [Bug ada/26317] New: " ben dot midgley at ultra-datel dot com
2006-02-16 12:41 ` [Bug ada/26317] " pinskia at gcc dot gnu dot org
2006-02-16 12:43 ` pinskia at gcc dot gnu dot org
2006-02-16 13:13 ` ben dot midgley at ultra-datel dot com
2006-02-16 13:41 ` ben dot midgley at ultra-datel dot com
2006-02-20 14:22 ` ben dot midgley at ultra-datel dot com [this message]
2006-02-21  2:16 ` pinskia at gcc dot gnu dot org
2006-11-01 20:20 ` charlet at gcc dot gnu dot org

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=20060220142156.17398.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).