From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2796C384B0C1; Tue, 21 Apr 2020 07:13:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2796C384B0C1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587453236; bh=hcBIJBc7TiqcF0ECiVmqj45Hd2tcAppKoAiiTdIsLig=; h=From:To:Subject:Date:From; b=JZitDkPUTlKeQweLKbJkJj97Eq7+pkOlVJrE6TOEFQmA3IsqYfF2wFZyAHquiYV+x edru/6z4JjX/AIvhyc1lvXHIHqBKxW2SpI8TFibLrhNtxcwl0kkSIg4NSgGHrewz9G AkmqL0ozHnFWXMzvMu0FBDqfEmN3geOa7nMe4seU= From: "okannen at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/94679] New: link time error: undefined reference to std::projected<...>::operator *() const Date: Tue, 21 Apr 2020 07:13:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: okannen at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone cf_gcchost cf_gcctarget cf_gccbuild Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2020 07:13:56 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94679 Bug ID: 94679 Summary: link time error: undefined reference to std::projected<...>::operator *() const Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: okannen at gmail dot com Target Milestone: --- Host: x86_64-pc-linux-gnu Target: x86_64 Build: x86_64-pc-linux-gnu When compiling with -coverage -fkeep-inline-functions, it is possible to ge= t a linkage error: 'undefined reference to `std::projected::operator*() const' gcc --version: gcc (GCC) 10.0.1 20200416 (experimental) Copyright (C) 2020 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. gcc -v: Using built-in specs. COLLECT_GCC=3Dgcc COLLECT_LTO_WRAPPER=3D/home/olivier/usr/libexec/gcc/x86_64-pc-linux-gnu/10/= lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc/configure --enable-libsanitizer --prefix=3D/home/olivier/usr/ --with-gcc-major-version-only --disable-boots= trap --enable-language=3Dc,c++,lto Thread model: posix Supported LTO compression algorithms: zlib gcc version 10.0.1 20200416 (experimental) (GCC) The following code compiled with: 'c++ -coverage -fkeep-inline-functions -std=3Dc++20 file.cpp' #include int main(){ int a[]=3D{1,2,3}; std::ranges::next_permutation(a); return 0; } This produce error message: /usr/bin/ld: /tmp/ccF8BXBM.o: in function `decltype(auto) std::ranges::__cust_imove::_IMove::operator()&>(std::projected&) const': test.cpp:(.text._ZNKSt6ranges12__cust_imove6_IMoveclIRSt9projectedIPiSt8ide= ntityEEEDcOT_[_ZNKSt6ranges12__cust_imove6_IMoveclIRSt9projectedIPiSt8ident= ityEEEDcOT_]+0x2a): undefined reference to `std::projected::operator*() co= nst' /usr/bin/ld: /tmp/ccF8BXBM.o: in function `decltype(auto) std::ranges::__cust_imove::_IMove::operator() const&>(std::projected const&) const': test.cpp:(.text._ZNKSt6ranges12__cust_imove6_IMoveclIRKSt9projectedIPiSt8id= entityEEEDcOT_[_ZNKSt6ranges12__cust_imove6_IMoveclIRKSt9projectedIPiSt8ide= ntityEEEDcOT_]+0x2a): undefined reference to `std::projected::operator*() co= nst' collect2: error: ld returned 1 exit status=