https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87250
--- Comment #2 from Matthew Beliveau <mbelivea at redhat dot com> --- Reduced code: template <typename> struct a { constexpr a(int) {} }; template <typename> struct atomic; template <> struct atomic<bool> { a<bool> b; constexpr atomic(bool c) : b(c) {} }; ~/bld/gcc7/gcc/cc1plus k.ii -Os -fsyntax-only constexpr a< <template-parameter-1-1> >::a(int) a<bool> constexpr atomic<bool>::atomic(bool) constexpr a< <template-parameter-1-1> >::a(int) [with <template-parameter-1-1> = bool] constexpr a< <template-parameter-1-1> >::a(int) [with <template-parameter-1-1> = bool] constexpr a< <template-parameter-1-1> >::a(int) [with <template-parameter-1-1> = bool] constexpr atomic<bool>::atomic(bool) constexpr atomic<bool>::atomic(bool) constexpr a< <template-parameter-1-1> >::a(int) [with <template-parameter-1-1> = bool] k.ii:8:2: internal compiler error: Segmentation fault }; ^ 0x113a4c5 crash_signal /home/mbeliveau/src/gcc7/gcc/toplev.c:337 0xa08a48 maybe_clone_body(tree_node*) /home/mbeliveau/src/gcc7/gcc/cp/optimize.c:659 0x9bd5d9 expand_or_defer_fn_1(tree_node*) /home/mbeliveau/src/gcc7/gcc/cp/semantics.c:4287 0x9bd6da expand_or_defer_fn(tree_node*) /home/mbeliveau/src/gcc7/gcc/cp/semantics.c:4309 0x8cb0fd c_parse_final_cleanups() /home/mbeliveau/src/gcc7/gcc/cp/decl2.c:4727 0xaf208b c_common_parse_file() /home/mbeliveau/src/gcc7/gcc/c-family/c-opts.c:1134 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.