diff -r 2b5869ab2dd5 gcc/doc/sourcebuild.texi
--- a/gcc/doc/sourcebuild.texi	Wed Sep 08 11:03:14 2010 +0200
+++ b/gcc/doc/sourcebuild.texi	Wed Sep 08 19:46:19 2010 +0200
@@ -1680,6 +1680,11 @@
 @item pthread_h
 Target has @code{pthread.h}.
 
+@item run_expensive_tests
+Expensive testcases (usually those that consume excessive amounts of CPU
+time) should be run on this target.  This can be enabled by setting the
+@env{GCC_TEST_RUN_EXPENSIVE} environment variable to a non-empty string.
+
 @item simulator
 Test system runs executables on a simulator (i.e. slowly) rather than
 hardware (i.e. fast).
diff -r 2b5869ab2dd5 gcc/testsuite/gcc.c-torture/compile/limits-fnargs.c
--- a/gcc/testsuite/gcc.c-torture/compile/limits-fnargs.c	Wed Sep 08 11:03:14 2010 +0200
+++ b/gcc/testsuite/gcc.c-torture/compile/limits-fnargs.c	Wed Sep 08 19:46:19 2010 +0200
@@ -1,4 +1,5 @@
 /* { dg-timeout-factor 4.0 } */
+/* { dg-require-effective-target run_expensive_tests } */
 
 #define PAR1 int, int, int, int, int, int, int, int, int, int
 #define PAR2 PAR1, PAR1, PAR1, PAR1, PAR1, PAR1, PAR1, PAR1, PAR1, PAR1
diff -r 2b5869ab2dd5 gcc/testsuite/lib/target-supports.exp
--- a/gcc/testsuite/lib/target-supports.exp	Wed Sep 08 11:03:14 2010 +0200
+++ b/gcc/testsuite/lib/target-supports.exp	Wed Sep 08 19:46:19 2010 +0200
@@ -3579,3 +3579,12 @@
     }
  return 0
 }
+
+# Return 1 if expensive testcases should be run.
+
+proc check_effective_target_run_expensive_tests { } {
+    if { [getenv GCC_TEST_RUN_EXPENSIVE] != "" } {
+        return 1
+    }
+    return 0
+}
