This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[testsuite] Adding target nonpic to g++.dg/tm/pr47746.C


The same motivation as for:

"Since -fpic option is turned on by default in Android we have certain test
fails. The reason for that is that those tests rely on the
availability of functions, defined in them
and with -fpic compiler conservatively assumes that they are

In case of tm we have that in here:

4461|   /* If we aren't seeing the final version of the function we don't
4462|      know what it will contain at runtime.  */
4463|   if (cgraph_function_body_availability (node) < AVAIL_AVAILABLE)
4464+>    return true;

(gdb) p cgraph_function_body_availability (node)

and so we have a testfail for Android. The following patch adds nonpic:

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 943be90..e0a376e 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2013-04-11  Alexander Ivchenko  <>
+       * g++.dg/tm/pr47746.C: Add target nonpic.
 2013-04-11  Paolo Carlini  <>

        PR c++/54216
diff --git a/gcc/testsuite/g++.dg/tm/pr47746.C
index 7cd9e10..de85a1d 100644
--- a/gcc/testsuite/g++.dg/tm/pr47746.C
+++ b/gcc/testsuite/g++.dg/tm/pr47746.C
@@ -1,4 +1,4 @@
-// { dg-do compile }
+// { dg-do compile { target nonpic } }
 // { dg-options "-fgnu-tm" }

 class InputStream

is it OK for trunk and for 4.8?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]