public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/26317]  New: Accessing array embedded in a record with representation clause
@ 2006-02-16 12:29 ben dot midgley at ultra-datel dot com
  2006-02-16 12:41 ` [Bug ada/26317] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ben dot midgley at ultra-datel dot com @ 2006-02-16 12:29 UTC (permalink / raw)
  To: gcc-bugs

Bellow is the source code, command line and error report which I have come
accross. Tester is a nonsense package to demonstrate the problem, it appears
only to fail when reading the array value but when assigning to the array it
works fine. 

I have also seen this failure in version 3.4.2 (GNAT release) which is
considerably older. 

-- command line instructions and error report 

$ gcc -c tester.adb
+===========================GNAT BUG DETECTED==============================+
| 4.0.2 (i686-pc-cygwin) in expand_expr_addr_expr_1, at expr.c:6222        |
| Error detected at tester.adb:17:21                                       |
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.            |
| 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.

tester.adb
tester.ads

compilation abandoned

-- tester.ads 

package tester is 

        -- declare a small array 

    subtype small_string_type is String (1 .. 3);           

    -- which becomes the componenet of a record 

    type some_string is                                     

        record                                              

            Trigram : small_string_type;                    

        end record;                                         

        -- add representation clause        

    for some_string use                                     

        record                                              

            Trigram at 0 range 20 .. 43;                    

        end record;                                         

        -- and define a constant                                                

                Null_Trigram : constant small_string_type := "   ";        

        -- obviously this code is a nonesense

        procedure scratch( some_string_instance : some_string );

end tester;

-- tester.adb

package body tester is 

        -- obviously this code is a nones

        procedure scratch( some_string_instance : some_string ) is

                Valid : Boolean ;                                          

                begin                                                      

            if some_string_instance.Trigram /= Null_Trigram then -- "   " 

                        Valid := true;                                          

                end if ; 

                end scratch;                                                 

end tester;                                               

-- gcc version information 

Using built-in specs.
Target: i686-pc-cygwin
Configured with: ../gcc-4.0.2/configure --enable-languages=ada
--disable-win32-registry
Thread model: single
gcc version 4.0.2


-- 
           Summary: Accessing array embedded in a record with representation
                    clause
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ben dot midgley at ultra-datel dot com
  GCC host triplet: i686-pc-cygwin


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


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

* [Bug ada/26317] Accessing array embedded in a record with representation clause
  2006-02-16 12:29 [Bug ada/26317] New: Accessing array embedded in a record with representation clause ben dot midgley at ultra-datel dot com
@ 2006-02-16 12:41 ` pinskia at gcc dot gnu dot org
  2006-02-16 12:43 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-16 12:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-02-16 12:40 -------
*** Bug 26318 has been marked as a duplicate of this bug. ***


-- 


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


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

* [Bug ada/26317] Accessing array embedded in a record with representation clause
  2006-02-16 12:29 [Bug ada/26317] New: Accessing array embedded in a record with representation clause 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
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-16 12:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-02-16 12:43 -------
Fixed in 4.1.0 and above.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.1.0


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


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

* [Bug ada/26317] Accessing array embedded in a record with representation clause
  2006-02-16 12:29 [Bug ada/26317] New: Accessing array embedded in a record with representation clause 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
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ben dot midgley at ultra-datel dot com @ 2006-02-16 13:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ben dot midgley at ultra-datel dot com  2006-02-16 13:13 -------
Subject: RE:  Accessing array embedded in a record with
    representation clause

Hello Pinskia, 

I have raised this report this morning against gcc-4.2.0 which your
response seems to indicate should not manifest the problem. 

Please can you clarify. 

Regards, 

Ben 

-----Original Message-----
From: pinskia at gcc dot gnu dot org [mailto:gcc-bugzilla@gcc.gnu.org] 
Sent: 16 February 2006 12:44
To: Ben Midgley
Subject: [Bug ada/26317] Accessing array embedded in a record with
representation clause

                                     ATTENTION 

This message has originated from outside the Ultra Electronics Datel
network.  Please ensure that any relevant QA activities are performed on
the information included in this message and all interested recipients
are informed of the information herein.

Ultra Electronics Datel has the right lawfully to record, monitor and
inspect messages between its employees and third parties. Your message
shall be subject to such lawful supervision as Ultra Electronics Datel
deems to be necessary in order to protect its information, its interests
and reputation. 





