From patchwork Thu Oct 28 19:29:07 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Bonzini X-Patchwork-Id: 69491 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 ECD1EB70AA for ; Fri, 29 Oct 2010 06:29:26 +1100 (EST) Received: (qmail 22025 invoked by alias); 28 Oct 2010 19:29:20 -0000 Received: (qmail 21918 invoked by uid 22791); 28 Oct 2010 19:29:19 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 28 Oct 2010 19:29:15 +0000 Received: from bonzini by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1PBY9x-0006mG-9j for gcc-patches@gcc.gnu.org; Thu, 28 Oct 2010 15:29:13 -0400 From: Paolo Bonzini To: gcc-patches@gcc.gnu.org Subject: [PATCH] Small SH fix Date: Thu, 28 Oct 2010 21:29:07 +0200 Message-Id: <1288294147-32401-3-git-send-email-bonzini@gnu.org> 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 I found this by inspection; I haven't tested it but it is obviously the right thing to do here to handle for_return == 2. Index: gcc/config/sh/sh.c =================================================================== --- gcc/config/sh/sh.c (branch diag) +++ gcc/config/sh/sh.c (working copy) @@ -8149,12 +8149,13 @@ sh_dwarf_register_span (rtx reg) static enum machine_mode sh_promote_function_mode (const_tree type, enum machine_mode mode, int *punsignedp, const_tree funtype, - int for_return ATTRIBUTE_UNUSED) + int for_return) { if (sh_promote_prototypes (funtype)) return promote_mode (type, mode, punsignedp); else - return mode; + return default_promote_function_mode (type, mode, punsignedp, funtype, + for_return); } static bool