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 TESTSUITE]: fix gcc.dg/tree-ssa/inline-2.c with -fpic/-fPIC


On Thu, Nov 6, 2008 at 6:27 AM, Kaveh R. GHAZI <ghazi@caip.rutgers.edu> wrote:
> This patch fixes gcc.dg/tree-ssa/inline-2.c when run with -fpic/-fPIC.
>
> The function foo() must be inlined for the test to succeed, and it is
> marked with attribute "always_inline".  However my understanding from
> the docs is that this attribute is a noop unless you add the "inline"
> keyword as well.

Hm, yeah.  Maybe we should warn about this.

> Patch tested via "make check" on x86_64-unknown-linux-gnu with extra
> -fpic/-fPIC passes.  The test succeeds with the patch.
>
> Okay for mainline?

Ok.

Thanks,
Richard.

>                Thanks,
>                --Kaveh
>
>
> 2008-11-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
>
>        * gcc.dg/tree-ssa/inline-2.c (foo): Add 'inline' keyword.
>
> diff -rup orig/egcc-SVN20081105/gcc/testsuite/gcc.dg/tree-ssa/inline-2.c egcc-SVN20081105/gcc/testsuite/gcc.dg/tree-ssa/inline-2.c
> --- orig/egcc-SVN20081105/gcc/testsuite/gcc.dg/tree-ssa/inline-2.c      2008-08-10 02:01:51.000000000 +0200
> +++ egcc-SVN20081105/gcc/testsuite/gcc.dg/tree-ssa/inline-2.c   2008-11-05 21:24:02.000000000 +0100
> @@ -5,7 +5,7 @@
>    and the call to link_error optimized away.  */
>
>  extern void link_error (void);
> -int __attribute__((always_inline)) foo(void) { return 0; }
> +inline int __attribute__((always_inline)) foo(void) { return 0; }
>
>  int main()
>  {
>


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