2017-11-10 Uros Bizjak <ubiz...@gmail.com> * gcc.target/i386/force-indirect-call-1.c: Merge scan strings. * gcc.target/i386/force-indirect-call-2.c: Ditto. Require fpic effective target. * gcc.target/i386/force-indirect-call-3.c: Ditto. Require lp64 effective target.
Tested on x86_64-linux-gnu {,-m32} and committed to mainline SVN. Uros.
Index: gcc.target/i386/force-indirect-call-1.c =================================================================== --- gcc.target/i386/force-indirect-call-1.c (revision 254632) +++ gcc.target/i386/force-indirect-call-1.c (working copy) @@ -1,7 +1,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -mforce-indirect-call" } */ -/* { dg-final { scan-assembler-times "call\[ \\t\]+\\*%" 2 } } */ -/* { dg-final { scan-assembler-times "jmp\[ \\t\]+\\*%" 1 } } */ +/* { dg-final { scan-assembler-times "(?:call|jmp)\[ \\t\]+\\*%" 3 } } */ + int x; int y; Index: gcc.target/i386/force-indirect-call-2.c =================================================================== --- gcc.target/i386/force-indirect-call-2.c (revision 254632) +++ gcc.target/i386/force-indirect-call-2.c (working copy) @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -mforce-indirect-call -fPIC" } */ -/* { dg-final { scan-assembler-times "call\[ \\t\]+\\*%" 2 } } */ -/* { dg-final { scan-assembler-times "jmp\[ \\t\]+\\*%" 1 } } */ +/* { dg-require-effective-target fpic } */ +/* { dg-final { scan-assembler-times "(?:call|jmp)\[ \\t\]+\\*%" 3 } } */ + #include "force-indirect-call-1.c" Index: gcc.target/i386/force-indirect-call-3.c =================================================================== --- gcc.target/i386/force-indirect-call-3.c (revision 254632) +++ gcc.target/i386/force-indirect-call-3.c (working copy) @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -mforce-indirect-call -mcmodel=medium" } */ -/* { dg-final { scan-assembler-times "call\[ \\t\]+\\*%" 2 } } */ -/* { dg-final { scan-assembler-times "jmp\[ \\t\]+\\*%" 1 } } */ +/* { dg-require-effective-target lp64 } */ +/* { dg-final { scan-assembler-times "(?:call|jmp)\[ \\t\]+\\*%" 3 } } */ + #include "force-indirect-call-1.c"