From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19504 invoked by alias); 2 Oct 2006 12:05:06 -0000 Received: (qmail 19336 invoked by uid 48); 2 Oct 2006 12:04:55 -0000 Date: Mon, 02 Oct 2006 12:05:00 -0000 Subject: [Bug ada/29320] New: Segfault and strange behaviour related to "use" clauses X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "markus dot heichel at comsoft dot de" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-10/txt/msg00132.txt.bz2 List-Id: 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