public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "markus dot heichel at comsoft dot de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ada/26529] New: Compiler crash when 'use' clause for ADA record is defined
Date: Thu, 02 Mar 2006 16:04:00 -0000 [thread overview]
Message-ID: <bug-26529-12295@http.gcc.gnu.org/bugzilla/> (raw)
When moving from gcc 3.4.3 to 4.1.0, I found a record definition, that causes a
compiler crash:
4.1.0 (i686-pc-linux-gnu) in get_memory_rtx, at builtins.c:1086
raised TYPES.UNRECOVERABLE_ERROR : comperr.adb:380
The compiler has been compiled from source without any special settings, i.e.
> configure --prefix=/opt/gcc-4.1.0 --enable-languages=ada,c
> make bootstrap
> make install
The problem can be reproduced by compiling the source file below, using the
following command line:
gcc -c -O data.ads
When the marked use clause is removed, gcc 4.1.0 does not crash. This
simplified example is also compiling, when the -O is omitted, however this did
not help in the original context.
data.ads:
==========================================================================
package DATA is
type UNSIGNED_8 is new INTEGER range 0 .. (2 ** 8) - 1;
for UNSIGNED_8'SIZE use 8;
type UNSIGNED_16 is new INTEGER range 0 .. (2 ** 16) - 1;
for UNSIGNED_16'SIZE use 16;
type ADDRESS_T is array (1 .. 4) of UNSIGNED_8;
type IPM_PROTOCOL_CHARACTERISTICS_T is record
IPM_SOCKET_1_AVAILABLE : BOOLEAN;
IPM_SOCKET_2_AVAILABLE : BOOLEAN;
IPM_SOCKET_3_AVAILABLE : BOOLEAN;
IPM_SOCKET_4_AVAILABLE : BOOLEAN;
IPM_PORT_1 : UNSIGNED_16;
IPM_PORT_2 : UNSIGNED_16;
IPM_PORT_3 : UNSIGNED_16;
IPM_PORT_4 : UNSIGNED_16;
IPM_ADDRESS_1 : ADDRESS_T;
IPM_ADDRESS_2 : ADDRESS_T;
IPM_ADDRESS_3 : ADDRESS_T;
IPM_ADDRESS_4 : ADDRESS_T;
end record;
for IPM_PROTOCOL_CHARACTERISTICS_T use record
IPM_ADDRESS_1 at 0 range 0 .. 4 * 8 - 1;
IPM_ADDRESS_2 at 4 range 0 .. 4 * 8 - 1;
IPM_ADDRESS_3 at 8 range 0 .. 4 * 8 - 1;
IPM_ADDRESS_4 at 12 range 0 .. 4 * 8 - 1;
IPM_PORT_1 at 16 range 0 .. 2 * 8 - 1;
IPM_PORT_2 at 18 range 0 .. 2 * 8 - 1;
IPM_PORT_3 at 20 range 0 .. 2 * 8 - 1;
IPM_PORT_4 at 22 range 0 .. 2 * 8 - 1;
IPM_SOCKET_1_AVAILABLE at 24 range 0 .. 1 * 8 - 1;
IPM_SOCKET_2_AVAILABLE at 25 range 0 .. 1 * 8 - 1;
IPM_SOCKET_3_AVAILABLE at 26 range 0 .. 1 * 8 - 1;
IPM_SOCKET_4_AVAILABLE at 27 range 0 .. 1 * 8 - 1;
end record;
for IPM_PROTOCOL_CHARACTERISTICS_T'Size use 28 * 8;
type PROTOCOL_T is (LLC, IPM);
for PROTOCOL_T use ( LLC => 1, IPM => 2 );
type PROTOCOL_CHARACTERISTICS_T (PROTOCOL : PROTOCOL_T := IPM) is record
case PROTOCOL is
when LLC =>
SAP_NUMBER : STRING(1 .. 3);
MULTICAST_ADDRESS_1 : STRING(1 .. 14);
MULTICAST_ADDRESS_2 : STRING(1 .. 14);
when IPM =>
IPM_PROTOCOL_CHARACTERISTICS : IPM_PROTOCOL_CHARACTERISTICS_T;
end case;
end record;
for PROTOCOL_CHARACTERISTICS_T use record
PROTOCOL at 0 range 0 .. 7;
SAP_NUMBER at 2 range 0 .. 3 * 8 - 1;
MULTICAST_ADDRESS_1 at 2 + 3 range 0 .. 14 * 8 - 1;
MULTICAST_ADDRESS_2 at 2 + 3 + 14 range 0 .. 14 * 8 - 1;
IPM_PROTOCOL_CHARACTERISTICS at 2 range 0 .. 28 * 8 - 1;
end record;
type DATA_T is record
PROTOCOL_CHARACTERISTICS : PROTOCOL_CHARACTERISTICS_T;
end record;
-- Disable this use clause to get it compiled
for DATA_T use record
PROTOCOL_CHARACTERISTICS at 0 range 0 .. 33 * 8 - 1;
end record;
end DATA;
==========================================================================
--
Summary: Compiler crash when 'use' clause for ADA record is
defined
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: markus dot heichel at comsoft dot de
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26529
next reply other threads:[~2006-03-02 16:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-02 16:04 markus dot heichel at comsoft dot de [this message]
2006-03-02 16:12 ` [Bug ada/26529] " pinskia at gcc dot gnu dot org
2006-03-02 16:19 ` [Bug ada/26529] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-04-16 18:40 ` mmitchel at gcc dot gnu dot org
2006-05-25 2:47 ` mmitchel at gcc dot gnu dot org
2007-02-14 9:38 ` [Bug ada/26529] [4.1/4.2/4.3 " mmitchel at gcc dot gnu dot org
2007-05-02 11:01 ` 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=bug-26529-12295@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: 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).