------- Comment #2 from pinskia at gcc dot gnu dot org  2006-02-16 12:43
-------
Fixed in 4.1.0 and above.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
------------------------------------------------------------------------
----
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.1.0


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

------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.


This e-mail from Ultra Electronics and any attachments to it are confidential
to the intended recipient and may also be privileged.  If you have received it
in error please notify the sender and delete it from your system. If you are
not the intended recipient you must not copy it or use it for any purpose nor
disclose or distribute its contents to any other person.  All communications
may be subject to interception or monitoring for operational and/or security
purposes.  Please rely on your own virus checking as the sender cannot accept
any liability for any damage arising from any bug or virus infection.


-- 


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


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

* [Bug ada/26317] Accessing array embedded in a record with representation clause
  2006-02-16 12:29 [Bug ada/26317] New: Accessing array embedded in a record with representation clause ben dot midgley at ultra-datel dot com
                   ` (2 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ben dot midgley at ultra-datel dot com @ 2006-02-16 13:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from ben dot midgley at ultra-datel dot com  2006-02-16 13:41 -------
Subject: RE:  Accessing array embedded in a record with
    representation clause

Appologies just re-read, paying attention this time. 

-----Original Message-----
From: pinskia at gcc dot gnu dot org [mailto:gcc-bugzilla@gcc.gnu.org] 
Sent: 16 February 2006 12:44
To: Ben Midgley
Subject: [Bug ada/26317] Accessing array embedded in a record with
representation clause

                                     ATTENTION 

This message has originated from outside the Ultra Electronics Datel
network.  Please ensure that any relevant QA activities are performed on
the information included in this message and all interested recipients
are informed of the information herein.

Ultra Electronics Datel has the right lawfully to record, monitor and
inspect messages between its employees and third parties. Your message
shall be subject to such lawful supervision as Ultra Electronics Datel
deems to be necessary in order to protect its information, its interests
and reputation. 





------- Comment #2 from pinskia at gcc dot gnu dot org  2006-02-16 12:43
-------
Fixed in 4.1.0 and above.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
------------------------------------------------------------------------
----
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.1.0


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

------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.


This e-mail from Ultra Electronics and any attachments to it are confidential
to the intended recipient and may also be privileged.  If you have received it
in error please notify the sender and delete it from your system. If you are
not the intended recipient you must not copy it or use it for any purpose nor
disclose or distribute its contents to any other person.  All communications
may be subject to interception or monitoring for operational and/or security
purposes.  Please rely on your own virus checking as the sender cannot accept
any liability for any damage arising from any bug or virus infection.


-- 


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


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

* [Bug ada/26317] Accessing array embedded in a record with representation clause
  2006-02-16 12:29 [Bug ada/26317] New: Accessing array embedded in a record with representation clause ben dot midgley at ultra-datel dot com
                   ` (3 preceding siblings ...)
  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
  2006-02-21  2:16 ` pinskia at gcc dot gnu dot org
  2006-11-01 20:20 ` charlet at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: ben dot midgley at ultra-datel dot com @ 2006-02-20 14:22 UTC (permalink / raw)
  To: gcc-bugs



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


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

* [Bug ada/26317] Accessing array embedded in a record with representation clause
  2006-02-16 12:29 [Bug ada/26317] New: Accessing array embedded in a record with representation clause ben dot midgley at ultra-datel dot com
                   ` (4 preceding siblings ...)
  2006-02-20 14:22 ` ben dot midgley at ultra-datel dot com
@ 2006-02-21  2:16 ` pinskia at gcc dot gnu dot org
  2006-11-01 20:20 ` charlet at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-21  2:16 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.1.0                       |---


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


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

* [Bug ada/26317] Accessing array embedded in a record with representation clause
  2006-02-16 12:29 [Bug ada/26317] New: Accessing array embedded in a record with representation clause ben dot midgley at ultra-datel dot com
                   ` (5 preceding siblings ...)
  2006-02-21  2:16 ` pinskia at gcc dot gnu dot org
@ 2006-11-01 20:20 ` charlet at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: charlet at gcc dot gnu dot org @ 2006-11-01 20:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from charlet at gcc dot gnu dot org  2006-11-01 20:20 -------
Both fixed on trunk.


-- 

charlet at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


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


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

end of thread, other threads:[~2006-11-01 20:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-16 12:29 [Bug ada/26317] New: Accessing array embedded in a record with representation clause 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
2006-02-21  2:16 ` pinskia at gcc dot gnu dot org
2006-11-01 20:20 ` charlet at gcc dot gnu dot org

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