From: Ulrich Weigand Date: Tue, 9 Aug 2011 13:29:29 +0000 (+0000) Subject: * gcc.dg/lto/20110201-1_0.c: Provide dummy sqrt. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b205f1f7fb889ecfff2664eae258a49b422ea35e;p=gcc.git * gcc.dg/lto/20110201-1_0.c: Provide dummy sqrt. From-SVN: r177593 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 46da1cba24f..c38bf568fe5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-08-09 Ulrich Weigand + + * gcc.dg/lto/20110201-1_0.c: Provide dummy sqrt. + 2011-08-09 Uros Bizjak * gcc.target/i386/sse-22a.c: New test. diff --git a/gcc/testsuite/gcc.dg/lto/20110201-1_0.c b/gcc/testsuite/gcc.dg/lto/20110201-1_0.c index f5d335572ee..a006649286d 100644 --- a/gcc/testsuite/gcc.dg/lto/20110201-1_0.c +++ b/gcc/testsuite/gcc.dg/lto/20110201-1_0.c @@ -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; }