This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR optimization/12085
- From: Geoff Keating <geoffk at geoffk dot org>
- To: Eric Botcazou <ebotcazou at libertysurf dot fr>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: 07 Dec 2003 20:42:59 -0800
- Subject: Re: [PATCH] Fix PR optimization/12085
- References: <200312062314.17448.ebotcazou@libertysurf.fr>
Eric Botcazou <ebotcazou@libertysurf.fr> writes:
> Hi,
>
> This is a regression from GCC 2.95.x present on mainline and 3.3 branch, but
> for such a pathological case that it could be questionable to put in on
> mainline at this point.
>
> The tree-inliner inlines 'foo' in 'bar' at -O3 for the following testcase:
>
> extern int foo(int);
>
> void bar(void)
> {
> double d;
>
> d = ((double (*) (double)) foo)(d);
> }
>
> int foo(int arg)
> {
> return arg;
> }
Can we print an error message for this? It's not valid C and it
usually indicates programmer error (typically a misdeclaration of
'foo').
--
- Geoffrey Keating <geoffk@geoffk.org>