From patchwork Sun Jan 22 14:42:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Botcazou X-Patchwork-Id: 137240 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]) by ozlabs.org (Postfix) with SMTP id EA695B6FA4 for ; Mon, 23 Jan 2012 01:46:18 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1327848379; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:From:To:Subject:Date:User-Agent:MIME-Version: Content-Type:Message-Id:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=9h6mU4/Vd8GaXLKtX94GkA5AahI=; b=bfeGfhLUzofcJrk J0rEecM+jxZuDTm9CQ4qgfKg9/QjiHAu2/H3pnsymjKSZanwAdrxxXTrL4UDFVsD wHIQSEroPivTtdiXnqBOCtCeTqydbw4zurApIDYb9Q4+IsnH5XMvmnHL5PDCxVRj 98FJdv8gNoTw+gSwVkN2MmAQSCzk= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Received:From:To:Subject:Date:User-Agent:MIME-Version:Content-Type:Message-Id:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=QsVB4fFOGX003ZpZZ7+PPKhob5spmZcHj3Lttt+tM9lwPMM/CrKLRjYzKY5VSW cm2Elx/79J1nsdRNk12BcUGcS0L1FPkxYNJoXrx2Kj6vWM0AZFjuZbJQvViwRd+l K5JegbsBHvP1e+HGZC4mquuNoTvWBwK0aI62SwXM8Us1g=; Received: (qmail 18371 invoked by alias); 22 Jan 2012 14:46:15 -0000 Received: (qmail 18362 invoked by uid 22791); 22 Jan 2012 14:46:14 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (194.98.77.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 22 Jan 2012 14:46:02 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 16A92CB3D27 for ; Sun, 22 Jan 2012 15:46:02 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6a0rmvP9SroY for ; Sun, 22 Jan 2012 15:46:02 +0100 (CET) Received: from [192.168.1.2] (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id 51798CB3D26 for ; Sun, 22 Jan 2012 15:46:01 +0100 (CET) From: Eric Botcazou To: gcc-patches@gcc.gnu.org Subject: Partial fix for LTO bootstrap with Ada Date: Sun, 22 Jan 2012 15:42:26 +0100 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Message-Id: <201201221542.26263.ebotcazou@adacore.com> 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 The LTO bootstrap of the Ada compiler is currently plagued by at least three different problems. The attached patch is for the easy one: it prevents fake variables whose type contains a placeholder from being created, which doesn't work in LTO mode because you cannot instantiate the PLACEHOLDER_EXPRs. IIUC this is only a slight pessimization. Bootstrapped/regtested on x86_64-suse-linux, OK for mainline? 2012-01-22 Eric Botcazou * tree-ssa-structalias.c (intra_create_variable_infos): Do not create fake variables for restrict-qualified pointers whose pointed-to type contains a placeholder. Index: tree-ssa-structalias.c =================================================================== --- tree-ssa-structalias.c (revision 183348) +++ tree-ssa-structalias.c (working copy) @@ -5664,7 +5664,8 @@ intra_create_variable_infos (void) Treat restrict qualified references the same. */ if (TYPE_RESTRICT (TREE_TYPE (t)) && ((DECL_BY_REFERENCE (t) && POINTER_TYPE_P (TREE_TYPE (t))) - || TREE_CODE (TREE_TYPE (t)) == REFERENCE_TYPE)) + || TREE_CODE (TREE_TYPE (t)) == REFERENCE_TYPE) + && !type_contains_placeholder_p (TREE_TYPE (TREE_TYPE (t)))) { struct constraint_expr lhsc, rhsc; varinfo_t vi;