public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/65913] New: Linking failure without -latomic
@ 2015-04-28 10:01 yan12125 at gmail dot com
  2015-04-28 13:15 ` [Bug libstdc++/65913] " redi at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: yan12125 at gmail dot com @ 2015-04-28 10:01 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65913
           Summary: Linking failure without -latomic
           Product: gcc
           Version: 5.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: yan12125 at gmail dot com
  Target Milestone: ---

#include <atomic>
#include <iostream>

struct Simple1 { int i; };

int main()
{
    std::atomic<Simple1> s1;
    std::cout << std::boolalpha << s1.is_lock_free() << '\n';
    return 0;
}

On GCC 5.1.0, the following program can't be compiled without -latomic:

g++ -v test.cpp -std=c++11
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/gcc-multilib/src/gcc-5.1.0/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --with-isl --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--disable-libssp --enable-gnu-unique-object --enable-linker-build-id
--enable-lto --enable-plugin --enable-install-libiberty
--with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib
--disable-werror --enable-checking=release --with-default-libstdcxx-abi=c++98
Thread model: posix
gcc version 5.1.0 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-std=c++11' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
 /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/cc1plus -quiet -v -D_GNU_SOURCE
test.cpp -quiet -dumpbase test.cpp -mtune=generic -march=x86-64 -auxbase test
-std=c++11 -version -o /tmp/ccrpKTDe.s
GNU C++11 (GCC) version 5.1.0 (x86_64-unknown-linux-gnu)
        compiled by GNU C version 5.1.0, GMP version 6.0.0, MPFR version
3.1.2-p11, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/../../../../include/c++/5.1.0

/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/../../../../include/c++/5.1.0/x86_64-unknown-linux-gnu

/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/../../../../include/c++/5.1.0/backward
 /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include
 /usr/local/include
 /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include-fixed
 /usr/include
End of search list.
GNU C++11 (GCC) version 5.1.0 (x86_64-unknown-linux-gnu)
        compiled by GNU C version 5.1.0, GMP version 6.0.0, MPFR version
3.1.2-p11, MPC version 1.0.3
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 13af7a32108dcf1445ef29e0b81ed4a1
COLLECT_GCC_OPTIONS='-v' '-std=c++11' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
 as -v --64 -o /tmp/ccb54wZN.o /tmp/ccrpKTDe.s
GNU assembler version 2.25.0 (x86_64-unknown-linux-gnu) using BFD version (GNU
Binutils) 2.25.0
COMPILER_PATH=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/:/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/:/usr/lib/gcc/x86_64-unknown-linux-gnu/:/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/:/usr/lib/gcc/x86_64-unknown-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/:/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/../../../../lib/:/lib/../lib/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-std=c++11' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
 /usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/collect2 -plugin
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/liblto_plugin.so
-plugin-opt=/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccoH7Vln.res -plugin-opt=-pass-through=-lgcc_s
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id
--eh-frame-hdr --hash-style=gnu -m elf_x86_64 -dynamic-linker
/lib64/ld-linux-x86-64.so.2
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/../../../../lib/crt1.o
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/../../../../lib/crti.o
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/crtbegin.o
-L/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0
-L/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/../../../../lib -L/lib/../lib
-L/usr/lib/../lib -L/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/../../..
/tmp/ccb54wZN.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/crtend.o
/usr/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/../../../../lib/crtn.o
/tmp/ccb54wZN.o: In function `std::atomic<Simple1>::is_lock_free() const':
test.cpp:(.text._ZNKSt6atomicI7Simple1E12is_lock_freeEv[_ZNKSt6atomicI7Simple1E12is_lock_freeEv]+0x21):
undefined reference to `__atomic_is_lock_free'
collect2: error: ld returned 1 exit status

Whlie on GCC 4.9.2 of another machine, the program compiles without -latomic:

$ g++ -v test.cpp -std=c++11
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.9.2-10'
--with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.9 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-vtable-verify
--enable-plugin --with-system-zlib --disable-browser-plugin
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --with-arch-32=i586 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.9.2 (Debian 4.9.2-10) 
COLLECT_GCC_OPTIONS='-v' '-std=c++11' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/4.9/cc1plus -quiet -v -imultiarch
x86_64-linux-gnu -D_GNU_SOURCE test.cpp -quiet -dumpbase test.cpp
-mtune=generic -march=x86-64 -auxbase test -std=c++11 -version -o
/tmp/ccHcMiXf.s
GNU C++ (Debian 4.9.2-10) version 4.9.2 (x86_64-linux-gnu)
        compiled by GNU C version 4.9.2, GMP version 6.0.0, MPFR version
3.1.2-p3, MPC version 1.0.2
warning: MPFR header version 3.1.2-p3 differs from library version 3.1.2-p11.
warning: MPC header version 1.0.2 differs from library version 1.0.3.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/4.9"
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../x86_64-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/4.9
 /usr/include/x86_64-linux-gnu/c++/4.9
 /usr/include/c++/4.9/backward
 /usr/lib/gcc/x86_64-linux-gnu/4.9/include
 /usr/local/include
 /usr/lib/gcc/x86_64-linux-gnu/4.9/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
GNU C++ (Debian 4.9.2-10) version 4.9.2 (x86_64-linux-gnu)
        compiled by GNU C version 4.9.2, GMP version 6.0.0, MPFR version
3.1.2-p3, MPC version 1.0.2
warning: MPFR header version 3.1.2-p3 differs from library version 3.1.2-p11.
warning: MPC header version 1.0.2 differs from library version 1.0.3.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: ff85870e740eb08c48a56c2c170390f8
COLLECT_GCC_OPTIONS='-v' '-std=c++11' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
 as -v --64 -o /tmp/ccAoOSPq.o /tmp/ccHcMiXf.s
GNU assembler version 2.25 (x86_64-linux-gnu) using BFD version (GNU Binutils
for Debian) 2.25
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.9/:/usr/lib/gcc/x86_64-linux-gnu/4.9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.9/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/4.9/:/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-std=c++11' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
 /usr/lib/gcc/x86_64-linux-gnu/4.9/collect2 -plugin
/usr/lib/gcc/x86_64-linux-gnu/4.9/liblto_plugin.so
-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/4.9/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccvETIJB.res -plugin-opt=-pass-through=-lgcc_s
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/
--build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu -dynamic-linker
/lib64/ld-linux-x86-64.so.2
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crt1.o
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crti.o
/usr/lib/gcc/x86_64-linux-gnu/4.9/crtbegin.o
-L/usr/lib/gcc/x86_64-linux-gnu/4.9
-L/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu
-L/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../../lib -L/lib/x86_64-linux-gnu
-L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib
-L/usr/lib/gcc/x86_64-linux-gnu/4.9/../../.. /tmp/ccAoOSPq.o -lstdc++ -lm
-lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/4.9/crtend.o
/usr/lib/gcc/x86_64-linux-gnu/4.9/../../../x86_64-linux-gnu/crtn.o

Is it an incompatible change in libstdc++, or it's a bug? I can't find relevant
reports.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug libstdc++/65913] Linking failure without -latomic
  2015-04-28 10:01 [Bug libstdc++/65913] New: Linking failure without -latomic yan12125 at gmail dot com
@ 2015-04-28 13:15 ` redi at gcc dot gnu.org
  2015-04-28 16:01 ` rth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2015-04-28 13:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This is due to the changes for Bug 65033


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug libstdc++/65913] Linking failure without -latomic
  2015-04-28 10:01 [Bug libstdc++/65913] New: Linking failure without -latomic yan12125 at gmail dot com
  2015-04-28 13:15 ` [Bug libstdc++/65913] " redi at gcc dot gnu.org
