public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "sandra at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/64203] New: shared_mutex compile errors on bare-metal targets Date: Fri, 05 Dec 2014 21:00:00 -0000 [thread overview] Message-ID: <bug-64203-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64203 Bug ID: 64203 Summary: shared_mutex compile errors on bare-metal targets Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: sandra at codesourcery dot com CC: 3dw4rd at verizon dot net After merging GCC 4.9.2 onto our local branch, I saw that the new libstdc++ testcase experimental/feat-cxx14.cc is failing on bare-metal targets (arm-none-eabi, mips-sde-elf, powerpc-eabi, possibly others). Here's an excerpt from the test logs: Executing on host: mips-sde-elf-g++ -fdiagnostics-color=never -D_GLIBCXX_ASSERT -fmessage-length=0 -g -O2 -DLOCALEDIR="." -I/scratch/sandra/mips-elf-trunk/src/gcc-trunk-4.9/libstdc++-v3/testsuite/util /scratch/sandra/mips-elf-trunk/src/gcc-trunk-4.9/libstdc++-v3/testsuite/experimental/feat-cxx14.cc -std=gnu++14 -S -mips16 -o feat-cxx14.s (timeout = 600) /scratch/sandra/mips-elf-trunk/src/gcc-trunk-4.9/libstdc++-v3/testsuite/experimental/feat-cxx14.cc:110:4: error: #error "__cpp_lib_shared_timed_mutex" # error "__cpp_lib_shared_timed_mutex" ^ In file included from /scratch/sandra/mips-elf-trunk/src/gcc-trunk-4.9/libstdc++-v3/testsuite/experimental/feat-cxx14.cc:13:0: /scratch/sandra/mips-elf-trunk/install/opt/codesourcery/mips-sde-elf/include/c++/4.9.2/shared_mutex:274:36: error: 'defer_lock_t' has not been declared shared_lock(mutex_type& __m, defer_lock_t) noexcept ^ /scratch/sandra/mips-elf-trunk/install/opt/codesourcery/mips-sde-elf/include/c++/4.9.2/shared_mutex:277:36: error: 'try_to_lock_t' has not been declared shared_lock(mutex_type& __m, try_to_lock_t) ^ /scratch/sandra/mips-elf-trunk/install/opt/codesourcery/mips-sde-elf/include/c++/4.9.2/shared_mutex:277:7: error: 'std::shared_lock<_Mutex>::shared_lock(std::shared_lock<_Mutex>::mutex_type&, int)' cannot be overloaded shared_lock(mutex_type& __m, try_to_lock_t) ^ /scratch/sandra/mips-elf-trunk/install/opt/codesourcery/mips-sde-elf/include/c++/4.9.2/shared_mutex:274:7: error: with 'std::shared_lock<_Mutex>::shared_lock(std::shared_lock<_Mutex>::mutex_type&, int)' shared_lock(mutex_type& __m, defer_lock_t) noexcept ^ /scratch/sandra/mips-elf-trunk/install/opt/codesourcery/mips-sde-elf/include/c++/4.9.2/shared_mutex:280:36: error: 'adopt_lock_t' has not been declared shared_lock(mutex_type& __m, adopt_lock_t) ^ /scratch/sandra/mips-elf-trunk/install/opt/codesourcery/mips-sde-elf/include/c++/4.9.2/shared_mutex:280:7: error: 'std::shared_lock<_Mutex>::shared_lock(std::shared_lock<_Mutex>::mutex_type&, int)' cannot be overloaded shared_lock(mutex_type& __m, adopt_lock_t) ^ /scratch/sandra/mips-elf-trunk/install/opt/codesourcery/mips-sde-elf/include/c++/4.9.2/shared_mutex:274:7: error: with 'std::shared_lock<_Mutex>::shared_lock(std::shared_lock<_Mutex>::mutex_type&, int)' shared_lock(mutex_type& __m, defer_lock_t) noexcept ^ /scratch/sandra/mips-elf-trunk/install/opt/codesourcery/mips-sde-elf/include/c++/4.9.2/shared_mutex: In member function 'void std::shared_lock<_Mutex>::unlock()': /scratch/sandra/mips-elf-trunk/install/opt/codesourcery/mips-sde-elf/include/c++/4.9.2/shared_mutex:347:29: error: 'errc' was not declared in this scope __throw_system_error(int(errc::resource_deadlock_would_occur)); ^ /scratch/sandra/mips-elf-trunk/install/opt/codesourcery/mips-sde-elf/include/c++/4.9.2/shared_mutex: In member function 'void std::shared_lock<_Mutex>::_M_lockable() const': /scratch/sandra/mips-elf-trunk/install/opt/codesourcery/mips-sde-elf/include/c++/4.9.2/shared_mutex:381:29: error: 'errc' was not declared in this scope __throw_system_error(int(errc::operation_not_permitted)); ^ /scratch/sandra/mips-elf-trunk/install/opt/codesourcery/mips-sde-elf/include/c++/4.9.2/shared_mutex:383:29: error: 'errc' was not declared in this scope __throw_system_error(int(errc::resource_deadlock_would_occur)); ^ compiler exited with status 1 I am guessing this part of <shared_mutex> is to blame: #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) # include <mutex> # include <condition_variable> #endif Because of the guards, I think <mutex> is not being included and nothing else is providing declarations of the missing identifiers. I don't know my way around this code or the C++ library specification at all, though.
next reply other threads:[~2014-12-05 21:00 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-12-05 21:00 sandra at codesourcery dot com [this message] 2014-12-05 23:55 ` [Bug libstdc++/64203] " redi at gcc dot gnu.org 2014-12-06 2:13 ` sandra at codesourcery dot com 2014-12-06 16:49 ` redi at gcc dot gnu.org 2014-12-06 19:38 ` sandra at codesourcery dot com 2014-12-09 11:04 ` redi at gcc dot gnu.org 2014-12-09 11:55 ` redi at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-64203-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).