[Bug libstdc++/71081] New: experimental/memory_resource/1.cc run for targets without atomics

thopre01 at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu May 12 09:42:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71081

            Bug ID: 71081
           Summary: experimental/memory_resource/1.cc run for targets
                    without atomics
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: thopre01 at gcc dot gnu.org
                CC: redi at gcc dot gnu.org
  Target Milestone: ---
            Target: arm-none-eabi

Hi,

experimental/memory_resource/1.cc test in libstdc++ is run for target without
atomic support (such as ARMv6-M devices) and thus fail with the following
error:

ccAS6AZQ.o: In function
`std::__atomic_base<std::experimental::fundamentals_v2::pmr::memory_resource*>::exchange(std::experimental::fundamentals_v2::pmr::memory_resource*,
std::memory_order)':^M
libstdc++-v3/include/bits/atomic_base.h:730: undefined reference to
`__atomic_exchange_4'^M
collect2: error: ld returned 1 exit status^M
compiler exited with status 1
output is:
ccAS6AZQ.o: In function
`std::__atomic_base<std::experimental::fundamentals_v2::pmr::memory_resource*>::exchange(std::experimental::fundamentals_v2::pmr::memory_resource*,
std::memory_order)':^M
libstdc++-v3/include/bits/atomic_base.h:730: undefined reference to
`__atomic_exchange_4'^M
collect2: error: ld returned 1 exit status^M

FAIL: experimental/memory_resource/1.cc (test for excess errors)
Excess errors:
libstdc++-v3/include/bits/atomic_base.h:730: undefined reference to
`__atomic_exchange_4'
collect2: error: ld returned 1 exit status

UNRESOLVED: experimental/memory_resource/1.cc compilation failed to produce
executable

The error seems to come from the experimental/memory_resource file included in
that test.


I believe the test should have an additional dg-require-atomic-builtins dejagnu
directive.


More information about the Gcc-bugs mailing list