2017-06-08 Tom de Vries <tom@codesourcery.com>
* gcc.c-torture/compile/930506-2.c: Use dg-require-effective-target
trampolines instead of NO_TRAMPOLINES.
* gcc.c-torture/execute/
20000822-1.c: Same.
* gcc.c-torture/execute/920428-2.c: Same.
* gcc.c-torture/execute/920501-7.c: Same.
* gcc.c-torture/execute/920612-2.c: Same.
* gcc.c-torture/execute/921017-1.c: Same.
* gcc.c-torture/execute/921215-1.c: Same.
* gcc.c-torture/execute/931002-1.c: Same.
* gcc.c-torture/execute/comp-goto-2.c: Same.
* gcc.c-torture/execute/nestfunc-1.c: Same.
* gcc.c-torture/execute/nestfunc-2.c: Same.
* gcc.c-torture/execute/nestfunc-3.c: Same.
* gcc.c-torture/execute/nestfunc-5.c: Same.
* gcc.c-torture/execute/nestfunc-6.c: Same.
* gcc.c-torture/execute/pr24135.c: Same.
* gcc.dg/Wtrampolines.c: Same.
* gcc.dg/torture/stackalign/comp-goto-1.c: Same.
* gcc.dg/torture/stackalign/nested-5.c: Same.
* gcc.dg/torture/stackalign/nested-6.c: Same.
* gcc.dg/torture/stackalign/non-local-goto-3.c: Same.
* gcc.dg/torture/stackalign/non-local-goto-4.c: Same.
* gcc.dg/torture/stackalign/non-local-goto-5.c: Same.
* gcc.dg/trampoline-1.c: Same.
* gcc.dg/tree-prof/pr44777.c: Same.
* gcc.target/i386/pr67770.c: Same.
* lib/gcc.exp (gcc_target_compile): Remove appending of
-DNO_TRAMPOLINES to additional_flags.
* lib/objc.exp (objc_target_compile): Same.
From-SVN: r249027
+2017-06-08 Tom de Vries <tom@codesourcery.com>
+
+ * gcc.c-torture/compile/930506-2.c: Use dg-require-effective-target
+ trampolines instead of NO_TRAMPOLINES.
+ * gcc.c-torture/execute/20000822-1.c: Same.
+ * gcc.c-torture/execute/920428-2.c: Same.
+ * gcc.c-torture/execute/920501-7.c: Same.
+ * gcc.c-torture/execute/920612-2.c: Same.
+ * gcc.c-torture/execute/921017-1.c: Same.
+ * gcc.c-torture/execute/921215-1.c: Same.
+ * gcc.c-torture/execute/931002-1.c: Same.
+ * gcc.c-torture/execute/comp-goto-2.c: Same.
+ * gcc.c-torture/execute/nestfunc-1.c: Same.
+ * gcc.c-torture/execute/nestfunc-2.c: Same.
+ * gcc.c-torture/execute/nestfunc-3.c: Same.
+ * gcc.c-torture/execute/nestfunc-5.c: Same.
+ * gcc.c-torture/execute/nestfunc-6.c: Same.
+ * gcc.c-torture/execute/pr24135.c: Same.
+ * gcc.dg/Wtrampolines.c: Same.
+ * gcc.dg/torture/stackalign/comp-goto-1.c: Same.
+ * gcc.dg/torture/stackalign/nested-5.c: Same.
+ * gcc.dg/torture/stackalign/nested-6.c: Same.
+ * gcc.dg/torture/stackalign/non-local-goto-3.c: Same.
+ * gcc.dg/torture/stackalign/non-local-goto-4.c: Same.
+ * gcc.dg/torture/stackalign/non-local-goto-5.c: Same.
+ * gcc.dg/trampoline-1.c: Same.
+ * gcc.dg/tree-prof/pr44777.c: Same.
+ * gcc.target/i386/pr67770.c: Same.
+ * lib/gcc.exp (gcc_target_compile): Remove appending of
+ -DNO_TRAMPOLINES to additional_flags.
+ * lib/objc.exp (objc_target_compile): Same.
+
2017-06-08 Tom de Vries <tom@codesourcery.com>
* lib/target-supports.exp (check_effective_target_trampolines): Test for
-#ifndef NO_TRAMPOLINES
+/* { dg-require-effective-target trampolines } */
+
int f1()
{
{ int ___() { foo(1); } bar(___); }
{ int ___() { foo(j); } bar(___); }
return( { int ___() { foo(j); } bar(___);} );
}
-#else
-int x;
-#endif
-#ifndef NO_TRAMPOLINES
+/* { dg-require-effective-target trampolines } */
+
int f0(int (*fn)(int *), int *p)
{
return (*fn) (p);
return f0(f2, &i);
}
-#endif
int main()
{
-#ifndef NO_TRAMPOLINES
if (f1() != 2)
abort ();
-#endif
+
return 0;
}
/* { dg-require-effective-target label_values } */
+/* { dg-require-effective-target trampolines } */
-#if !defined (NO_TRAMPOLINES)
s(i){if(i>0){__label__ l1;int f(int i){if(i==2)goto l1;return 0;}return f(i);l1:;}return 1;}
x(){return s(0)==1&&s(1)==0&&s(2)==1;}
main(){if(x()!=1)abort();exit(0);}
-#else
-main(){ exit (0); }
-#endif
/* { dg-require-effective-target label_values } */
+/* { dg-require-effective-target trampolines } */
#ifdef STACK_SIZE
#define DEPTH ((STACK_SIZE) / 512 + 1)
#define DEPTH 1000
#endif
-#if !defined (NO_TRAMPOLINES)
x(a)
{
__label__ xlab;
xlab:;
return a;
}
-#endif
main ()
{
-#if !defined (NO_TRAMPOLINES)
if (x (DEPTH) != DEPTH)
abort ();
-#endif
+
exit (0);
}
+/* { dg-require-effective-target trampolines } */
+
main ()
{
int i = 0;
i++, x--;
return x;
}
-#ifndef NO_TRAMPOLINES
+
if (a (2) != 0)
abort ();
-#endif
+
exit (0);
}
/* { dg-skip-if "requires alloca" { ! alloca } { "-O0" } { "" } } */
+/* { dg-require-effective-target trampolines } */
+
f(n)
{
int a[n];
}
main()
{
-#ifndef NO_TRAMPOLINES
if(f(2)!=4711)abort();
-#endif
+
exit(0);
}
+/* { dg-require-effective-target trampolines } */
+
main()
{
-#ifndef NO_TRAMPOLINES
void p(void ((*f) (void ())))
{
void r()
}
p(q);
-#endif
+
exit(0);
}
+/* { dg-require-effective-target trampolines } */
+
f (void (*func) ())
{
func ();
main ()
{
-#ifndef NO_TRAMPOLINES
void t0 ()
{
}
t1 ();
t1 ();
t2 ();
-#endif
+
exit (0);
}
/* { dg-require-effective-target label_values } */
+/* { dg-require-effective-target trampolines } */
/* A slight variation of 920501-7.c. */
#define DEPTH 1000
#endif
-#if !defined (NO_TRAMPOLINES)
x(a)
{
__label__ xlab;
xlab:;
return a;
}
-#endif
main ()
{
-#if !defined (NO_TRAMPOLINES)
+
if (x (DEPTH) != DEPTH)
abort ();
-#endif
+
exit (0);
}
+/* { dg-require-effective-target trampolines } */
+
int
g (int a, int b, int (*gi) (int, int))
{
f ()
{
-#ifndef NO_TRAMPOLINES
int i, j;
int f2 (int a, int b)
{
if (g (1, 2, f2) != 2)
abort ();
-#endif
}
main ()
+/* { dg-require-effective-target trampolines } */
+
extern int foo (int, int, int (*) (int, int, int, int, int, int, int));
int z;
int
main (void)
{
-#ifndef NO_TRAMPOLINES
int sum = 0;
int i;
if (z != 0x1b)
abort ();
-#endif
-
+
exit (0);
}
+/* { dg-require-effective-target trampolines } */
extern long foo (long, long, long (*) (long, long));
extern long use (long (*) (long, long), long, long);
int
main (void)
{
-#ifndef NO_TRAMPOLINES
long sum = 0;
long i;
if ((sum & 0xffffffff) != 0xbecfcbf5)
abort ();
-#endif
exit (0);
}
+/* { dg-require-effective-target trampolines } */
+
extern void abort (void);
extern void exit (int);
-#ifndef NO_TRAMPOLINES
static void recursive (int n, void (*proc) (void))
{
__label__ l1;
recursive (10, abort);
abort ();
}
-#else
-int main () { return 0; }
-#endif
+/* { dg-require-effective-target trampolines } */
+
/* Test that the GP gets properly restored, either by the nonlocal
receiver or the nested function. */
-#ifndef NO_TRAMPOLINES
-
typedef __SIZE_TYPE__ size_t;
extern void abort (void);
extern void exit (int);
nonlocal:
exit (0);
}
-
-#else
-int main() { return 0; }
-#endif
-#ifndef NO_TRAMPOLINES
+/* { dg-require-effective-target trampolines } */
+
extern void abort (void);
int x(int a, int b)
return 0;
}
-#else
-int main() { return 0; }
-#endif
/* { dg-require-effective-target trampolines } */
/* { dg-options "-O2 -Wtrampolines" } */
-#ifndef NO_TRAMPOLINES
-
/* This used to fail on various versions of Solaris 2 because the
trampoline couldn't be made executable. */
abort();
}
}
-#endif
int main (void)
{
-#ifndef NO_TRAMPOLINES
foo ();
-#endif
+
return 0;
}
/* { dg-do run } */
/* { dg-require-effective-target label_values } */
+/* { dg-require-effective-target trampolines } */
#ifdef STACK_SIZE
#define DEPTH ((STACK_SIZE) / 512 + 1)
extern void abort (void);
extern void exit (int);
-#if !defined (NO_TRAMPOLINES)
int
x(int a)
{
xlab:;
return a;
}
-#endif
int
main ()
{
-#if !defined (NO_TRAMPOLINES)
if (x (DEPTH) != DEPTH)
abort ();
-#endif
+
exit (0);
}
/* { dg-do run } */
+/* { dg-require-effective-target trampolines } */
extern void abort (void);
extern void exit (int);
-#ifndef NO_TRAMPOLINES
static void recursive (int n, void (*proc) (void))
{
__label__ l1;
recursive (10, abort);
abort ();
}
-#else
-int main () { return 0; }
-#endif
/* { dg-do run } */
-
-#ifndef NO_TRAMPOLINES
+/* { dg-require-effective-target trampolines } */
typedef __SIZE_TYPE__ size_t;
extern void abort (void);
nonlocal:
exit (0);
}
-
-#else
-int main() { return 0; }
-#endif
/* { dg-do run } */
/* { dg-require-effective-target nonlocal_goto } */
+/* { dg-require-effective-target trampolines } */
-#ifndef NO_TRAMPOLINES
extern void abort (void);
int x(int a, int b)
return 0;
}
-#else
-int main() { return 0; }
-#endif
/* { dg-do run } */
/* { dg-require-effective-target nonlocal_goto } */
/* { dg-require-effective-target label_values } */
+/* { dg-require-effective-target trampolines } */
extern void abort (void);
extern void exit (int);
#define DEPTH 1000
#endif
-#if !defined (NO_TRAMPOLINES)
int
x(int a)
{
xlab:;
return a;
}
-#endif
int
main ()
{
-#if !defined (NO_TRAMPOLINES)
if (x (DEPTH) != DEPTH)
abort ();
-#endif
+
exit (0);
}
/* { dg-do run } */
/* { dg-require-effective-target nonlocal_goto } */
/* { dg-require-effective-target label_values } */
+/* { dg-require-effective-target trampolines } */
extern void exit (int);
-#if !defined (NO_TRAMPOLINES)
extern void abort (void);
int s(int i){if(i>0){__label__ l1;int f(int i){if(i==2)goto l1;return 0;}return f(i);l1:;}return 1;}
int x(){return s(0)==1&&s(1)==0&&s(2)==1;}
int main(){if(x()!=1)abort();exit(0);}
-#else
-int main(){ exit (0); }
-#endif
/* { dg-require-effective-target trampolines } */
/* { dg-options "-O2" } */
-#ifndef NO_TRAMPOLINES
-
/* This used to fail on various versions of Solaris 2 because the
trampoline couldn't be made executable. */
abort();
}
}
-#endif
int main (void)
{
-#ifndef NO_TRAMPOLINES
foo ();
-#endif
return 0;
}
/* PR middle-end/44777 */
/* { dg-require-effective-target label_values } */
+/* { dg-require-effective-target trampolines } */
/* { dg-options "-O0" } */
/* A variant of gcc.c-torture/execute/comp-goto-2.c. */
#define DEPTH 1000
#endif
-#if !defined (NO_TRAMPOLINES)
int
x (int a)
{
xlab:;
return a;
}
-#endif
int
main ()
{
-#if !defined (NO_TRAMPOLINES)
+
if (x (DEPTH) != DEPTH)
abort ();
-#endif
+
exit (0);
}
/* { dg-require-effective-target trampolines } */
/* { dg-options "-O2" } */
-#ifndef NO_TRAMPOLINES
__attribute__ ((noinline)) void
foo (int i, void (* __attribute__ ((regparm (3))) bar) (int))
{
bar (i);
}
-#endif
int
main ()
{
-#ifndef NO_TRAMPOLINES
int p = 0;
__attribute__ ((regparm (3), noinline)) void
if (p != 2)
__builtin_abort ();
-#endif
+
return 0;
}
if [target_info exists gcc,stack_size] {
lappend options "additional_flags=-DSTACK_SIZE=[target_info gcc,stack_size]"
}
- if [target_info exists gcc,no_trampolines] {
- lappend options "additional_flags=-DNO_TRAMPOLINES"
- }
if [target_info exists gcc,signal_suppress] {
lappend options "additional_flags=-DSIGNAL_SUPPRESS"
}
if [target_info exists objc,stack_size] {
lappend options "additional_flags=-DSTACK_SIZE=[target_info objc,stack_size]"
}
- if [target_info exists objc,no_trampolines] {
- lappend options "additional_flags=-DNO_TRAMPOLINES"
- }
# TEST_ALWAYS_FLAGS are flags that should be passed to every
# compilation. They are passed first to allow individual