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/26318] New: Accessing array embedded in a record with representation clause Date: Thu, 16 Feb 2006 12:29:00 -0000 [thread overview] Message-ID: <bug-26318-12193@http.gcc.gnu.org/bugzilla/> (raw) 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=26318
next reply other threads:[~2006-02-16 12:29 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2006-02-16 12:29 ben dot midgley at ultra-datel dot com [this message] 2006-02-16 12:41 ` [Bug ada/26318] " pinskia 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=bug-26318-12193@http.gcc.gnu.org/bugzilla/ \ --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: linkBe 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).