@@ -1,6 +1,6 @@
/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -fPIC" } */
-/* { dg-final { scan-assembler-not "@(PLT|plt)" { target i?86-*-* x86_64-*-* powerpc*-*-* } } } */
+/* { dg-final { scan-assembler-not "@(PLT|plt)" { target i?86-*-* x86_64-*-* } } } */
#define define_func(type) \
void f_ ## type (type b) { f_ ## type (0); } \
@@ -1,10 +1,10 @@
/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -fPIC" } */
-/* { dg-final { scan-assembler "@(PLT|plt)" { target i?86-*-* x86_64-*-* powerpc*-*-linux* } } } */
__attribute__((noinline, noclone))
void f (short b)
{
+ __builtin_setjmp (0); /* Prevent tailcall */
f (0);
}
@@ -14,3 +14,5 @@ void h ()
{
g (0);
}
+/* { dg-final { scan-assembler "@(PLT|plt)" { target i?86-*-* x86_64-*-* } } } */
+/* { dg-final { scan-assembler "bl f\n\[ \t\]*nop" { target powerpc*-*-linux* } } } */
@@ -8,22 +8,17 @@
int f (void);
-void
-g (void)
-{
-}
-
int
rec (int a)
{
int ret = 0;
if (a > 10 && f ())
ret += rec (a - 1);
- g ();
return a + ret;
}
+void rec_alias (short) __attribute__ ((alias ("rec")));
+
/* { dg-final { scan-assembler-times {\mbl f\M} 1 } } */
-/* { dg-final { scan-assembler-times {\mbl g\M} 1 } } */
/* { dg-final { scan-assembler-times {\mbl rec\M} 1 } } */
-/* { dg-final { scan-assembler-times {\mnop\M} 3 } } */
+/* { dg-final { scan-assembler-times {\mnop\M} 2 } } */