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);
     ^

Reply via email to