This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/81942] ICE on empty constexpr constructor with C++14
- From: "paolo.carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 31 Aug 2017 19:51:46 +0000
- Subject: [Bug c++/81942] ICE on empty constexpr constructor with C++14
- Auto-submitted: auto-generated
- References: <bug-81942-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81942
--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Adding more details.
The GOTO_EXPR is generated for such targets in finish_return_stmt:
903 if (DECL_DESTRUCTOR_P (current_function_decl)
904 || (DECL_CONSTRUCTOR_P (current_function_decl)
905 && targetm.cxx.cdtor_returns_this ()))
906 {
907 /* Similarly, all destructors must run destructors for
908 base-classes before returning. So, all returns in a
909 destructor get sent to the DTOR_LABEL; finish_function emits
910 code to return a value there. */
911 return finish_goto_stmt (cdtor_label);
912 }