@ 2015-04-28 16:01 ` rth at gcc dot gnu.org
  2015-04-28 17:26 ` yan12125 at gmail dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rth at gcc dot gnu.org @ 2015-04-28 16:01 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Henderson <rth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rth at gcc dot gnu.org

--- Comment #2 from Richard Henderson <rth at gcc dot gnu.org> ---
Created attachment 35416
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35416&action=edit
proposed patch

jwakely suggested on irc reverting the -alignment fake pointer
for the integral type template.  

Note that there are weird targets that have non-power-of-two
integral types:

config/avr/avr-modes.def:FRACTIONAL_INT_MODE (PSI, 24, 3);

Thankfully, avr doesn't also have atomic operations on this type,
so the second part of fold_builtin_atomic_always_lock_free would fail.

But I think we can also do better for non-integral types, so it's
probably better to attack this inside the compiler.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug libstdc++/65913] Linking failure without -latomic
  2015-04-28 10:01 [Bug libstdc++/65913] New: Linking failure without -latomic yan12125 at gmail dot com
  2015-04-28 13:15 ` [Bug libstdc++/65913] " redi at gcc dot gnu.org
  2015-04-28 16:01 ` rth at gcc dot gnu.org
@ 2015-04-28 17:26 ` yan12125 at gmail dot com
  2015-05-20  1:52 ` hp at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: yan12125 at gmail dot com @ 2015-04-28 17:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from yan12125 at gmail dot com ---
