From patchwork Tue Dec 20 08:37:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tristan Gingold X-Patchwork-Id: 132354 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 E1959B6FCA for ; Tue, 20 Dec 2011 19:39:48 +1100 (EST) Received: (qmail 17990 invoked by alias); 20 Dec 2011 08:38:16 -0000 Received: (qmail 17716 invoked by uid 22791); 20 Dec 2011 08:38:12 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,TW_CP 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; Tue, 20 Dec 2011 08:37:58 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id C876129002E for ; Tue, 20 Dec 2011 09:37:58 +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 Fz7rj7WuzEGh for ; Tue, 20 Dec 2011 09:37:58 +0100 (CET) Received: from ulanbator.act-europe.fr (ulanbator.act-europe.fr [10.10.1.67]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id B851D290009 for ; Tue, 20 Dec 2011 09:37:58 +0100 (CET) From: Tristan Gingold Subject: [committed] Alpha/VMS: adjust condition to create trampoline entry point Date: Tue, 20 Dec 2011 09:37:57 +0100 Message-Id: <98678E31-4331-47D5-B325-C7E1438825AA@adacore.com> To: GCC Patches Mime-Version: 1.0 (Apple Message framework v1251.1) X-IsSubscribed: yes 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 Hi, the alpha/vms backend emitted the trampoline entry point too often, as functions declared directly within a translation unit weren't considered as top-level functions. Fixed by this patch, applied on trunk. Tristan. 2011-12-20 Tristan Gingold * config/alpha/alpha.c (alpha_start_function): Adjust condition to create VMS trampoline entry point. Index: config/alpha/alpha.c =================================================================== --- config/alpha/alpha.c (revision 182519) +++ config/alpha/alpha.c (working copy) @@ -7935,7 +7935,8 @@ if (TARGET_ABI_OPEN_VMS && !TREE_PUBLIC (decl) && DECL_CONTEXT (decl) - && !TYPE_P (DECL_CONTEXT (decl))) + && !TYPE_P (DECL_CONTEXT (decl)) + && TREE_CODE (DECL_CONTEXT (decl)) != TRANSLATION_UNIT_DECL) { strcpy (tramp_label, fnname); strcat (tramp_label, "..tr");