diff --git a/gcc/testsuite/c-c++-common/initpri1-lto.c b/gcc/testsuite/c-c++-common/initpri1-lto-static.c
similarity index 81%
copy from gcc/testsuite/c-c++-common/initpri1-lto.c
copy to gcc/testsuite/c-c++-common/initpri1-lto-static.c
index 433ef356c7e..6393f7ec99b 100644
--- a/gcc/testsuite/c-c++-common/initpri1-lto.c
+++ b/gcc/testsuite/c-c++-common/initpri1-lto-static.c
@@ -2,5 +2,6 @@
 /* { dg-require-effective-target lto } */
 /* { dg-options "-flto -O3" } */
 /* Via the magic string "-std=*++" indicate that testing one (the default) C++ standard is sufficient.  */
+/* { dg-additional-options -DCDTOR_LINKAGE=static } */
 
 #include "initpri1.c"
diff --git a/gcc/testsuite/c-c++-common/initpri1-lto.c b/gcc/testsuite/c-c++-common/initpri1-lto.c
index 433ef356c7e..7fb4bf1aa82 100644
--- a/gcc/testsuite/c-c++-common/initpri1-lto.c
+++ b/gcc/testsuite/c-c++-common/initpri1-lto.c
@@ -2,5 +2,6 @@
 /* { dg-require-effective-target lto } */
 /* { dg-options "-flto -O3" } */
 /* Via the magic string "-std=*++" indicate that testing one (the default) C++ standard is sufficient.  */
+/* { dg-additional-options -DCDTOR_LINKAGE= } */
 
 #include "initpri1.c"
diff --git a/gcc/testsuite/c-c++-common/initpri1-split.c b/gcc/testsuite/c-c++-common/initpri1-split-static.c
similarity index 86%
copy from gcc/testsuite/c-c++-common/initpri1-split.c
copy to gcc/testsuite/c-c++-common/initpri1-split-static.c
index 11755ee9f6a..02d8b162e19 100644
--- a/gcc/testsuite/c-c++-common/initpri1-split.c
+++ b/gcc/testsuite/c-c++-common/initpri1-split-static.c
@@ -1,3 +1,4 @@
 /* { dg-do run { target init_priority } } */
 /* Via the magic string "-std=*++" indicate that testing one (the default) C++ standard is sufficient.  */
 /* { dg-additional-sources {initpri1_part_c1.c initpri1_part_c2.c initpri1_part_c3.c initpri1_part_d1.c initpri1_part_d2.c initpri1_part_d3.c initpri1_part_cd4.c initpri1_part_main.c} } */
+/* { dg-additional-options -DCDTOR_LINKAGE=static } */
diff --git a/gcc/testsuite/c-c++-common/initpri1-split.c b/gcc/testsuite/c-c++-common/initpri1-split.c
index 11755ee9f6a..f1482c7e0c1 100644
--- a/gcc/testsuite/c-c++-common/initpri1-split.c
+++ b/gcc/testsuite/c-c++-common/initpri1-split.c
@@ -1,3 +1,4 @@
 /* { dg-do run { target init_priority } } */
 /* Via the magic string "-std=*++" indicate that testing one (the default) C++ standard is sufficient.  */
 /* { dg-additional-sources {initpri1_part_c1.c initpri1_part_c2.c initpri1_part_c3.c initpri1_part_d1.c initpri1_part_d2.c initpri1_part_d3.c initpri1_part_cd4.c initpri1_part_main.c} } */
+/* { dg-additional-options -DCDTOR_LINKAGE= } */
diff --git a/gcc/testsuite/c-c++-common/initpri1-lto.c b/gcc/testsuite/c-c++-common/initpri1-static.c
similarity index 70%
copy from gcc/testsuite/c-c++-common/initpri1-lto.c
copy to gcc/testsuite/c-c++-common/initpri1-static.c
index 433ef356c7e..ac101ff63cb 100644
--- a/gcc/testsuite/c-c++-common/initpri1-lto.c
+++ b/gcc/testsuite/c-c++-common/initpri1-static.c
@@ -1,6 +1,5 @@
 /* { dg-do run { target init_priority } } */
-/* { dg-require-effective-target lto } */
-/* { dg-options "-flto -O3" } */
 /* Via the magic string "-std=*++" indicate that testing one (the default) C++ standard is sufficient.  */
+/* { dg-additional-options -DCDTOR_LINKAGE=static } */
 
 #include "initpri1.c"
diff --git a/gcc/testsuite/c-c++-common/initpri1.c b/gcc/testsuite/c-c++-common/initpri1.c
index f50137a489b..73579cdd06b 100644
--- a/gcc/testsuite/c-c++-common/initpri1.c
+++ b/gcc/testsuite/c-c++-common/initpri1.c
@@ -1,5 +1,6 @@
 /* { dg-do run { target init_priority } } */
 /* Via the magic string "-std=*++" indicate that testing one (the default) C++ standard is sufficient.  */
