https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77369
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2017-04-24 00:00:00 |2017-10-17 Known to fail| |4.6.4, 4.7.4, 4.8.5, 4.9.4, | |5.4.0, 6.4.0, 7.2.0, 8.0 --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- Another testcase, this time compile-time only: template<typename F> int caller(F f) noexcept(noexcept(f())) { f(); return 0; } void func1() noexcept { } void func2() { throw 1; } #ifndef FIXIT int instantiate_caller_with_func1 = caller(func1); #endif static_assert( !noexcept(caller(func2)), "" ); Without FIXIT defined the first instantiation of caller makes use of the fact that its template argument type is noexcept, but then we use the same instantiation for the caller(func2): n.cc:11:1: error: static assertion failed static_assert( !noexcept(caller(func2)), "" ); ^~~~~~~~~~~~~ As Aaron observed, EDG has exactly the same bug. Clang compiles it successfully.