From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D1567385B835; Sat, 18 Apr 2020 04:22:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D1567385B835 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1587183774; bh=l7rJvu6jZQeiMQfINu6BiRdv/FyAyzWdqs+6WCbV8dU=; h=From:To:Subject:Date:From; b=uDcrfiyY2numMisECQmBi70MzCvdK7KQNXnxLtIFWtajUcbxE1soDi1Fo0DkKoEVZ AzHNcJpEeFfGeYiB0TWaF5b4dv6sAQF5dLPb9Bo65G7LxYBPb5YYXX+7vsE8fq+VID FVf+0flsnShY7tYkpj2pZiHDcfWiy9Cb71ydHWdQ= From: "avi@cloudius-systems.com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94645] New: incorrect concecpt evaluation with decltype, plus internal erropr Date: Sat, 18 Apr 2020 04:22:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: avi@cloudius-systems.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 attachments.created 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: Sat, 18 Apr 2020 04:22:54 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94645 Bug ID: 94645 Summary: incorrect concecpt evaluation with decltype, plus internal erropr Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: avi@cloudius-systems.com Target Milestone: --- Created attachment 48303 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D48303&action=3Dedit reduced test case (before preprocessing) A concept involving decltype() fails to evaludate correctly in gcc 10, with some indication the compiler has an internal error. The same program compiles in gcc9 (with -fconcepts). Reduced program and preprocessed output attached. gcc 10 command line: g++ -std=3Dgnu++2a -Wall -Werror -c -o /dev/null reduced.cc=20 gcc 9 command line: g++ -std=3Dgnu++2a -fconcepts -Wall -Werror -c -o /dev/null reduced.cc gcc 10 errors: In file included from /usr/include/c++/10/bits/stl_algobase.h:71, from /usr/include/c++/10/algorithm:61, from reduced.cc:1: /usr/include/c++/10/bits/predefined_ops.h: In instantiation of 'constexpr b= ool __gnu_cxx::__ops::_Iter_pred<_Predicate>::operator()(_Iterator) [with _Iter= ator =3D std::__detail::_Node_const_iterator, p::feature>, false, true>; _Predicate =3D operator<<(std::ostream&, l

)::]': /usr/include/c++/10/bits/stl_algobase.h:1906:42: required from 'constexpr _InputIterator std::__find_if(_InputIterator, _InputIterator, _Predicate, std::input_iterator_tag) [with _InputIterator =3D std::__detail::_Node_const_iterator, p::feature>, false, true>; _Predicate =3D __gnu_cxx::__ops::_Iter_pred):: >]' /usr/include/c++/10/bits/stl_algobase.h:1965:23: required from 'constexpr _Iterator std::__find_if(_Iterator, _Iterator, _Predicate) [with _Iterator = =3D std::__detail::_Node_const_iterator, p::feature>, false, true>; _Predicate =3D __gnu_cxx::__ops::_Iter_pred):: >]' /usr/include/c++/10/bits/stl_algo.h:3928:28: required from 'constexpr _II= ter std::find_if(_IIter, _IIter, _Predicate) [with _IIter =3D std::__detail::_Node_const_iterator, p::feature>, false, true>; _Predicate =3D operator<<(std::ostream&, l

)::]' reduced.cc:12:7: recursively required from 'std::ostream& operator<<(std::ostream&, std::vector) [with a =3D l

; std::ostream =3D std::basic_ostream]' reduced.cc:12:7: required from 'std::ostream& operator<<(std::ostream&, std::vector) [with a =3D std::vector >; std::ostream =3D std::basic_ostream]' reduced.cc:56:11: required from 'void e::h::g(const string_view&, const string_view&) [with a =3D std::vector >; std::string_view =3D std::basic_string_view]' reduced.cc:23:10: required from here /usr/include/c++/10/bits/predefined_ops.h:316:23: error: no match for call = to '(operator<<(std::ostream&, l

)::) (const std::pair, p::feature>&)' 316 | { return bool(_M_pred(*__it)); } | ~~~~~~~^~~~~~~ reduced.cc:37:17: note: candidate: 'operator<<(std::ostream&, l

)::' 37 | [opt](const typename m::value_type &) { return opt.= n; }); | ^ reduced.cc:37:17: note: constraints not satisfied reduced.cc: In instantiation of 'operator<<(std::ostream&, l

)::': /usr/include/c++/10/bits/predefined_ops.h:316:23: required from 'constexpr bool __gnu_cxx::__ops::_Iter_pred<_Predicate>::operator()(_Iterator) [with _Iterator =3D std::__detail::_Node_const_iterator, p::feature>, false, true>; _Predicate =3D operator<<(std::ostream&, l

)::]' /usr/include/c++/10/bits/stl_algobase.h:1906:42: required from 'constexpr _InputIterator std::__find_if(_InputIterator, _InputIterator, _Predicate, std::input_iterator_tag) [with _InputIterator =3D std::__detail::_Node_const_iterator, p::feature>, false, true>; _Predicate =3D __gnu_cxx::__ops::_Iter_pred):: >]' /usr/include/c++/10/bits/stl_algobase.h:1965:23: required from 'constexpr _Iterator std::__find_if(_Iterator, _Iterator, _Predicate) [with _Iterator = =3D std::__detail::_Node_const_iterator, p::feature>, false, true>; _Predicate =3D __gnu_cxx::__ops::_Iter_pred):: >]' /usr/include/c++/10/bits/stl_algo.h:3928:28: required from 'constexpr _II= ter std::find_if(_IIter, _IIter, _Predicate) [with _IIter =3D std::__detail::_Node_const_iterator, p::feature>, false, true>; _Predicate =3D operator<<(std::ostream&, l

)::]' reduced.cc:12:7: recursively required from 'std::ostream& operator<<(std::ostream&, std::vector) [with a =3D l

; std::ostream =3D std::basic_ostream]' reduced.cc:12:7: required from 'std::ostream& operator<<(std::ostream&, std::vector) [with a =3D std::vector >; std::ostream =3D std::basic_ostream]' reduced.cc:56:11: required from 'void e::h::g(const string_view&, const string_view&) [with a =3D std::vector >; std::string_view =3D std::basic_string_view]' reduced.cc:23:10: required from here reduced.cc:26:31: required for the satisfaction of 'HasMapInterface' reduced.cc:26: confused by earlier errors, bailing out Preprocessed source stored into /tmp/cccbFNij.out file, please attach this = to your bugreport.=