From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3588 invoked by alias); 27 Mar 2006 20:12:30 -0000 Received: (qmail 3565 invoked by uid 48); 27 Mar 2006 20:12:27 -0000 Date: Mon, 27 Mar 2006 20:12:00 -0000 Message-ID: <20060327201227.3564.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug tree-optimization/26797] [4.2 Regression] ACATS c35507m cd2a23e cxh1001 failures In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "laurent at guerby dot net" 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-03/txt/msg02675.txt.bz2 List-Id: ------- Comment #6 from laurent at guerby dot net 2006-03-27 20:12 ------- c35507m tests an enumeration with representation clause in Ada, here the enum has two values, one assigned the representation 4 ('a') and the other the representation 5 (b) At one point the test asks what's the enum value associated with 2, in Ada an exception must be raised so the front-end inserts a few convertions as shown by gcc -c -gnatdg : before FE expansion: IF CHAR'VAL (IDENT_INT(2)) = B THEN FAILED ( "NO EXCEPTION RAISED FOR " & "CHAR'VAL (IDENT_INT(2)) - 1" ); ELSE FAILED ( "NO EXCEPTION RAISED FOR " & "CHAR'VAL (IDENT_INT(2)) - 2" ); END IF; after: function c35507m__charRP (A : c35507m__char; F : boolean) return integer is begin if system__unsigned_types__unsigned!(A) in 4 .. 5 then return integer(system__unsigned_types__unsigned!(A) - 4); else [constraint_error when F "invalid data"] return -1; end if; end c35507m__charRP; ] B_4 : begin if c35507m__char!(4 + c35507m__charRP (c35507m__char!(4 + { report__ident_int (2)}), true)) = b then report__failed ( "NO EXCEPTION RAISED FOR CHAR'VAL (IDENT_INT(2)) - 1"); else report__failed ( "NO EXCEPTION RAISED FOR CHAR'VAL (IDENT_INT(2)) - 2"); end if; I don't know how it goes through gigi and the BE but the check system__unsigned_types__unsigned!(A) in 4 .. 5 must not go away. May be the front-end is wrong in using function c35507m__char as input type for the parameter though. Richard? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26797