+/* { dg-additional-options -DCDTOR_LINKAGE= } */
 
 #include "initpri1_part_c1.c"
 
diff --git a/gcc/testsuite/c-c++-common/initpri1_part_c1.c b/gcc/testsuite/c-c++-common/initpri1_part_c1.c
index 0f85a2e6cb1..da2f4e6c0bc 100644
--- a/gcc/testsuite/c-c++-common/initpri1_part_c1.c
+++ b/gcc/testsuite/c-c++-common/initpri1_part_c1.c
@@ -3,8 +3,10 @@
 
 extern int i;
 
+CDTOR_LINKAGE
 void c1() __attribute__((constructor (500)));
 
+CDTOR_LINKAGE
 void c1() {
   if (i++ != 0)
     __builtin_abort ();
diff --git a/gcc/testsuite/c-c++-common/initpri1_part_c2.c b/gcc/testsuite/c-c++-common/initpri1_part_c2.c
index e8c556aab17..926608dc0d9 100644
--- a/gcc/testsuite/c-c++-common/initpri1_part_c2.c
+++ b/gcc/testsuite/c-c++-common/initpri1_part_c2.c
@@ -3,8 +3,10 @@
 
 extern int i;
 
+CDTOR_LINKAGE
 void c2() __attribute__((constructor (700)));
 
+CDTOR_LINKAGE
 void c2() {
   if (i++ != 2)
     __builtin_abort ();
diff --git a/gcc/testsuite/c-c++-common/initpri1_part_c3.c b/gcc/testsuite/c-c++-common/initpri1_part_c3.c
index 70880882ce3..59941ce7428 100644
--- a/gcc/testsuite/c-c++-common/initpri1_part_c3.c
+++ b/gcc/testsuite/c-c++-common/initpri1_part_c3.c
@@ -3,8 +3,10 @@
 
 extern int i;
 
+CDTOR_LINKAGE
 void c3() __attribute__((constructor (600)));
 
+CDTOR_LINKAGE
 void c3() {
   if (i++ != 1)
     __builtin_abort ();
diff --git a/gcc/testsuite/c-c++-common/initpri1_part_cd4.c b/gcc/testsuite/c-c++-common/initpri1_part_cd4.c
index b67ff90d9fe..c209db3718e 100644
--- a/gcc/testsuite/c-c++-common/initpri1_part_cd4.c
+++ b/gcc/testsuite/c-c++-common/initpri1_part_cd4.c
@@ -4,8 +4,10 @@
 extern int i;
 extern int j;
 
+CDTOR_LINKAGE
 void cd4() __attribute__((constructor (800), destructor (800)));
 
+CDTOR_LINKAGE
 void cd4() {
   if (i != 3)
     __builtin_abort ();
diff --git a/gcc/testsuite/c-c++-common/initpri1_part_d1.c b/gcc/testsuite/c-c++-common/initpri1_part_d1.c
index 099df37e97c..817603e275b 100644
--- a/gcc/testsuite/c-c++-common/initpri1_part_d1.c
+++ b/gcc/testsuite/c-c++-common/initpri1_part_d1.c
@@ -3,8 +3,10 @@
 
 extern int i;
 
+CDTOR_LINKAGE
 void d1() __attribute__((destructor (500)));
 
+CDTOR_LINKAGE
 void d1() {
   if (--i != 0)
     __builtin_abort ();
diff --git a/gcc/testsuite/c-c++-common/initpri1_part_d2.c b/gcc/testsuite/c-c++-common/initpri1_part_d2.c
index 258cbbc495f..1dcb7367726 100644
--- a/gcc/testsuite/c-c++-common/initpri1_part_d2.c
+++ b/gcc/testsuite/c-c++-common/initpri1_part_d2.c
@@ -3,8 +3,10 @@
 
 extern int i;
 
+CDTOR_LINKAGE
 void d2() __attribute__((destructor (700)));
 
+CDTOR_LINKAGE
 void d2() {
   if (--i != 2)
     __builtin_abort ();
diff --git a/gcc/testsuite/c-c++-common/initpri1_part_d3.c b/gcc/testsuite/c-c++-common/initpri1_part_d3.c
index 1242d411b07..ae290fa4594 100644
--- a/gcc/testsuite/c-c++-common/initpri1_part_d3.c
+++ b/gcc/testsuite/c-c++-common/initpri1_part_d3.c
@@ -4,8 +4,10 @@
 extern int i;
 extern int j;
 
+CDTOR_LINKAGE
 void d3() __attribute__((destructor (600)));
 
+CDTOR_LINKAGE
 void d3() {
   if (j != 2)
     __builtin_abort ();
