From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23173 invoked by alias); 14 Apr 2011 10:15:50 -0000 Received: (qmail 23163 invoked by uid 22791); 14 Apr 2011 10:15:49 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_40,TW_FN,TW_TM,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Apr 2011 10:15:45 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id B60B84844E; Thu, 14 Apr 2011 12:15:43 +0200 (CEST) Date: Thu, 14 Apr 2011 10:15:00 -0000 From: Richard Guenther To: Eric Botcazou Cc: gcc-patches@gcc.gnu.org, Diego Novillo Subject: Re: [PATCH][RFC] Make called function type explicit, make function pointer type conversions useless In-Reply-To: <201104141151.28243.ebotcazou@adacore.com> Message-ID: References: <201104141151.28243.ebotcazou@adacore.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-04/txt/msg01051.txt.bz2 On Thu, 14 Apr 2011, Eric Botcazou wrote: > > This is the "real" fix for PR46076 that I wanted to persue. Make > > function pointer type conversions useless as to more aggressively > > be able to turn indirect into direct calls. This requires that we > > preserve the original type signature of the called function as > > presented by the frontend. The patch does that by adding a fntype > > field to every call stmt in GIMPLE and extract this information > > during gimplification. > > The patch is incomplete though: the type is preserved at the GIMPLE level but > is dropped at the RTL level, so you can get call convention mismatches. The > attached patch is needed to cure the 3 ACATS failures on x86: > > FAIL: c431001 > FAIL: c731001 > FAIL: ca11c02 > > I think the GIMPLE->Tree->RTL interface would need to be audited here. Bah, and I grepped for all gimple_call_fn\ ( occurances specifically looking for this one, didn't find it and wondered about it ... I should have looked closer. This should btw be the only place that needs adjustments. The patch is ok, obviously. Thanks, Richard.