Sorry, but I don't quite understand. Does that mean for all the future versions
(5.2, 6.0, etc.) -latomic flag is necessary if atomic<T>::is_lock_free() is
used in my program?


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug libstdc++/65913] Linking failure without -latomic
  2015-04-28 10:01 [Bug libstdc++/65913] New: Linking failure without -latomic yan12125 at gmail dot com
                   ` (2 preceding siblings ...)
  2015-04-28 17:26 ` yan12125 at gmail dot com
@ 2015-05-20  1:52 ` hp at gcc dot gnu.org
  2015-07-13 12:20 ` redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: hp at gcc dot gnu.org @ 2015-05-20  1:52 UTC (permalink / raw)
  To: gcc-bugs

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

Hans-Peter Nilsson <hp at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hp at gcc dot gnu.org

--- Comment #4 from Hans-Peter Nilsson <hp at gcc dot gnu.org> ---
(In reply to yan12125 from comment #3)
> Sorry, but I don't quite understand. Does that mean for all the future
> versions (5.2, 6.0, etc.) -latomic flag is necessary if
> atomic<T>::is_lock_free() is used in my program?

>From my reading of the comments, the patch and current svn sources, the answer
is "no".  I'm guessing sooner or later the proposed patch will also be posted
to the gcc-patches@ list and promptly reviewed and committed.  Then hopefully
back-ported in time for 5.2.  But that's just a guess.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug libstdc++/65913] Linking failure without -latomic
  2015-04-28 10:01 [Bug libstdc++/65913] New: Linking failure without -latomic yan12125 at gmail dot com
                   ` (3 preceding siblings ...)
  2015-05-20  1:52 ` hp at gcc dot gnu.org
@ 2015-07-13 12:20 ` redi at gcc dot gnu.org
  2015-09-02 22:06 ` [Bug libstdc++/65913] [5/6 Regression] " redi at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2015-07-13 12:20 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-07-13
     Ever confirmed|0                           |1

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
We should get Richard's patch reviewed so it can be included in 5.3


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug libstdc++/65913] [5/6 Regression] Linking failure without -latomic
  2015-04-28 10:01 [Bug libstdc++/65913] New: Linking failure without -latomic yan12125 at gmail dot com
                   ` (4 preceding siblings ...)
  2015-07-13 12:20 ` redi at gcc dot gnu.org
@ 2015-09-02 22:06 ` redi at gcc dot gnu.org
  2015-09-17 15:46 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2015-09-02 22:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Richard's patch in comment 2 doesn't seem to help, the testcase with
std::atomic<Simple>::is_lock_free() still fails to link, as does the simplest
case, std::atomic<int>::is_lock_free()


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug libstdc++/65913] [5/6 Regression] Linking failure without -latomic
  2015-04-28 10:01 [Bug libstdc++/65913] New: Linking failure without -latomic yan12125 at gmail dot com
                   ` (5 preceding siblings ...)
  2015-09-02 22:06 ` [Bug libstdc++/65913] [5/6 Regression] " redi at gcc dot gnu.org
@ 2015-09-17 15:46 ` redi at gcc dot gnu.org
  2015-09-17 15:48 ` [Bug libstdc++/65913] [5 " redi at gcc dot gnu.org
  2015-10-08 16:55 ` redi at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2015-09-17 15:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Thu Sep 17 15:46:04 2015
New Revision: 227878

URL: https://gcc.gnu.org/viewcvs?rev=227878&root=gcc&view=rev
Log:
Handle alignment in __atomic_is_lock_free

gcc:

