OSDN Git Service

* gcc.dg/lto/20110201-1_0.c: Provide dummy sqrt.
authoruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Aug 2011 13:29:29 +0000 (13:29 +0000)
committeruweigand <uweigand@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Aug 2011 13:29:29 +0000 (13:29 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177593 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/lto/20110201-1_0.c

index 46da1cb..c38bf56 100644 (file)
@@ -1,3 +1,7 @@
+2011-08-09  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
+
+       * gcc.dg/lto/20110201-1_0.c: Provide dummy sqrt.
+
 2011-08-09  Uros Bizjak  <ubizjak@gmail.com>
 
        * gcc.target/i386/sse-22a.c: New test.
index f5d3355..a006649 100644 (file)
@@ -16,4 +16,14 @@ foo (_Complex double x, int b)
     x = 0;
   return cabs(x);
 }
+
+/* We provide a dummy sqrt to avoid link failures on targets that do not
+   expand sqrt inline.  Note that we do not link against libm in order
+   to ensure cabs is not satisfied by the library, but must be folded.  */
+double __attribute__((used))
+sqrt (double x)
+{
+  return x;
+}
+
 int main() { return 0; }