https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68740
--- Comment #1 from John David Anglin <danglin at gcc dot gnu.org> --- We need to add the following to test: -bash-4.3$ svn diff testsuite/experimental/type_erased_allocator/1.cc Index: testsuite/experimental/type_erased_allocator/1.cc =================================================================== --- testsuite/experimental/type_erased_allocator/1.cc (revision 232999) +++ testsuite/experimental/type_erased_allocator/1.cc (working copy) @@ -1,4 +1,5 @@ // { dg-options "-std=gnu++14" } +// { dg-additional-options "-latomic" { target libatomic_available } } // Copyright (C) 2015-2016 Free Software Foundation, Inc. // However, the libatomic_available check doesn't work: spawn /test/gnu/gcc/objdir/./gcc/xg++ -shared-libgcc -B/test/gnu/gcc/objdir/./gc c -nostdinc++ -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/src -L/t est/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/src/.libs -L/test/gnu/gcc/ objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/libsupc++/.libs -B/opt/gnu/gcc/gcc-6.0 /hppa2.0w-hp-hpux11.11/bin/ -B/opt/gnu/gcc/gcc-6.0/hppa2.0w-hp-hpux11.11/lib/ -i system /opt/gnu/gcc/gcc-6.0/hppa2.0w-hp-hpux11.11/include -isystem /opt/gnu/gcc/ gcc-6.0/hppa2.0w-hp-hpux11.11/sys-include -B/test/gnu/gcc/objdir/hppa2.0w-hp-hpu x11.11/./libstdc++-v3/src/.libs -D_GLIBCXX_ASSERT -fmessage-length=0 -g -O2 -DLO CALEDIR="." -nostdinc++ -I/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v 3/include/hppa2.0w-hp-hpux11.11 -I/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/lib stdc++-v3/include -I/test/gnu/gcc/gcc/libstdc++-v3/libsupc++ -I/test/gnu/gcc/gcc /libstdc++-v3/include/backward -I/test/gnu/gcc/gcc/libstdc++-v3/testsuite/util l ibatomic_available27267.c -latomic -fno-diagnostics-show-caret -fdiagnostics-col or=never ./libtestc++.a -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v 3/src/filesystem/.libs -lm -o libatomic_available27267.exe /usr/ccs/bin/ld: Can't find library: "atomic" collect2: error: ld returned 1 exit status compiler exited with status 1 output is: /usr/ccs/bin/ld: Can't find library: "atomic" collect2: error: ld returned 1 exit status On hpux, we need -L and -B options for directory /test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libatomic/.libs.