public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/108734] New: powerpc: False Detection of __atomic_*_8  Builtins
@ 2023-02-09  3:53 rmclure at linux dot ibm.com
  2023-02-09  3:56 ` [Bug c/108734] " pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: rmclure at linux dot ibm.com @ 2023-02-09  3:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108734
           Summary: powerpc: False Detection of __atomic_*_8  Builtins
           Product: gcc
           Version: 11.3.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rmclure at linux dot ibm.com
                CC: bergner at gcc dot gnu.org
  Target Milestone: ---

Created attachment 54440
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54440&action=edit
False positive with __has_builtin

Using built-in specs.
COLLECT_GCC=powerpc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/powerpc-linux-gnu/12/lto-wrapper
Target: powerpc-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 12.2.0-3ubuntu1'
--with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++ --prefix=/usr
--with-gcc-major-version-only --program-suffix=-12 --enable-shared
--enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/
--enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm
--disable-libquadmath --disable-libquadmath-support --enable-plugin
--with-system-zlib --enable-libphobos-checking=release
--without-target-system-zlib --with-libphobos-druntime-only=yes
--enable-secureplt --disable-softfloat --with-cpu=default32 --disable-softfloat
--enable-targets=powerpc-linux,powerpc64-linux --enable-multiarch
--disable-werror --with-long-double-128 --enable-multilib
--enable-checking=release --build=powerpc64le-linux-gnu
--host=powerpc64le-linux-gnu --target=powerpc-linux-gnu
--program-prefix=powerpc-linux-gnu- --includedir=/usr/powerpc-linux-gnu/include
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (Ubuntu 12.2.0-3ubuntu1)


The attached program should compile on 32-bit systems, built with
`powerpc-linux-gnu-gcc fail.c -o fail`.

Instead, __has_builtin(__atomic_store_8) evaluates to true, and we get a linker
error.

```
/usr/lib/gcc-cross/powerpc-linux-gnu/11/../../../../powerpc-linux-gnu/bin/ld:
/tmp/ccJ9g2pV.o: in function `main':
fail.c:(.text+0x24): undefined reference to `__atomic_store_8'
collect2: error: ld returned 1 exit status
```

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

end of thread, other threads:[~2023-02-10  9:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-09  3:53 [Bug c/108734] New: powerpc: False Detection of __atomic_*_8 Builtins rmclure at linux dot ibm.com
2023-02-09  3:56 ` [Bug c/108734] " pinskia at gcc dot gnu.org
2023-02-09  3:59 ` rmclure at linux dot ibm.com
2023-02-09  7:56 ` pinskia at gcc dot gnu.org
2023-02-09  8:19 ` redi at gcc dot gnu.org
2023-02-09 17:56 ` dje at gcc dot gnu.org
2023-02-09 23:40 ` rmclure at linux dot ibm.com
2023-02-10  9:33 ` 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).