Bug 11589 - Compiler cannot deal with representation clause for renamed vars
Summary: Compiler cannot deal with representation clause for renamed vars
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 3.2.2
: P2 normal
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2003-07-19 05:48 UTC by Timo Warns
Modified: 2003-10-21 15:57 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2003-07-19 17:53:13


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timo Warns 2003-07-19 05:48:47 UTC
My gcc:

---------------------------------
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/specs
Configured with: /var/tmp/portage/gcc-3.2.2/work/gcc-3.2.2/configure
--prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.2
--includedir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.2/info --enable-shared
--host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --with-system-zlib
--enable-languages=c,c++,ada,f77,objc,java --enable-threads=posix
--enable-long-long --disable-checking --enable-cstdio=stdio
--enable-clocale=generic --enable-__cxa_atexit
--enable-version-specific-runtime-libs
--with-gxx-include-dir=/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.2/include/g++-v3
--with-local-prefix=/usr/local --enable-shared --enable-nls
--without-included-gettext
Thread model: posix
gcc version 3.2.2
---------------------------------


Using "gnatmake test.adb" following result occurs:

---------------------------------
+===========================GNAT BUG DETECTED==============================+
| 3.2.2 20030205 (release) (i686-pc-linux-gnu) Assert_Failure sinfo.adb:1041|
| Error detected at test.ads:12:5                                          |
| 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

test.ads
---------------------------------


Source file is:

---------------------------------
with System.Storage_Elements; use System.Storage_Elements;

package Test is
    type A is 
        record
            I: Integer;
        end record;
    
    B: A;
    
    J: Integer renames B.I;
    for J'Address use To_Address(0);
end Test;
---------------------------------
Comment 1 Dara Hazeghi 2003-07-19 06:24:45 UTC
Confirmed with gcc 3.3 branch.
Comment 2 Andrew Pinski 2003-07-19 17:53:12 UTC
Confirmed on the mainline (20030719) on powerpc-apple-darwin6.6
Comment 3 Arnaud Charlet 2003-10-21 15:57:55 UTC
Mainline correctly rejects this:

test.ads:12:09: address clause not allowed for a renaming declaration (RM 13.1(6))

Arno