This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/72813] New: [6/7 Regression] atomic header cannot be compiled into translation unit with -fkeep-inline-functions


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

            Bug ID: 72813
           Summary: [6/7 Regression] atomic header cannot be compiled into
                    translation unit with -fkeep-inline-functions
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

$ echo '#include <atomic>' > foo.h

$ gcc-6 -std=c++11 -fdump-translation-unit -fkeep-inline-functions -c -x
c++-header -fpermissive -w -fPIC foo.h
In file included from /usr/include/c++/6/atomic:41:0,
                 from foo.h:1:
/usr/include/c++/6/bits/atomic_base.h: In member function
'std::atomic<bool>::operator bool() const':
/usr/include/c++/6/bits/atomic_base.h:390:7: error: inlining failed in call to
always_inline 'std::__atomic_base<_IntTp>::__int_type
std::__atomic_base<_IntTp>::load(std::memory_order) const noexcept [with _ITp =
bool; std::__atomic_base<_IntTp>::__int_type = bool; std::memory_order =
std::memory_order]': function body not available
       load(memory_order __m = memory_order_seq_cst) const noexcept
       ^~~~
In file included from foo.h:1:0:
/usr/include/c++/6/atomic:81:27: note: called from here
     { return _M_base.load(); }
                           ^

$ gcc-5 -std=c++11 -fdump-translation-unit -fkeep-inline-functions -c -x
c++-header -fpermissive -w -fPIC foo.h

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]