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


On Sun, 7 Dec 2003, Eric Botcazou wrote:
> 2003-12-07  Eric Botcazou  <ebotcazou@libertysurf.fr>
>
>	PR optimization/12085
>	* tree-inline.c (expand_call_inline): Do not inline functions at
> 	calling points where they are viewed with too different a prototype
> 	than the actual one.
>
> 	* gcc.dg/inline-5.c: New test.
>

This is OK for mainline with one change.  I think that you should remove
the aborts inside the "#ifdef ENABLE_CHECKING" and always just return
NULL_TREE.  There's no point ICEing the compiler in the middle-end just
because the user has entered some dubious code.  Especially, when there's
a safe recovery strategy, i.e. just don't inline the function.  It might
be reasonable to issue a warning instead, but even that task is best left
to the front-ends, and if the language doesn't think this sort of thing
merits a diagnostic, the middle-end tree inliner should remain silent on
the subject.


It's good that GCC survives an enable-checking bootstrap with the aborts
still present, but without BOOT_CFLAGS="-O3" we're not really testing as
much of the compiler as we could.  For extra credit, you might try a
bootstrap of the patched GCC at -O3 before you remove the aborts, just
to confirm we're not doing anything dubious in the compiler itself, as
a one-time check.


This patch (with the above change) is clearly a safe bug-fix, and until
very recently the PR was even targeted for gcc 3.3.3, so I believe that
its suitable for both mainline and the gcc-3_3-branch.  Gabriel?


Many thanks again.

Roger
--


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