From patchwork Fri Aug 30 14:39:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 1155947 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-508041-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="gOS2LtXz"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46KhvV1L6tz9s5b for ; Sat, 31 Aug 2019 00:39:32 +1000 (AEST) 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=Y6HFGOC6tkyg6nNN FV07nmYfjXZ5qaJpfTmoOsmYnisyVUC9g/nsUZVAaipuizWDxEHqg381jFfHJPY3 SfsvnbzjJq+/U063DwcA5V9qNNenDFhNX/X+/WBv+lBRKTlhIRLuUXzFfQ6ryyq1 Lg4ZuBOpWt8HmF5jMz8dVc0YyVE= 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=8mvKw1vId0QoRVCHVhL6s9 5mSHo=; b=gOS2LtXzwPzYkBMQUkPtNtmACvYNPfHAOX1tgqRSrN/387ffmZLv8H NGHB8JiKW5rFfoERhiDFlSoUIqvvxykSaYczUDpgfvLlbpNr+fkyglz+k+3he4RI lD2MDk0JV/chXGCRfpZF1npXATpbltKmDIzTm8Ri7cfZx2wmb7vjU= Received: (qmail 129826 invoked by alias); 30 Aug 2019 14:39:23 -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 129777 invoked by uid 89); 30 Aug 2019 14:39:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Aug 2019 14:39:22 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 475C98137A for ; Fri, 30 Aug 2019 16:39:20 +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 oXhftxXzKxbL for ; Fri, 30 Aug 2019 16:39:20 +0200 (CEST) Received: from arcturus.home (unknown [IPv6:2a01:e35:8a16:3850:36e6:d7ff:fe66:317b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 25BF5812E5 for ; Fri, 30 Aug 2019 16:39:20 +0200 (CEST) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: [Ada] Fix infinite recursion on dynamic record type with -gnatR4 Date: Fri, 30 Aug 2019 16:39:30 +0200 Message-ID: <3410417.GgUAlypNoT@arcturus.home> MIME-Version: 1.0 An oversight when -gnatR4 was invented. Tested on x86_64-suse-linux, applied on the mainline. 2019-08-30 Eric Botcazou * gcc-interface/decl.c (annotate_value) : Inline the call also if List_Representation_Info is greater than 3. Index: gcc-interface/decl.c =================================================================== --- gcc-interface/decl.c (revision 275174) +++ gcc-interface/decl.c (working copy) @@ -8398,7 +8398,7 @@ annotate_value (tree gnu_size) /* In regular mode, inline back only if symbolic annotation is requested in order to avoid memory explosion on big discriminated record types. But not in ASIS mode, as symbolic annotation is required for DDA. */ - if (List_Representation_Info == 3 || type_annotate_only) + if (List_Representation_Info >= 3 || type_annotate_only) { tree t = maybe_inline_call_in_expr (gnu_size); return t ? annotate_value (t) : No_Uint;