public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/26529] New: Compiler crash when 'use' clause for ADA record is defined
@ 2006-03-02 16:04 markus dot heichel at comsoft dot de
2006-03-02 16:12 ` [Bug ada/26529] " pinskia at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: markus dot heichel at comsoft dot de @ 2006-03-02 16:04 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ada/26529] Compiler crash when 'use' clause for ADA record is defined
2006-03-02 16:04 [Bug ada/26529] New: Compiler crash when 'use' clause for ADA record is defined markus dot heichel at comsoft dot de
@ 2006-03-02 16:12 ` 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
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-02 16:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-03-02 16:12 -------
gcc_assert (! DECL_BIT_FIELD (field));
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26529
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ada/26529] [4.1/4.2 Regression] Compiler crash when 'use' clause for ADA record is defined
2006-03-02 16:04 [Bug ada/26529] New: Compiler crash when 'use' clause for ADA record is defined markus dot heichel at comsoft dot de
2006-03-02 16:12 ` [Bug ada/26529] " pinskia at gcc dot gnu dot org
@ 2006-03-02 16:19 ` pinskia at gcc dot gnu dot org
2006-04-16 18:40 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-02 16:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-03-02 16:19 -------
__builtin_memcpy (&_init->protocol_characteristics.F, &T52s.F, 30);
----
Reduced testcase:
package DATA is
type UNSIGNED_8 is new INTEGER range 0 .. (2 ** 8) - 1;
for UNSIGNED_8'SIZE use 8;
type ADDRESS_T is array (1 .. 4) of UNSIGNED_8;
type IPM_PROTOCOL_CHARACTERISTICS_T is record
IPM_ADDRESS_1 : ADDRESS_T;
end record;
for IPM_PROTOCOL_CHARACTERISTICS_T use record
IPM_ADDRESS_1 at 0 range 0 .. 4 * 8 - 1;
end record;
type PROTOCOL_T is (LLC, IPM);
type PROTOCOL_CHARACTERISTICS_T (PROTOCOL : PROTOCOL_T := IPM) is record
case PROTOCOL is
when LLC =>
MULTICAST_ADDRESS_1 : STRING(1 .. 14);
when IPM =>
IPM_PROTOCOL_CHARACTERISTICS : IPM_PROTOCOL_CHARACTERISTICS_T;
end case;
end record;
type DATA_T is record
PROTOCOL_CHARACTERISTICS : PROTOCOL_CHARACTERISTICS_T;
end record;
for DATA_T use record
PROTOCOL_CHARACTERISTICS at 0 range 0 .. 33 * 8 - 1;
end record;
end DATA;
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Known to fail| |4.1.0 4.2.0
Known to work| |4.0.3
Last reconfirmed|0000-00-00 00:00:00 |2006-03-02 16:19:25
date| |
Summary|Compiler crash when 'use' |[4.1/4.2 Regression]
|clause for ADA record is |Compiler crash when 'use'
|defined |clause for ADA record is
| |defined
Target Milestone|--- |4.1.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26529
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ada/26529] [4.1/4.2 Regression] Compiler crash when 'use' clause for ADA record is defined
2006-03-02 16:04 [Bug ada/26529] New: Compiler crash when 'use' clause for ADA record is defined markus dot heichel at comsoft dot de
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
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-04-16 18:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from mmitchel at gcc dot gnu dot org 2006-04-16 18:40 -------
Ada is not release-critical.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26529
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ada/26529] [4.1/4.2 Regression] Compiler crash when 'use' clause for ADA record is defined
2006-03-02 16:04 [Bug ada/26529] New: Compiler crash when 'use' clause for ADA record is defined markus dot heichel at comsoft dot de
` (2 preceding siblings ...)
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
5 siblings, 0 replies; 7+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-05-25 2:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from mmitchel at gcc dot gnu dot org 2006-05-25 02:36 -------
Will not be fixed in 4.1.1; adjust target milestone to 4.1.2.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.1.1 |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26529
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ada/26529] [4.1/4.2/4.3 Regression] Compiler crash when 'use' clause for ADA record is defined
2006-03-02 16:04 [Bug ada/26529] New: Compiler crash when 'use' clause for ADA record is defined markus dot heichel at comsoft dot de
` (3 preceding siblings ...)
2006-05-25 2:47 ` mmitchel at gcc dot gnu dot org
@ 2007-02-14 9:38 ` mmitchel at gcc dot gnu dot org
2007-05-02 11:01 ` charlet at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14 9:38 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.1.2 |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26529
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ada/26529] [4.1/4.2/4.3 Regression] Compiler crash when 'use' clause for ADA record is defined
2006-03-02 16:04 [Bug ada/26529] New: Compiler crash when 'use' clause for ADA record is defined markus dot heichel at comsoft dot de
` (4 preceding siblings ...)
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
5 siblings, 0 replies; 7+ messages in thread
From: charlet at gcc dot gnu dot org @ 2007-05-02 11:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from charlet at gcc dot gnu dot org 2007-05-02 12:01 -------
Fixed on trunk.
--
charlet at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|4.1.3 |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26529
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-05-02 11:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-02 16:04 [Bug ada/26529] New: Compiler crash when 'use' clause for ADA record is defined markus dot heichel at comsoft dot de
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
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).