The {gcc,g++}.target/i386 tests that use dg-final { check-function-bodies }
need addititional options on Solaris/x86.  So far, those tests have been
updated manually to add the required -fdwarf2-cfi-asm
-fasynchronous-unwind-tables.  However, this has two issues:

* Those Solaris-only options make dg-options harder to read, although
  they do no harm on other targets.

* Besides, the need for those options repeated got forgotten for each
  new bunch of such tests.

To avoid that problem in the future, this patch introduces a new
dg-add-options feature, check_function_bodies, that adds those options
exactly on the targets that need it.  It both improves readability and
will hopefully not be forgotten again for future tests.

Tested on i386-pc-solaris2.11 with as/ld and gas/ld, and
x86_64-pc-linux-gnu.

Ok for trunk?

This patch uncovered a couple of tests that still FAIL on Solaris
afterwards.  I'll address those failures in follow-ups.

        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2025-11-21  Rainer Orth  <[email protected]>

        gcc:
        * doc/sourcebuild.texi (Add Options): Document
        check_function_bodies.

        gcc/testsuite:
        * lib/target-supports.exp (add_options_for_check_function_bodies):
        New proc.

        * g++.target/i386/cf_check-3.C: Add dg-add-options
        check_function_bodies.
        * g++.target/i386/cf_check-4.C: Likewise.
        * gcc.target/i386/builtin-copysign-2.c: Likewise.
        * gcc.target/i386/builtin-copysign-3.c: Likewise.
        * gcc.target/i386/builtin-copysign-4.c: Likewise.
        * gcc.target/i386/builtin-copysign-5.c: Likewise.
        * gcc.target/i386/builtin-copysign-6.c: Likewise.
        * gcc.target/i386/builtin-copysign-7.c: Likewise.
        * gcc.target/i386/builtin-copysign-8a.c: Likewise.
        * gcc.target/i386/builtin-copysign-8b.c: Likewise.
        * gcc.target/i386/builtin-fabs-1.c: Likewise.
        * gcc.target/i386/builtin-memmove-10.c: Likewise.
        * gcc.target/i386/builtin-memmove-11a.c: Likewise.
        * gcc.target/i386/builtin-memmove-11b.c: Likewise.
        * gcc.target/i386/builtin-memmove-11c.c: Likewise.
        * gcc.target/i386/builtin-memmove-12.c: Likewise.
        * gcc.target/i386/builtin-memmove-13.c: Likewise.
        * gcc.target/i386/builtin-memmove-14.c: Likewise.
        * gcc.target/i386/builtin-memmove-15.c: Likewise.
        * gcc.target/i386/builtin-memmove-1a.c: Likewise.
        * gcc.target/i386/builtin-memmove-1b.c: Likewise.
        * gcc.target/i386/builtin-memmove-1c.c: Likewise.
        * gcc.target/i386/builtin-memmove-1d.c: Likewise.
        * gcc.target/i386/builtin-memmove-2a.c: Likewise.
        * gcc.target/i386/builtin-memmove-2b.c: Likewise.
        * gcc.target/i386/builtin-memmove-2c.c: Likewise.
        * gcc.target/i386/builtin-memmove-2d.c: Likewise.
        * gcc.target/i386/builtin-memmove-3a.c: Likewise.
        * gcc.target/i386/builtin-memmove-3b.c: Likewise.
        * gcc.target/i386/builtin-memmove-3c.c: Likewise.
        * gcc.target/i386/builtin-memmove-4a.c: Likewise.
        * gcc.target/i386/builtin-memmove-4b.c: Likewise.
        * gcc.target/i386/builtin-memmove-4c.c: Likewise.
        * gcc.target/i386/builtin-memmove-5a.c: Likewise.
        * gcc.target/i386/builtin-memmove-5b.c: Likewise.
        * gcc.target/i386/builtin-memmove-5c.c: Likewise.
        * gcc.target/i386/builtin-memmove-6.c: Likewise.
        * gcc.target/i386/builtin-memmove-7.c: Likewise.
        * gcc.target/i386/builtin-memmove-8.c: Likewise.
        * gcc.target/i386/builtin-memmove-9.c: Likewise.
        * gcc.target/i386/cf_check-11.c: Likewise.
        * gcc.target/i386/cf_check-7.c: Likewise.
        * gcc.target/i386/pr120936-1.c: Likewise.
        * gcc.target/i386/pr120936-11.c: Likewise.
        * gcc.target/i386/pr120936-2.c: Likewise.
        * gcc.target/i386/pr120936-4.c: Likewise.
        * gcc.target/i386/pr120936-5.c: Likewise.
        * gcc.target/i386/pr120936-9.c: Likewise.

        * g++.target/i386/memset-pr101366-1.C: Switch to dg-add-options
        check_function_bodies.
        * g++.target/i386/memset-pr101366-2.C: Likewise.
        * g++.target/i386/memset-pr108585-1a.C: Likewise.
        * g++.target/i386/memset-pr108585-1b.C: Likewise.
        * g++.target/i386/memset-pr118276-1a.C: Likewise.
        * g++.target/i386/memset-pr118276-1b.C: Likewise.
        * g++.target/i386/memset-pr118276-1c.C: Likewise.
        * gcc.target/i386/memcpy-pr120683-1.c: Likewise.
        * gcc.target/i386/memcpy-pr120683-2.c: Likewise.
        * gcc.target/i386/memcpy-pr120683-3.c: Likewise.
        * gcc.target/i386/memcpy-pr120683-4.c: Likewise.
        * gcc.target/i386/memcpy-pr120683-5.c: Likewise.
        * gcc.target/i386/memcpy-pr120683-6.c: Likewise.
        * gcc.target/i386/memcpy-pr120683-7.c: Likewise.
        * gcc.target/i386/memcpy-strategy-12.c: Likewise.
        * gcc.target/i386/memset-pr120683-1.c: Likewise.
        * gcc.target/i386/memset-pr120683-10.c: Likewise.
        * gcc.target/i386/memset-pr120683-11.c: Likewise.
        * gcc.target/i386/memset-pr120683-12.c: Likewise.
        * gcc.target/i386/memset-pr120683-13.c: Likewise.
        * gcc.target/i386/memset-pr120683-14.c: Likewise.
        * gcc.target/i386/memset-pr120683-15.c: Likewise.
        * gcc.target/i386/memset-pr120683-16.c: Likewise.
        * gcc.target/i386/memset-pr120683-17.c: Likewise.
        * gcc.target/i386/memset-pr120683-18.c: Likewise.
        * gcc.target/i386/memset-pr120683-19.c: Likewise.
        * gcc.target/i386/memset-pr120683-2.c: Likewise.
        * gcc.target/i386/memset-pr120683-20.c: Likewise.
        * gcc.target/i386/memset-pr120683-21.c: Likewise.
        * gcc.target/i386/memset-pr120683-22.c: Likewise.
        * gcc.target/i386/memset-pr120683-23.c: Likewise.
        * gcc.target/i386/memset-pr120683-3.c: Likewise.
        * gcc.target/i386/memset-pr120683-4.c: Likewise.
        * gcc.target/i386/memset-pr120683-5.c: Likewise.
        * gcc.target/i386/memset-pr120683-6.c: Likewise.
        * gcc.target/i386/memset-pr120683-7.c: Likewise.
        * gcc.target/i386/memset-pr120683-8.c: Likewise.
        * gcc.target/i386/memset-pr120683-9.c: Likewise.
        * gcc.target/i386/memset-pr70308-1a.c: Likewise.
        * gcc.target/i386/memset-pr70308-1b.c: Likewise.
        * gcc.target/i386/memset-strategy-10.c: Likewise.
        * gcc.target/i386/memset-strategy-13.c: Likewise.
        * gcc.target/i386/memset-strategy-25.c: Likewise.
        * gcc.target/i386/memset-strategy-28.c: Likewise.
        * gcc.target/i386/memset-strategy-29.c: Likewise.
        * gcc.target/i386/memset-strategy-30.c: Likewise.
        * gcc.target/i386/pr111673.c: Likewise.
        * gcc.target/i386/pr82142a.c: Likewise.
        * gcc.target/i386/pr82142b.c: Likewise.
        * gcc.target/i386/pr92080-17.c: Likewise.