2015-09-17  Richard Henderson  <rth@redhat.com>

        PR libstdc++/65913
        * builtins.c (fold_builtin_atomic_always_lock_free): Handle fake
        pointers that encode the alignment of the object.

libstdc++-v3:

2015-09-17  Jonathan Wakely  <jwakely@redhat.com>

        PR libstdc++/65913
        * include/bits/atomic_base.h (__atomic_base<_TTp>::is_lock_free(),
        __atomic_base<_PTp*>::is_lock_free()): Call the built-in with the
        immediate pointer value, not a variable.
        * include/std/atomic (atomic<T>::is_lock_free()): Likewise.
        * testsuite/29_atomics/atomic/65913.cc: New.

Added:
    trunk/libstdc++-v3/testsuite/29_atomics/atomic/65913.cc
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/builtins.c
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/atomic_base.h
    trunk/libstdc++-v3/include/std/atomic


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug libstdc++/65913] [5 Regression] Linking failure without -latomic
  2015-04-28 10:01 [Bug libstdc++/65913] New: Linking failure without -latomic yan12125 at gmail dot com
                   ` (6 preceding siblings ...)
  2015-09-17 15:46 ` redi at gcc dot gnu.org
@ 2015-09-17 15:48 ` redi at gcc dot gnu.org
  2015-10-08 16:55 ` redi at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2015-09-17 15:48 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |5.3
            Summary|[5/6 Regression] Linking    |[5 Regression] Linking
                   |failure without -latomic    |failure without -latomic
      Known to fail|6.0                         |

--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed on trunk now.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug libstdc++/65913] [5 Regression] Linking failure without -latomic
  2015-04-28 10:01 [Bug libstdc++/65913] New: Linking failure without -latomic yan12125 at gmail dot com
                   ` (7 preceding siblings ...)
  2015-09-17 15:48 ` [Bug libstdc++/65913] [5 " redi at gcc dot gnu.org
@ 2015-10-08 16:55 ` redi at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: redi at gcc dot gnu.org @ 2015-10-08 16:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Author: redi
Date: Thu Oct  8 16:54:23 2015
New Revision: 228615

URL: https://gcc.gnu.org/viewcvs?rev=228615&root=gcc&view=rev
Log:
Backport PR libstdc++/65913 fix from mainline.

Handle alignment in __atomic_is_lock_free

gcc:

2015-09-17  Richard Henderson  <rth@redhat.com>

        PR libstdc++/65913
        * builtins.c (fold_builtin_atomic_always_lock_free): Handle fake
        pointers that encode the alignment of the object.

libstdc++-v3:

2015-09-17  Jonathan Wakely  <jwakely@redhat.com>

        PR libstdc++/65913
        * include/bits/atomic_base.h (__atomic_base<_TTp>::is_lock_free(),
        __atomic_base<_PTp*>::is_lock_free()): Call the built-in with the
        immediate pointer value, not a variable.
        * include/std/atomic (atomic<T>::is_lock_free()): Likewise.
        * testsuite/29_atomics/atomic/65913.cc: New.

Added:
    branches/gcc-5-branch/libstdc++-v3/testsuite/29_atomics/atomic/65913.cc
Modified:
    branches/gcc-5-branch/gcc/ChangeLog
    branches/gcc-5-branch/gcc/builtins.c
    branches/gcc-5-branch/libstdc++-v3/ChangeLog
    branches/gcc-5-branch/libstdc++-v3/include/bits/atomic_base.h
    branches/gcc-5-branch/libstdc++-v3/include/std/atomic


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-10-08 16:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-28 10:01 [Bug libstdc++/65913] New: Linking failure without -latomic yan12125 at gmail dot com
2015-04-28 13:15 ` [Bug libstdc++/65913] " redi at gcc dot gnu.org
2015-04-28 16:01 ` rth at gcc dot gnu.org
2015-04-28 17:26 ` yan12125 at gmail dot com
2015-05-20  1:52 ` hp at gcc dot gnu.org
2015-07-13 12:20 ` redi at gcc dot gnu.org
2015-09-02 22:06 ` [Bug libstdc++/65913] [5/6 Regression] " redi at gcc dot gnu.org
2015-09-17 15:46 ` redi at gcc dot gnu.org
2015-09-17 15:48 ` [Bug libstdc++/65913] [5 " redi at gcc dot gnu.org
2015-10-08 16:55 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).