From patchwork Sun May 26 10:21:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 246389 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 804612C013D for ; Sun, 26 May 2013 20:23:43 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=hwKrKzJl6n/+iRCu xE3Gv1RR71ANJdo1d8frmo9NJrxdNjopTQaGKuhBVZpa5jmp5V+WfRcw2BpoDxwy EWg15NiYlnCNOyY/qMGH9TrfUYoGxCR5GcD2WY/OeDxGava7c14s2qwoerbIi2WL +43YSqtv1eNrcUgLTmDQhuPGEL0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=4/3M/S5L5Ua1mfAjO0hE4J lyP08=; b=fBlzm2BFc40iTCiab+H92fNdpTt7DJxRwfo/687/jCnS2Agp/HavB9 pKj7PgoSrSYzm+L8g+A4AZNVK2PaKzNAFzj0W8YHyJhqmTtaLvvfYk/EE5H5iJot s7cWAMHF8NRfB9n3GBZESvAShDIrROLCv5aU4wSe5uiyOWgDwyMAE= Received: (qmail 28822 invoked by alias); 26 May 2013 10:23:37 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 28761 invoked by uid 89); 26 May 2013 10:23:30 -0000 X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.1 Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sun, 26 May 2013 10:23:29 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 99D022647C59 for ; Sun, 26 May 2013 12:22:01 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fjIip7RDyQv5 for ; Sun, 26 May 2013 12:22:01 +0200 (CEST) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 7856E2647C2F for ; Sun, 26 May 2013 12:22:01 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [Ada] Disable assertion in ASIS mode Date: Sun, 26 May 2013 12:21:42 +0200 Message-ID: <3618340.4mk7tOxH53@polaris> User-Agent: KMail/4.7.2 (Linux/3.1.10-1.19-desktop; KDE/4.7.2; x86_64; ; ) MIME-Version: 1.0 X-Virus-Found: No The assertion is too strong in ASIS mode, where all the types aren't laid out. Tested on x86_64-suse-linux, applied on the mainline. 2013-05-26 Eric Botcazou * gcc-interface/decl.c: (gnat_to_gnu_entity): In ASIS mode, do not check that access types have a set size. Index: gcc-interface/decl.c =================================================================== --- gcc-interface/decl.c (revision 199342) +++ gcc-interface/decl.c (working copy) @@ -311,8 +311,10 @@ gnat_to_gnu_entity (Entity_Id gnat_entit return gnu_decl; } - /* If this is a numeric or enumeral type, or an access type, a nonzero - Esize must be specified unless it was specified by the programmer. */ + /* If this is a numeric or enumeral type, or an access type, a nonzero Esize + must be specified unless it was specified by the programmer. Exceptions + are for access-to-protected-subprogram types and all access subtypes, as + another GNAT type is used to lay out the GCC type for them. */ gcc_assert (!Unknown_Esize (gnat_entity) || Has_Size_Clause (gnat_entity) || (!IN (kind, Numeric_Kind) @@ -320,7 +322,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entit && (!IN (kind, Access_Kind) || kind == E_Access_Protected_Subprogram_Type || kind == E_Anonymous_Access_Protected_Subprogram_Type - || kind == E_Access_Subtype))); + || kind == E_Access_Subtype + || type_annotate_only))); /* The RM size must be specified for all discrete and fixed-point types. */ gcc_assert (!(IN (kind, Discrete_Or_Fixed_Point_Kind)