Fix PR c++/34715: always_inline with templates and not declared as always_inline but definition has it

Andrew Pinski pinskia@gmail.com
Fri Feb 15 12:04:00 GMT 2008


Ping?

On 2/1/08, Andrew Pinski <pinskia@gmail.com> wrote:
> Hi,
>   The problem here is that after DECL_DISREGARD_INLINE_LIMITS was
>  added, we don't copy the value from the merged function decl for
>  template decls.  This fixes that obvious forgotten problem.
>
>  This is a regression because we now merge the attributes but the
>  middle-end decides that it cannot inline a function any more at -O0
>  even though it should be.
>
>  OK? Bootstrapped and tested on i686-apple-darwin8.11.1 without any
>  regressions.  I added 4 tests to make sure that the we don't regress
>  again and we actually do the correct thing for always_inline.
>
>  Thanks,
>  Andrew Pinski
>
>  * decl.c (duplicate_decls): Merge DECL_DISREGARD_INLINE_LIMITS for
>  template decls' function decl.
>
>  * g++.dg/ext/always_inline-1.C: New test.
>  * g++.dg/ext/always_inline-2.C: New test.
>  * g++.dg/ext/always_inline-3.C: New test.
>  * g++.dg/ext/always_inline-4.C: New test.
>
>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fixPRinline.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080215/cdc22eb1/attachment.txt>


More information about the Gcc-patches mailing list