On 7 May 2018 at 12:04, Tom de Vries <tom_devr...@mentor.com> wrote:
> On 04/21/2018 07:36 PM, Jakub Jelinek wrote:
>>
>>         * gcc.dg/nextafter-2.c: New test.
>
>
> Hi,
>
> FTR, I ran into a link error "unresolved symbol nexttowardf" using the
> standalone nvptx toolchain:
> ...
> PASS: gcc.dg/nextafter-1.c (test for excess errors)
> PASS: gcc.dg/nextafter-1.c execution test
> PASS: gcc.dg/nextafter-1.c scan-tree-dump-not optimized "nextafter"
> PASS: gcc.dg/nextafter-1.c scan-tree-dump-not optimized "nexttoward"
> FAIL: gcc.dg/nextafter-2.c (test for excess errors)
> UNRESOLVED: gcc.dg/nextafter-2.c compilation failed to produce executable
> PASS: gcc.dg/nextafter-3.c (test for excess errors)
> PASS: gcc.dg/nextafter-3.c execution test
> PASS: gcc.dg/nextafter-3.c scan-tree-dump-not optimized "nextafter"
> PASS: gcc.dg/nextafter-3.c scan-tree-dump-not optimized "nexttoward"
> PASS: gcc.dg/nextafter-4.c (test for excess errors)
> PASS: gcc.dg/nextafter-4.c execution test
> PASS: gcc.dg/nextafter-4.c scan-tree-dump-not optimized "nextafter"
> PASS: gcc.dg/nextafter-4.c scan-tree-dump-not optimized "nexttoward"
> ...
>
> This failure exposes a newlib bug. I've submitted a patch here (
> https://sourceware.org/ml/newlib/2018/msg00350.html ).
>

Hi

I noticed the same problem on arm and aarch64 bare-metal targets using newlib,
and I thought it was a matter of adding the c99_runtime effective target,
as done in the attached patch.

Even if newlib gets a fix for this, the effective target will still
claim c99_runtime
is not supported on such targets....

Thanks,

Christophe


> Thanks,
> - Tom
gcc/testsuite/ChangeLog:

2018-05-07  Christophe Lyon  <christophe.l...@linaro.org>

        * ChangeLog:
        * gcc.dg/nextafter-2.c: Add c99_runtime effective target and
        options.


Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog     (revision 259991)
+++ gcc/testsuite/ChangeLog     (working copy)
@@ -1,3 +1,8 @@
+2018-05-07  Christophe Lyon  <christophe.l...@linaro.org>
+
+       * gcc.dg/nextafter-2.c: Add c99_runtime effective target
+       and options.
+
 2018-05-06  Jakub Jelinek  <ja...@redhat.com>
 
        PR c++/85659
Index: gcc/testsuite/gcc.dg/nextafter-2.c
===================================================================
--- gcc/testsuite/gcc.dg/nextafter-2.c  (revision 259991)
+++ gcc/testsuite/gcc.dg/nextafter-2.c  (working copy)
@@ -1,6 +1,8 @@
 /* PR libstdc++/85466 */
 /* { dg-do run } */
+/* { dg-require-effective-target c99_runtime } */
 /* { dg-options "-O2 -fno-builtin" } */
 /* { dg-add-options ieee } */
+/* { dg-add-options c99_runtime } */
 
 #include "nextafter-1.c"

Reply via email to