public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/64735] New: std::future broken on armel
@ 2015-01-22 21:21 bastiaan at bjacques dot org
2015-01-23 10:05 ` [Bug libstdc++/64735] " redi at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: bastiaan at bjacques dot org @ 2015-01-22 21:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
Bug ID: 64735
Summary: std::future broken on armel
Product: gcc
Version: 4.9.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: bastiaan at bjacques dot org
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/armv5tel-unknown-linux-gnueabi/4.9.2/lto-wrapper
Target: armv5tel-unknown-linux-gnueabi
Configured with: /build/gcc/src/gcc-4.9-20141224/configure --prefix=/usr
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info
--with-bugurl=https://github.com/archlinuxarm/PKGBUILDs/issues
--enable-languages=c,c++,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--disable-libssp --enable-gnu-unique-object --enable-linker-build-id
--enable-cloog-backend=isl --enable-lto --enable-plugin
--enable-install-libiberty --with-linker-hash-style=gnu --disable-multilib
--disable-werror --enable-checking=release
--host=armv5tel-unknown-linux-gnueabi --build=armv5tel-unknown-linux-gnueabi
--with-arch=armv5te --with-float=soft
Thread model: posix
gcc version 4.9.2 20141224 (prerelease) (GCC)
Test case from https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=727621 :
#include <future>
int main()
{
std::future<bool> fb = std::async([]{ return false; });
return 0;
}
yields:
future.cc: In function ‘int main()’:
future.cc:5:27: error: variable ‘std::future<bool> fb’ has initializer but
incomplete type
std::future<bool> fb = std::async([]{ return false; });
^
future.cc:5:62: error: invalid use of incomplete type ‘class std::future<bool>’
std::future<bool> fb = std::async([]{ return false; });
^
In file included from future.cc:1:0:
/usr/include/c++/4.9.2/future:114:11: error: declaration of ‘class
std::future<bool>’
class future;
^
/usr/include/c++/4.9.2/future: At global scope:
/usr/include/c++/4.9.2/future:176:5: error: ‘std::future<typename
std::result_of<_Functor(_ArgTypes ...)>::type> std::async(_Fn&&, _Args&& ...)
[with _Fn = main()::<lambda()>; _Args = {}; typename
std::result_of<_Functor(_ArgTypes ...)>::type = bool]’, declared using local
type ‘main()::<lambda()>’, is used but never defined [-fpermissive]
async(_Fn&& __fn, _Args&&... __args);
^
>From gcc-bugs-return-474449-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jan 22 21:25:13 2015
Return-Path: <gcc-bugs-return-474449-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 4496 invoked by alias); 22 Jan 2015 21:25:13 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 4449 invoked by uid 55); 22 Jan 2015 21:25:06 -0000
From: "law at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/52076] bloated code for setting single bits in bitfields on m68k
Date: Thu, 22 Jan 2015 21:25:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: target
X-Bugzilla-Version: 4.7.0
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: law at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-52076-4-nLkiH37OAc@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-52076-4@http.gcc.gnu.org/bugzilla/>
References: <bug-52076-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-01/txt/msg02443.txt.bz2
Content-length: 1079
https://gcc.gnu.org/bugzilla/show_bug.cgi?idR076
--- Comment #2 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Thu Jan 22 21:24:28 2015
New Revision: 220015
URL: https://gcc.gnu.org/viewcvs?rev"0015&root=gcc&view=rev
Log:
PR target/52076
* config/m68k/m68k.md (xorsi3_internal): Twiddle constraints to
improve code density for small immediate to memory case.
(insv): Better handle bitfield assignments when the field is
being set to all ones.
* config/m68k/predicates.md (reg_or_pow2_m1_operand): New
operand predicate.
PR target/52076
* gcc.target/m68k/pr52076-1.c: New test.
* gcc.target/m68k/pr52076-2.c: New test.
Added:
trunk/gcc/config/m68k/.m68k.md.swp (with props)
trunk/gcc/testsuite/gcc.target/m68k/pr52076-1.c
trunk/gcc/testsuite/gcc.target/m68k/pr52076-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/m68k/m68k.md
trunk/gcc/config/m68k/predicates.md
trunk/gcc/testsuite/ChangeLog
Propchange: trunk/gcc/config/m68k/.m68k.md.swp
('svn:executable' added)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/64735] std::future broken on armel
2015-01-22 21:21 [Bug libstdc++/64735] New: std::future broken on armel bastiaan at bjacques dot org
2015-01-23 10:05 ` [Bug libstdc++/64735] " redi at gcc dot gnu.org
@ 2015-01-23 10:05 ` redi at gcc dot gnu.org
2015-01-23 10:25 ` [Bug c++/64735] " ramana at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2015-01-23 10:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
i.e. it's not broken, it's missing, and that's by design.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/64735] std::future broken on armel
2015-01-22 21:21 [Bug libstdc++/64735] New: std::future broken on armel bastiaan at bjacques dot org
@ 2015-01-23 10:05 ` redi at gcc dot gnu.org
2015-01-23 10:05 ` redi at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2015-01-23 10:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I think this is expected, the std:future type and std::async function are
declared unconditionally, but the definitions are guarded by:
#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) \
&& (ATOMIC_INT_LOCK_FREE > 1)
If your target doesn't meet those conditions then you don't get to use
std::future
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/64735] std::future broken on armel
2015-01-22 21:21 [Bug libstdc++/64735] New: std::future broken on armel bastiaan at bjacques dot org
2015-01-23 10:05 ` [Bug libstdc++/64735] " redi at gcc dot gnu.org
2015-01-23 10:05 ` redi at gcc dot gnu.org
@ 2015-01-23 10:25 ` ramana at gcc dot gnu.org
2015-01-23 12:33 ` bastiaan at bjacques dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: ramana at gcc dot gnu.org @ 2015-01-23 10:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|libstdc++ |c++
--- Comment #4 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #3)
> i.e. it's not broken, it's missing, and that's by design.
Right so if I parse that correctly, it boils down to implementation of atomics
with calls to kernel helper function vs the lack of it IIUC. Not really a
libstdc++ issue but more of an issue with the way in which atomics are
implemented on arch's that don't have the actual instruction support but are
implemented through kernel helper functions.
It appears as though this breaks quite a few packages on older versions of the
architecture so that's interesting.
Ramana
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/64735] std::future broken on armel
2015-01-22 21:21 [Bug libstdc++/64735] New: std::future broken on armel bastiaan at bjacques dot org
` (2 preceding siblings ...)
2015-01-23 10:25 ` [Bug c++/64735] " ramana at gcc dot gnu.org
@ 2015-01-23 12:33 ` bastiaan at bjacques dot org
2015-01-23 15:51 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bastiaan at bjacques dot org @ 2015-01-23 12:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
--- Comment #5 from Bastiaan Jacques <bastiaan at bjacques dot org> ---
(In reply to Jonathan Wakely from comment #3)
> i.e. it's not broken, it's missing, and that's by design.
So is it the intention of the GCC developers that program writers targeting
such platforms simply avoid these facilities and use std::thread/mutex instead?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/64735] std::future broken on armel
2015-01-22 21:21 [Bug libstdc++/64735] New: std::future broken on armel bastiaan at bjacques dot org
` (3 preceding siblings ...)
2015-01-23 12:33 ` bastiaan at bjacques dot org
@ 2015-01-23 15:51 ` redi at gcc dot gnu.org
2021-04-15 16:10 ` [Bug libstdc++/64735] " cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2015-01-23 15:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Bastiaan Jacques from comment #5)
> (In reply to Jonathan Wakely from comment #3)
> > i.e. it's not broken, it's missing, and that's by design.
>
> So is it the intention of the GCC developers that program writers targeting
> such platforms simply avoid these facilities and use std::thread/mutex
> instead?
Or they could contribute an implementation that works for their target.
The intention of the developers is that the feature should work correctly, and
if that isn't possible with the current implementation for some target, then
the feature should be disabled on that target. And that's what you see.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/64735] std::future broken on armel
2015-01-22 21:21 [Bug libstdc++/64735] New: std::future broken on armel bastiaan at bjacques dot org
` (4 preceding siblings ...)
2015-01-23 15:51 ` redi at gcc dot gnu.org
@ 2021-04-15 16:10 ` cvs-commit at gcc dot gnu.org
2021-07-22 17:05 ` cvs-commit at gcc dot gnu.org
2021-07-22 21:29 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-15 16:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:
https://gcc.gnu.org/g:6c0c7fc6236470a533675cd3cd1ebb1cc3dd112c
commit r11-8198-g6c0c7fc6236470a533675cd3cd1ebb1cc3dd112c
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Apr 14 20:48:54 2021 +0100
libstdc++: Move atomic functions to libsupc++ [PR 96657]
The changes for PR libstdc++/64735 mean that libsupc++ function might
now depend on the __exchange_and_add and __atomic_add functions defined
in config/cpu/*/atomicity.h which is not compiled into libsupc++. This
causes a link failure for some targets when trying to use libsupc++
without the rest of libstdc++.
This patch simply moves the definitions of those functions into
libsupc++ so that they are available there.
libstdc++-v3/ChangeLog:
PR libstdc++/96657
* libsupc++/Makefile.am: Add atomicity.cc here.
* src/c++98/Makefile.am: Remove it from here.
* libsupc++/Makefile.in: Regenerate.
* src/c++98/Makefile.in: Regenerate.
* testsuite/18_support/exception_ptr/96657.cc: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/64735] std::future broken on armel
2015-01-22 21:21 [Bug libstdc++/64735] New: std::future broken on armel bastiaan at bjacques dot org
` (5 preceding siblings ...)
2021-04-15 16:10 ` [Bug libstdc++/64735] " cvs-commit at gcc dot gnu.org
@ 2021-07-22 17:05 ` cvs-commit at gcc dot gnu.org
2021-07-22 21:29 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-22 17:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:f2074277aa3ce0848429e34d6149ba26ff3b708e
commit r10-9997-gf2074277aa3ce0848429e34d6149ba26ff3b708e
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Apr 14 20:48:54 2021 +0100
libstdc++: Move atomic functions to libsupc++ [PR 96657]
The changes for PR libstdc++/64735 mean that libsupc++ function might
now depend on the __exchange_and_add and __atomic_add functions defined
in config/cpu/*/atomicity.h which is not compiled into libsupc++. This
causes a link failure for some targets when trying to use libsupc++
without the rest of libstdc++.
This patch simply moves the definitions of those functions into
libsupc++ so that they are available there.
libstdc++-v3/ChangeLog:
PR libstdc++/96657
* libsupc++/Makefile.am: Add atomicity.cc here.
* src/c++98/Makefile.am: Remove it from here.
* libsupc++/Makefile.in: Regenerate.
* src/c++98/Makefile.in: Regenerate.
* testsuite/18_support/exception_ptr/96657.cc: New test.
(cherry picked from commit 6c0c7fc6236470a533675cd3cd1ebb1cc3dd112c)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug libstdc++/64735] std::future broken on armel
2015-01-22 21:21 [Bug libstdc++/64735] New: std::future broken on armel bastiaan at bjacques dot org
` (6 preceding siblings ...)
2021-07-22 17:05 ` cvs-commit at gcc dot gnu.org
@ 2021-07-22 21:29 ` cvs-commit at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-22 21:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64735
--- Comment #16 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:ba5e10a8c84f56bb2838adb6d1cc9b74741ac4f1
commit r9-9640-gba5e10a8c84f56bb2838adb6d1cc9b74741ac4f1
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Apr 14 20:48:54 2021 +0100
libstdc++: Move atomic functions to libsupc++ [PR 96657]
The changes for PR libstdc++/64735 mean that libsupc++ function might
now depend on the __exchange_and_add and __atomic_add functions defined
in config/cpu/*/atomicity.h which is not compiled into libsupc++. This
causes a link failure for some targets when trying to use libsupc++
without the rest of libstdc++.
This patch simply moves the definitions of those functions into
libsupc++ so that they are available there.
libstdc++-v3/ChangeLog:
PR libstdc++/96657
* libsupc++/Makefile.am: Add atomicity.cc here.
* src/c++98/Makefile.am: Remove it from here.
* libsupc++/Makefile.in: Regenerate.
* src/c++98/Makefile.in: Regenerate.
* testsuite/18_support/exception_ptr/96657.cc: New test.
(cherry picked from commit 6c0c7fc6236470a533675cd3cd1ebb1cc3dd112c)
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-07-22 21:29 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-22 21:21 [Bug libstdc++/64735] New: std::future broken on armel bastiaan at bjacques dot org
2015-01-23 10:05 ` [Bug libstdc++/64735] " redi at gcc dot gnu.org
2015-01-23 10:05 ` redi at gcc dot gnu.org
2015-01-23 10:25 ` [Bug c++/64735] " ramana at gcc dot gnu.org
2015-01-23 12:33 ` bastiaan at bjacques dot org
2015-01-23 15:51 ` redi at gcc dot gnu.org
2021-04-15 16:10 ` [Bug libstdc++/64735] " cvs-commit at gcc dot gnu.org
2021-07-22 17:05 ` cvs-commit at gcc dot gnu.org
2021-07-22 21:29 ` cvs-commit 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).