This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR optimization/12085


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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]