public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/29320] New: Segfault and strange behaviour related to "use" clauses
@ 2006-10-02 12:05 markus dot heichel at comsoft dot de
2006-10-04 17:56 ` [Bug ada/29320] [Ada] gnat1 segfault related to "use" representation clauses laurent at guerby dot net
2008-04-12 16:25 ` sam at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: markus dot heichel at comsoft dot de @ 2006-10-02 12:05 UTC (permalink / raw)
To: gcc-bugs
GCC seems to have more problems with "use" clauses (see also bug #26529).
gcc: Internal error: Segmentation fault (program gnat1)
The compiler has been compiled from source by:
> configure --prefix=/opt/gcc-4.1.1 --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 command.ads
The solution of the problem in this case is to use the correct range 0..6 for
INFO_T.COMMAND_NAME, but gcc should have printed an error message instead of
crashing, shouldn't it?
The compiler does not crash when size 8 is used for COMMAND_KIND_T, but how are
the enum values represented in COMMAND_NAME in this case?
command.ads
=======================================================
package COMMAND is
type COMMAND_KIND_T is (START, STOP);
for COMMAND_KIND_T use (START => 80, STOP => 81);
-- for COMMAND_KIND_T'size use 8; -- not crashing
for COMMAND_KIND_T'size use 16; -- crashing
type SUB_COMMAND_KIND_T is new COMMAND_KIND_T range START..STOP;
for SUB_COMMAND_KIND_T'size use 7;
type INFO_T (COMMAND_NAME : SUB_COMMAND_KIND_T := START) is record
case COMMAND_NAME is
when others => null;
end case;
end record;
for INFO_T use record
COMMAND_NAME at 0 range 0..4;
end record;
end COMMAND;
=======================================================
--
Summary: Segfault and strange behaviour related to "use" clauses
Product: gcc
Version: 4.1.1
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 build triplet: i686-pc-linux
GCC host triplet: i686-pc-linux
GCC target triplet: i686-pc-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29320
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug ada/29320] [Ada] gnat1 segfault related to "use" representation clauses
2006-10-02 12:05 [Bug ada/29320] New: Segfault and strange behaviour related to "use" clauses markus dot heichel at comsoft dot de
@ 2006-10-04 17:56 ` laurent at guerby dot net
2008-04-12 16:25 ` sam at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: laurent at guerby dot net @ 2006-10-04 17:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from laurent at guerby dot net 2006-10-04 17:56 -------
Confirmed on 4.0.3, 4.1.1 and 4.2.0 (20060922) on x86_64-linux.
--
laurent at guerby dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2006-10-04 17:56:47
date| |
Summary|Segfault and strange |[Ada] gnat1 segfault related
|behaviour related to "use" |to "use" representation
|clauses |clauses
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29320
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug ada/29320] [Ada] gnat1 segfault related to "use" representation clauses
2006-10-02 12:05 [Bug ada/29320] New: Segfault and strange behaviour related to "use" clauses markus dot heichel at comsoft dot de
2006-10-04 17:56 ` [Bug ada/29320] [Ada] gnat1 segfault related to "use" representation clauses laurent at guerby dot net
@ 2008-04-12 16:25 ` sam at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: sam at gcc dot gnu dot org @ 2008-04-12 16:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from sam at gcc dot gnu dot org 2008-04-12 16:25 -------
Looks like it may be similar to bug #24880.
*** This bug has been marked as a duplicate of 24880 ***
--
sam at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29320
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-04-12 16:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-02 12:05 [Bug ada/29320] New: Segfault and strange behaviour related to "use" clauses markus dot heichel at comsoft dot de
2006-10-04 17:56 ` [Bug ada/29320] [Ada] gnat1 segfault related to "use" representation clauses laurent at guerby dot net
2008-04-12 16:25 ` sam 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).