diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index fc488964480f..cfdd5cfe1a6f 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -2623,11 +2623,6 @@ Target offers such file I/O library functions as @code{fopen},
 requirement for the presence of the functions in the library; even if
 they fail at runtime, the requirement is still regarded as satisfied.

-@item freestanding
-Target is @samp{freestanding} as defined in section 4 of the C99 standard.
-Effectively, it is a target which supports no extra headers or libraries
-other than what is considered essential.
-
 @item gettimeofday
 Target supports @code{gettimeofday}.

diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/fprintf.x b/gcc/testsuite/gcc.c-torture/execute/builtins/fprintf.x
deleted file mode 100644
index c8fdaf5b2547..000000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/fprintf.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_freestanding] } {
-        return 1;
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/fputs.x b/gcc/testsuite/gcc.c-torture/execute/builtins/fputs.x
deleted file mode 100644
index c8fdaf5b2547..000000000000
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/fputs.x
+++ /dev/null
@@ -1,7 +0,0 @@
-load_lib target-supports.exp
-
-if { [check_effective_target_freestanding] } {
-        return 1;
-}
-
-return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/complex-6.c b/gcc/testsuite/gcc.c-torture/execute/complex-6.c
index 75f921080886..082c7e7cf514 100644
--- a/gcc/testsuite/gcc.c-torture/execute/complex-6.c
+++ b/gcc/testsuite/gcc.c-torture/execute/complex-6.c
@@ -1,5 +1,3 @@
-/* { dg-skip-if "requires io" { freestanding } }  */
-
 /* This test tests complex conjugate and passing/returning of
    complex parameter.  */

diff --git a/gcc/testsuite/gcc.c-torture/execute/fprintf-1.c b/gcc/testsuite/gcc.c-torture/execute/fprintf-1.c
index 15996ef22c51..f16252b1e8e6 100644
--- a/gcc/testsuite/gcc.c-torture/execute/fprintf-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/fprintf-1.c
@@ -1,5 +1,3 @@
-/* { dg-skip-if "requires io" { freestanding } }  */
-
 #include <stdio.h>
 #include <stdlib.h>

diff --git a/gcc/testsuite/gcc.c-torture/execute/fprintf-2.c b/gcc/testsuite/gcc.c-torture/execute/fprintf-2.c
index 00517d1d1acf..edcbd1ed631f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/fprintf-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/fprintf-2.c
@@ -3,8 +3,7 @@
    The calls can still be transformed into those of other functions.
    { dg-require-effective-target fileio }
    { dg-prune-output "warning: warning: \[^\n\r\]* possibly used unsafely" }
-   { dg-skip-if "requires io" { avr-*-* } }
-   { dg-skip-if "requires io" { freestanding } } */
+   { dg-skip-if "requires io" { avr-*-* } } */

 #include <stdio.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/gcc.c-torture/execute/fprintf-chk-1.c b/gcc/testsuite/gcc.c-torture/execute/fprintf-chk-1.c
index 6f9e62c39e72..918ff8e5689a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/fprintf-chk-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/fprintf-chk-1.c
@@ -1,5 +1,3 @@
-/* { dg-skip-if "requires io" { freestanding } }  */
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
diff --git a/gcc/testsuite/gcc.c-torture/execute/gofast.c b/gcc/testsuite/gcc.c-torture/execute/gofast.c
index 72774f16e740..f55ced22073b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/gofast.c
+++ b/gcc/testsuite/gcc.c-torture/execute/gofast.c
@@ -1,5 +1,3 @@
-/* { dg-skip-if "requires io" { freestanding } }  */
-
 /* Program to test gcc's usage of the gofast library.  */

 /* The main guiding themes are to make it trivial to add test cases over time
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr34456.c b/gcc/testsuite/gcc.c-torture/execute/pr34456.c
index b4a845ec14b1..526c954e55ad 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr34456.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr34456.c
@@ -1,5 +1,3 @@
-/* { dg-skip-if "requires qsort" { freestanding } }  */
-
 #include <stdlib.h>

 int __attribute__ ((noinline)) debug (void) { return 1; }
diff --git a/gcc/testsuite/gcc.c-torture/execute/printf-1.c b/gcc/testsuite/gcc.c-torture/execute/printf-1.c
index 654e62766a85..77c4b87009eb 100644
--- a/gcc/testsuite/gcc.c-torture/execute/printf-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/printf-1.c
@@ -1,4 +1,4 @@
-/* { dg-skip-if "requires io" { freestanding } }  */
+/* { dg-xfail-run-if {unexpected PTX 'vprintf' return value} { nvptx-*-* } } */

 #include <stdio.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/gcc.c-torture/execute/printf-2.c b/gcc/testsuite/gcc.c-torture/execute/printf-2.c
index 2087bba84482..6e060773f83b 100644
--- a/gcc/testsuite/gcc.c-torture/execute/printf-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/printf-2.c
@@ -4,8 +4,7 @@
    { dg-require-effective-target unwrapped }
    { dg-require-effective-target fileio }
    { dg-prune-output "warning: warning: \[^\n\r\]* possibly used unsafely" }
-   { dg-skip-if "requires io" { avr-*-* } }
-   { dg-skip-if "requires io" { freestanding } } */
+   { dg-skip-if "requires io" { avr-*-* } } */

 #include <stdio.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/gcc.c-torture/execute/printf-chk-1.c b/gcc/testsuite/gcc.c-torture/execute/printf-chk-1.c
index aab43062baef..a9fb5eea63df 100644
--- a/gcc/testsuite/gcc.c-torture/execute/printf-chk-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/printf-chk-1.c
@@ -1,4 +1,4 @@
-/* { dg-skip-if "requires io" { freestanding } }  */
+/* { dg-xfail-run-if {unexpected PTX 'vprintf' return value} { nvptx-*-* } } */

 #include <stdio.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/gcc.c-torture/execute/user-printf.c b/gcc/testsuite/gcc.c-torture/execute/user-printf.c
index bfee0760dd74..683aaf272589 100644
--- a/gcc/testsuite/gcc.c-torture/execute/user-printf.c
+++ b/gcc/testsuite/gcc.c-torture/execute/user-printf.c
@@ -4,8 +4,7 @@
    { dg-require-effective-target unwrapped }
    { dg-require-effective-target fileio }
    { dg-prune-output "warning: warning: \[^\n\r\]* possibly used unsafely" }
-   { dg-skip-if "requires io" { avr-*-* } }
-   { dg-skip-if "requires io" { freestanding } } */
+   { dg-skip-if "requires io" { avr-*-* } } */

 #include <stdarg.h>
 #include <stdio.h>
diff --git a/gcc/testsuite/gcc.c-torture/execute/vfprintf-1.c b/gcc/testsuite/gcc.c-torture/execute/vfprintf-1.c
index 0ac41dee3d6f..c00380425425 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vfprintf-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/vfprintf-1.c
@@ -1,5 +1,3 @@
-/* { dg-skip-if "requires io" { freestanding } }  */
-
 #ifndef test
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/gcc.c-torture/execute/vfprintf-chk-1.c b/gcc/testsuite/gcc.c-torture/execute/vfprintf-chk-1.c
index 401eaf4304a4..f8f964c7e9af 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vfprintf-chk-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/vfprintf-chk-1.c
@@ -1,5 +1,3 @@
-/* { dg-skip-if "requires io" { freestanding } }  */
-
 #ifndef test
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/gcc/testsuite/gcc.c-torture/execute/vprintf-1.c b/gcc/testsuite/gcc.c-torture/execute/vprintf-1.c
index 259397ebda39..5c6208dd114d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vprintf-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/vprintf-1.c
@@ -1,4 +1,4 @@
-/* { dg-skip-if "requires io" { freestanding } }  */
+/* { dg-xfail-run-if {unexpected PTX 'vprintf' return value} { nvptx-*-* } } */

 #ifndef test
 #include <stdio.h>
diff --git a/gcc/testsuite/gcc.c-torture/execute/vprintf-chk-1.c b/gcc/testsuite/gcc.c-torture/execute/vprintf-chk-1.c
index 04ecc4df4d93..bb321ba6908c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vprintf-chk-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/vprintf-chk-1.c
@@ -1,4 +1,4 @@
-/* { dg-skip-if "requires io" { freestanding } }  */
+/* { dg-xfail-run-if {unexpected PTX 'vprintf' return value} { nvptx-*-* } } */

 #ifndef test
 #include <stdio.h>
diff --git a/gcc/testsuite/gcc.dg/pr27531-1.c b/gcc/testsuite/gcc.dg/pr27531-1.c
index b1ea748acb27..04672045b581 100644
--- a/gcc/testsuite/gcc.dg/pr27531-1.c
+++ b/gcc/testsuite/gcc.dg/pr27531-1.c
@@ -4,7 +4,6 @@
    output to reference a label that had been eliminated.  */
 /* { dg-do link } */
 /* { dg-options "-O2" } */
-/* { dg-skip-if "requires io" { freestanding } }  */

 typedef struct _IO_FILE FILE;
 char const *RCSname;
diff --git a/gcc/testsuite/gcc.dg/pr44606.c b/gcc/testsuite/gcc.dg/pr44606.c
index 13cc3efc1939..3929775535e0 100644
--- a/gcc/testsuite/gcc.dg/pr44606.c
+++ b/gcc/testsuite/gcc.dg/pr44606.c
@@ -1,7 +1,6 @@
 /* PR target/44606 */
 /* { dg-do run } */
 /* { dg-options "-O2" } */
-/* { dg-skip-if "requires io" { freestanding } }  */

 #include <stdio.h>

diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 555d6dde505a..d2de761adb5d 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -830,16 +830,6 @@ proc check_profiling_available { test_what } {
     return $profiling_working
 }

-# Check to see if a target is "freestanding". This is as per the definition
-# in Section 4 of C99 standard. Effectively, it is a target which supports no
-# extra headers or libraries other than what is considered essential.
-proc check_effective_target_freestanding { } {
-    if { [istarget nvptx-*-*] } {
-       return 1
-    }
-    return 0
-}
-
 # Check to see that file I/O functions are available.
 proc check_effective_target_fileio { } {
     return [check_no_compiler_messages fileio_available executable {
