This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][RFC] Make called function type explicit, make function pointer type conversions useless
- From: Richard Guenther <rguenther at suse dot de>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Diego Novillo <dnovillo at google dot com>
- Date: Thu, 14 Apr 2011 15:40:37 +0200 (CEST)
- Subject: Re: [PATCH][RFC] Make called function type explicit, make function pointer type conversions useless
- References: <alpine.LNX.2.00.1104081744100.810@zhemvz.fhfr.qr> <201104141151.28243.ebotcazou@adacore.com>
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.
I'm working on a fix along this line, it needs some tweaks elsewhere.
Richard.