Hi!

The switchconv pass attempts to avoid creating rodata arrays that need
runtime relocations, so for the tests we need non-pic.

Tested on x86_64-linux and i686-linux, committed as obvious to trunk.

2017-12-19  Jakub Jelinek  <ja...@redhat.com>

        PR testsuite/83454
        * gcc.dg/tree-ssa/cswtch-4.c: Require nonpic effective target.
        * gcc.dg/tree-ssa/cswtch-5.c: Likewise.

--- gcc/testsuite/gcc.dg/tree-ssa/cswtch-4.c.jj 2017-05-03 09:41:38.000000000 
+0200
+++ gcc/testsuite/gcc.dg/tree-ssa/cswtch-4.c    2017-12-19 09:48:40.437236968 
+0100
@@ -1,6 +1,6 @@
 /* PR tree-optimization/79472 */
 /* { dg-options "-O2 -fdump-tree-switchconv" } */
-/* { dg-do compile } */
+/* { dg-do compile { target nonpic } } */
 
 void
 frobulate (unsigned int v)
--- gcc/testsuite/gcc.dg/tree-ssa/cswtch-5.c.jj 2017-05-03 09:41:38.000000000 
+0200
+++ gcc/testsuite/gcc.dg/tree-ssa/cswtch-5.c    2017-12-19 09:48:50.915103154 
+0100
@@ -1,6 +1,6 @@
 /* PR tree-optimization/79472 */
 /* { dg-options "-O2 -fdump-tree-switchconv" } */
-/* { dg-do compile } */
+/* { dg-do compile { target nonpic } } */
 
 void
 foo (unsigned int v)

        Jakub

Reply via email to