# HG changeset patch
# Parent  c96aaf43a525b36d089ba6747b0d2c2e1a9ffe98
testsuite: i386: Handle check-function-body options using dg-add-options

diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -3379,6 +3379,10 @@ keyword}.
 Add the target-specific flags needed to enable functions to bind
 locally when using pic/PIC passes in the testsuite.
 
+@item check_function_bodies
+Add the target-specific flags needed to use
+@code{check-function-bodies} from @code{dg-final}.
+
 @item float@var{n}
 Add the target-specific flags needed to use the @code{_Float@var{n}} type.
 
diff --git a/gcc/testsuite/g++.target/i386/cf_check-3.C b/gcc/testsuite/g++.target/i386/cf_check-3.C
--- a/gcc/testsuite/g++.target/i386/cf_check-3.C
+++ b/gcc/testsuite/g++.target/i386/cf_check-3.C
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { "i?86-*-* x86_64-*-*" } } } */
 /* { dg-options "-O2 -fcf-protection" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/g++.target/i386/cf_check-4.C b/gcc/testsuite/g++.target/i386/cf_check-4.C
--- a/gcc/testsuite/g++.target/i386/cf_check-4.C
+++ b/gcc/testsuite/g++.target/i386/cf_check-4.C
@@ -1,6 +1,7 @@
 /* { dg-do compile { target { "i?86-*-* x86_64-*-*" } } } */
 /* { dg-require-weak "" } */
 /* { dg-options "-O2 -fcf-protection" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/g++.target/i386/memset-pr101366-1.C b/gcc/testsuite/g++.target/i386/memset-pr101366-1.C
--- a/gcc/testsuite/g++.target/i386/memset-pr101366-1.C
+++ b/gcc/testsuite/g++.target/i386/memset-pr101366-1.C
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O3 -march=x86-64-v2 -std=gnu++17 -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */
+/* { dg-options "-O3 -march=x86-64-v2 -std=gnu++17" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/g++.target/i386/memset-pr101366-2.C b/gcc/testsuite/g++.target/i386/memset-pr101366-2.C
--- a/gcc/testsuite/g++.target/i386/memset-pr101366-2.C
+++ b/gcc/testsuite/g++.target/i386/memset-pr101366-2.C
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O3 -march=x86-64-v2 -std=gnu++17 -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */
+/* { dg-options "-O3 -march=x86-64-v2 -std=gnu++17" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/g++.target/i386/memset-pr108585-1a.C b/gcc/testsuite/g++.target/i386/memset-pr108585-1a.C
--- a/gcc/testsuite/g++.target/i386/memset-pr108585-1a.C
+++ b/gcc/testsuite/g++.target/i386/memset-pr108585-1a.C
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O3 -march=x86-64 -std=c++20 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mno-stackrealign -fomit-frame-pointer -DUSE_CHAR" } */
+/* { dg-options "-O3 -march=x86-64 -std=c++20 -mno-stackrealign -fomit-frame-pointer -DUSE_CHAR" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/g++.target/i386/memset-pr108585-1b.C b/gcc/testsuite/g++.target/i386/memset-pr108585-1b.C
--- a/gcc/testsuite/g++.target/i386/memset-pr108585-1b.C
+++ b/gcc/testsuite/g++.target/i386/memset-pr108585-1b.C
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O3 -march=x86-64 -std=c++20 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mno-stackrealign -fomit-frame-pointer" } */
+/* { dg-options "-O3 -march=x86-64 -std=c++20 -mno-stackrealign -fomit-frame-pointer" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/g++.target/i386/memset-pr118276-1a.C b/gcc/testsuite/g++.target/i386/memset-pr118276-1a.C
--- a/gcc/testsuite/g++.target/i386/memset-pr118276-1a.C
+++ b/gcc/testsuite/g++.target/i386/memset-pr118276-1a.C
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O3 -march=x86-64 -std=c++17 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -DMODE=0" } */
+/* { dg-options "-O3 -march=x86-64 -std=c++17 -DMODE=0" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/g++.target/i386/memset-pr118276-1b.C b/gcc/testsuite/g++.target/i386/memset-pr118276-1b.C
--- a/gcc/testsuite/g++.target/i386/memset-pr118276-1b.C
+++ b/gcc/testsuite/g++.target/i386/memset-pr118276-1b.C
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O3 -march=x86-64 -std=c++17 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -DMODE=1" } */
+/* { dg-options "-O3 -march=x86-64 -std=c++17 -DMODE=1" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/g++.target/i386/memset-pr118276-1c.C b/gcc/testsuite/g++.target/i386/memset-pr118276-1c.C
--- a/gcc/testsuite/g++.target/i386/memset-pr118276-1c.C
+++ b/gcc/testsuite/g++.target/i386/memset-pr118276-1c.C
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O3 -march=x86-64 -std=c++17 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -DMODE=2" } */
+/* { dg-options "-O3 -march=x86-64 -std=c++17 -DMODE=2" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-copysign-2.c b/gcc/testsuite/gcc.target/i386/builtin-copysign-2.c
--- a/gcc/testsuite/gcc.target/i386/builtin-copysign-2.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-copysign-2.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { ! ia32 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-copysign-3.c b/gcc/testsuite/gcc.target/i386/builtin-copysign-3.c
--- a/gcc/testsuite/gcc.target/i386/builtin-copysign-3.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-copysign-3.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { ! ia32 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-copysign-4.c b/gcc/testsuite/gcc.target/i386/builtin-copysign-4.c
--- a/gcc/testsuite/gcc.target/i386/builtin-copysign-4.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-copysign-4.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { ! ia32 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-copysign-5.c b/gcc/testsuite/gcc.target/i386/builtin-copysign-5.c
--- a/gcc/testsuite/gcc.target/i386/builtin-copysign-5.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-copysign-5.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { ! ia32 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-copysign-6.c b/gcc/testsuite/gcc.target/i386/builtin-copysign-6.c
--- a/gcc/testsuite/gcc.target/i386/builtin-copysign-6.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-copysign-6.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { ! ia32 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-copysign-7.c b/gcc/testsuite/gcc.target/i386/builtin-copysign-7.c
--- a/gcc/testsuite/gcc.target/i386/builtin-copysign-7.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-copysign-7.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { ! ia32 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-copysign-8a.c b/gcc/testsuite/gcc.target/i386/builtin-copysign-8a.c
--- a/gcc/testsuite/gcc.target/i386/builtin-copysign-8a.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-copysign-8a.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { ! ia32 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-copysign-8b.c b/gcc/testsuite/gcc.target/i386/builtin-copysign-8b.c
--- a/gcc/testsuite/gcc.target/i386/builtin-copysign-8b.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-copysign-8b.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx512f -mavx -mtune=generic" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { ! ia32 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-fabs-1.c b/gcc/testsuite/gcc.target/i386/builtin-fabs-1.c
--- a/gcc/testsuite/gcc.target/i386/builtin-fabs-1.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-fabs-1.c
@@ -1,6 +1,7 @@
 /* PR target/122323 */
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { ! ia32 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-10.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-10.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-10.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-10.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-11a.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-11a.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-11a.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-11a.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-11b.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-11b.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-11b.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-11b.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx512f -march=x86-64-v3 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-11c.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-11c.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-11c.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-11c.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -march=x86-64-v4 -mmove-max=512 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { ! ia32 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-12.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-12.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-12.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-12.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2 -mtune=generic" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-13.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-13.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-13.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-13.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2 -mtune=generic" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-14.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-14.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-14.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-14.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-15.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-15.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-15.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-15.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-1a.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-1a.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-1a.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-1a.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { ! ia32 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-1b.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-1b.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-1b.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-1b.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx512f -march=x86-64-v3 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { ! ia32 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-1c.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-1c.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-1c.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-1c.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -march=x86-64-v4 -mmove-max=512 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { ! ia32 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-1d.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-1d.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-1d.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-1d.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mgeneral-regs-only -march=x86-64 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-2a.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-2a.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-2a.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-2a.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-2b.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-2b.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-2b.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-2b.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx512f -march=x86-64-v3 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-2c.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-2c.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-2c.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-2c.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -march=x86-64-v4 -mmove-max=512 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-2d.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-2d.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-2d.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-2d.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mgeneral-regs-only -march=x86-64 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-3a.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-3a.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-3a.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-3a.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-3b.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-3b.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-3b.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-3b.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx512f -march=x86-64-v3 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-3c.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-3c.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-3c.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-3c.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -march=x86-64-v4 -mmove-max=512 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-4a.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-4a.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-4a.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-4a.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-4b.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-4b.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-4b.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-4b.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx512f -march=x86-64-v3 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-4c.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-4c.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-4c.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-4c.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -march=x86-64-v4 -mmove-max=512 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-5a.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-5a.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-5a.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-5a.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-5b.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-5b.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-5b.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-5b.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx512f -march=x86-64-v3 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-5c.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-5c.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-5c.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-5c.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -march=x86-64-v4 -mmove-max=512 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-6.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-6.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-6.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-6.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-7.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-7.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-7.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-7.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-8.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-8.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-8.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-8.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/builtin-memmove-9.c b/gcc/testsuite/gcc.target/i386/builtin-memmove-9.c
--- a/gcc/testsuite/gcc.target/i386/builtin-memmove-9.c
+++ b/gcc/testsuite/gcc.target/i386/builtin-memmove-9.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2 -mno-avx -msse2 -mtune=generic -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { lp64 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/cf_check-11.c b/gcc/testsuite/gcc.target/i386/cf_check-11.c
--- a/gcc/testsuite/gcc.target/i386/cf_check-11.c
+++ b/gcc/testsuite/gcc.target/i386/cf_check-11.c
@@ -2,6 +2,7 @@
 /* { dg-do compile { target { "i?86-*-* x86_64-*-*" } } } */
 /* { dg-require-weak "" } */
 /* { dg-options "-O2 -fcf-protection" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/cf_check-7.c b/gcc/testsuite/gcc.target/i386/cf_check-7.c
--- a/gcc/testsuite/gcc.target/i386/cf_check-7.c
+++ b/gcc/testsuite/gcc.target/i386/cf_check-7.c
@@ -1,6 +1,7 @@
 /* PR c/122427 */
 /* { dg-do compile { target { "i?86-*-* x86_64-*-*" } } } */
 /* { dg-options "-O2 -fcf-protection" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-1.c b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-1.c
--- a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-1.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-1.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mno-sse -mmemcpy-strategy=unrolled_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-options "-O2 -mno-sse -mmemcpy-strategy=unrolled_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-2.c b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-2.c
--- a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-2.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-2.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */
+/* { dg-options "-O2 -march=x86-64 -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-3.c b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-3.c
--- a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-3.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-3.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */
+/* { dg-options "-O2 -march=x86-64 -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-4.c b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-4.c
--- a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-4.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-4.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v3 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */
+/* { dg-options "-O2 -march=x86-64-v3 -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-5.c b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-5.c
--- a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-5.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-5.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v3 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */
+/* { dg-options "-O2 -march=x86-64-v3 -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-6.c b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-6.c
--- a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-6.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-6.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v4 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */
+/* { dg-options "-O2 -march=x86-64-v4 -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-7.c b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-7.c
--- a/gcc/testsuite/gcc.target/i386/memcpy-pr120683-7.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-pr120683-7.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v4 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */
+/* { dg-options "-O2 -march=x86-64-v4 -mmemcpy-strategy=vector_loop:2048:noalign,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-strategy-12.c b/gcc/testsuite/gcc.target/i386/memcpy-strategy-12.c
--- a/gcc/testsuite/gcc.target/i386/memcpy-strategy-12.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-strategy-12.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mtune=generic -mno-sse -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */
+/* { dg-options "-O2 -mtune=generic -mno-sse" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-1.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-1.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-1.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-1.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-10.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-10.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-10.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-10.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mno-sse -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=unrolled_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-options "-O2 -mno-sse -mmemset-strategy=unrolled_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-11.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-11.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-11.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-11.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mno-sse -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=unrolled_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-options "-O2 -mno-sse -mmemset-strategy=unrolled_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-12.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-12.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-12.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-12.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mno-sse -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=unrolled_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-options "-O2 -mno-sse -mmemset-strategy=unrolled_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-13.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-13.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-13.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-13.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-14.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-14.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-14.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-14.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */
+/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-15.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-15.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-15.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-15.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v3 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */
+/* { dg-options "-O2 -march=x86-64-v3 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-16.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-16.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-16.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-16.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v4 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */
+/* { dg-options "-O2 -march=x86-64-v4 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-17.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-17.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-17.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-17.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-18.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-18.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-18.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-18.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-19.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-19.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-19.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-19.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-2.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-2.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-2.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-2.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v3 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-options "-O2 -march=x86-64-v3 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-20.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-20.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-20.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-20.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-21.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-21.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-21.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-21.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-22.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-22.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-22.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-22.c
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=rep_8byte:8192:align,libcall:-1:noalign" } */
+/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=rep_8byte:8192:align,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-23.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-23.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-23.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-23.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -minline-all-stringops -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-options "-O2 -march=x86-64 -minline-all-stringops -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-3.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-3.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-3.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-3.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v4 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-options "-O2 -march=x86-64-v4 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-4.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-4.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-4.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-4.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */
+/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-5.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-5.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-5.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-5.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v3 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */
+/* { dg-options "-O2 -march=x86-64-v3 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-6.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-6.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-6.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-6.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v4 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */
+/* { dg-options "-O2 -march=x86-64-v4 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-7.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-7.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-7.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-7.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */
+/* { dg-options "-O2 -march=x86-64 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-8.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-8.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-8.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-8.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v3 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */
+/* { dg-options "-O2 -march=x86-64-v3 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr120683-9.c b/gcc/testsuite/gcc.target/i386/memset-pr120683-9.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr120683-9.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr120683-9.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v4 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */
+/* { dg-options "-O2 -march=x86-64-v4 -mmemset-strategy=vector_loop:256:noalign,libcall:-1:noalign -minline-all-stringops" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr70308-1a.c b/gcc/testsuite/gcc.target/i386/memset-pr70308-1a.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr70308-1a.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr70308-1a.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */
+/* { dg-options "-O2 -march=x86-64" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-pr70308-1b.c b/gcc/testsuite/gcc.target/i386/memset-pr70308-1b.c
--- a/gcc/testsuite/gcc.target/i386/memset-pr70308-1b.c
+++ b/gcc/testsuite/gcc.target/i386/memset-pr70308-1b.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64 -fasynchronous-unwind-tables -fdwarf2-cfi-asm -fomit-frame-pointer -DUSE_SCANF" } */
+/* { dg-options "-O2 -march=x86-64 -fomit-frame-pointer -DUSE_SCANF" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-strategy-10.c b/gcc/testsuite/gcc.target/i386/memset-strategy-10.c
--- a/gcc/testsuite/gcc.target/i386/memset-strategy-10.c
+++ b/gcc/testsuite/gcc.target/i386/memset-strategy-10.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-Os -march=x86-64 -mstringop-strategy=vector_loop -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */
+/* { dg-options "-Os -march=x86-64 -mstringop-strategy=vector_loop" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { ! ia32 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-strategy-13.c b/gcc/testsuite/gcc.target/i386/memset-strategy-13.c
--- a/gcc/testsuite/gcc.target/i386/memset-strategy-13.c
+++ b/gcc/testsuite/gcc.target/i386/memset-strategy-13.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-Os -mno-sse -mstringop-strategy=unrolled_loop -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */
+/* { dg-options "-Os -mno-sse -mstringop-strategy=unrolled_loop" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { ! ia32 } } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-strategy-25.c b/gcc/testsuite/gcc.target/i386/memset-strategy-25.c
--- a/gcc/testsuite/gcc.target/i386/memset-strategy-25.c
+++ b/gcc/testsuite/gcc.target/i386/memset-strategy-25.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mtune=generic -mno-sse -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */
+/* { dg-options "-O2 -mtune=generic -mno-sse" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-strategy-28.c b/gcc/testsuite/gcc.target/i386/memset-strategy-28.c
--- a/gcc/testsuite/gcc.target/i386/memset-strategy-28.c
+++ b/gcc/testsuite/gcc.target/i386/memset-strategy-28.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mtune=generic -mno-sse -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */
+/* { dg-options "-O2 -mtune=generic -mno-sse" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-strategy-29.c b/gcc/testsuite/gcc.target/i386/memset-strategy-29.c
--- a/gcc/testsuite/gcc.target/i386/memset-strategy-29.c
+++ b/gcc/testsuite/gcc.target/i386/memset-strategy-29.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mtune=generic -mno-sse -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */
+/* { dg-options "-O2 -mtune=generic -mno-sse" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/memset-strategy-30.c b/gcc/testsuite/gcc.target/i386/memset-strategy-30.c
--- a/gcc/testsuite/gcc.target/i386/memset-strategy-30.c
+++ b/gcc/testsuite/gcc.target/i386/memset-strategy-30.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -mtune=generic -mno-sse -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */
+/* { dg-options "-O2 -mtune=generic -mno-sse" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target lp64 } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/pr111673.c b/gcc/testsuite/gcc.target/i386/pr111673.c
--- a/gcc/testsuite/gcc.target/i386/pr111673.c
+++ b/gcc/testsuite/gcc.target/i386/pr111673.c
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -fdump-rtl-pro_and_epilogue -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */
+/* { dg-options "-O2 -fdump-rtl-pro_and_epilogue" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.}  } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/pr120936-1.c b/gcc/testsuite/gcc.target/i386/pr120936-1.c
--- a/gcc/testsuite/gcc.target/i386/pr120936-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr120936-1.c
@@ -1,5 +1,6 @@
 /* { dg-do compile { target fpic } } */
 /* { dg-options "-O2 -pg -mno-fentry -fno-pic -fno-shrink-wrap" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/pr120936-11.c b/gcc/testsuite/gcc.target/i386/pr120936-11.c
--- a/gcc/testsuite/gcc.target/i386/pr120936-11.c
+++ b/gcc/testsuite/gcc.target/i386/pr120936-11.c
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { fpic && lp64 } } } */
 /* { dg-options "-O2 -mrecord-mcount -mcmodel=large -pg -mno-fentry -fno-pic -fno-shrink-wrap" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^(1|\t?\.)} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/pr120936-2.c b/gcc/testsuite/gcc.target/i386/pr120936-2.c
--- a/gcc/testsuite/gcc.target/i386/pr120936-2.c
+++ b/gcc/testsuite/gcc.target/i386/pr120936-2.c
@@ -1,5 +1,6 @@
 /* { dg-do compile { target fpic } } */
 /* { dg-options "-O2 -pg -mno-fentry -fpic -fno-shrink-wrap" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/pr120936-4.c b/gcc/testsuite/gcc.target/i386/pr120936-4.c
--- a/gcc/testsuite/gcc.target/i386/pr120936-4.c
+++ b/gcc/testsuite/gcc.target/i386/pr120936-4.c
@@ -1,5 +1,6 @@
 /* { dg-do compile { target fpic } } */
 /* { dg-options "-O2 -pg -mno-fentry -mrecord-mcount -fno-pic -fno-shrink-wrap" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^(1|\t?\.)} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/pr120936-5.c b/gcc/testsuite/gcc.target/i386/pr120936-5.c
--- a/gcc/testsuite/gcc.target/i386/pr120936-5.c
+++ b/gcc/testsuite/gcc.target/i386/pr120936-5.c
@@ -1,5 +1,6 @@
 /* { dg-do compile { target fpic } } */
 /* { dg-options "-O2 -pg -mrecord-mcount -mno-fentry -fpic -fno-shrink-wrap" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^(1|\t?\.)} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/pr120936-9.c b/gcc/testsuite/gcc.target/i386/pr120936-9.c
--- a/gcc/testsuite/gcc.target/i386/pr120936-9.c
+++ b/gcc/testsuite/gcc.target/i386/pr120936-9.c
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { fpic && lp64 } } } */
 /* { dg-options "-O2 -mcmodel=large -pg -mno-fentry -fno-pic -fno-shrink-wrap" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.} } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/pr82142a.c b/gcc/testsuite/gcc.target/i386/pr82142a.c
--- a/gcc/testsuite/gcc.target/i386/pr82142a.c
+++ b/gcc/testsuite/gcc.target/i386/pr82142a.c
@@ -1,5 +1,6 @@
 /* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -mno-avx -msse2 -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */
+/* { dg-options "-O2 -mno-avx -msse2" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.}  } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/pr82142b.c b/gcc/testsuite/gcc.target/i386/pr82142b.c
--- a/gcc/testsuite/gcc.target/i386/pr82142b.c
+++ b/gcc/testsuite/gcc.target/i386/pr82142b.c
@@ -1,5 +1,6 @@
 /* { dg-do compile { target ia32 } } */
-/* { dg-options "-O2 -mno-avx -msse2 -mno-stackrealign -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */
+/* { dg-options "-O2 -mno-avx -msse2 -mno-stackrealign" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target "*-*-*" } {^\t?\.}  } } */
 
diff --git a/gcc/testsuite/gcc.target/i386/pr92080-17.c b/gcc/testsuite/gcc.target/i386/pr92080-17.c
--- a/gcc/testsuite/gcc.target/i386/pr92080-17.c
+++ b/gcc/testsuite/gcc.target/i386/pr92080-17.c
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -march=x86-64-v3 -fasynchronous-unwind-tables -fdwarf2-cfi-asm" } */
+/* { dg-options "-O2 -march=x86-64-v3" } */
+/* { dg-add-options check_function_bodies } */
 /* Keep labels and directives ('.cfi_startproc', '.cfi_endproc').  */
 /* { dg-final { check-function-bodies "**" "" "" { target { ! ia32 } } {^\t?\.}  } } */
 
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -981,6 +981,18 @@ proc add_options_for_tls { flags } {
     return $flags
 }
 
+# Add to FLAGS all the target-specific flags needed to use check-function-bodies.
+
+proc add_options_for_check_function_bodies { flags } {
+    if { [istarget i?86-*-solaris2*] || [istarget x86_64-*-solaris2*] } {
+	# check-function-bodies relies on the .cfi_* directives, which are
+	# off on Solaris/x86 with as and ld.  Similarly it also expects
+	# the .LFB/.LFE labels, which aren't emitted for 32-bit.
+	return "-fdwarf2-cfi-asm -fasynchronous-unwind-tables $flags "
+    }
+    return $flags
+}
+
 # Return 1 if indirect jumps are supported, 0 otherwise.
 
 proc check_effective_target_indirect_jumps {} {

Reply via email to