This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/72845] gcc crashes (ICE) when compiling program with complex noexcept declaration
- From: "trippels at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 09 Aug 2016 06:26:01 +0000
- Subject: [Bug c++/72845] gcc crashes (ICE) when compiling program with complex noexcept declaration
- Auto-submitted: auto-generated
- References: <bug-72845-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72845
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2016-08-09
CC| |trippels at gcc dot gnu.org
Ever confirmed|0 |1
Known to fail| |5.4.0, 6.1.0, 7.0
--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
template <typename> struct g { static const int h = 0; };
template <typename i> void declval() { static_assert(!g<i>::h,""); }
template <typename> struct a {
template <typename d, typename c>
friend auto f(d &&, c &&) noexcept(declval<c>) -> decltype(declval<c>);
};
template <typename d, typename c> auto f(d &&, c &&) -> decltype(declval<c>);
struct e {};
static_assert((e{}, declval<a<int>>),"");
Clang accepts the code. Might be related to PR71784.