https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117106
--- Comment #1 from Fedor Chelnokov <fchelnokov at gmail dot com> --- This crash is reproducible in C++20 mode as well without deducing this: ``` struct A { int x; void foo(this auto &&self) noexcept(noexcept(self.x)) {} auto bar() -> decltype(foo()) {} }; ``` In instantiation of 'void A::foo() [with <template-parameter-1-1> = int]': <source>:5:36: required from here 5 | auto bar() -> decltype(foo<int>()) {} | ~~~~~~~~^~ <source>:4:10: internal compiler error: Segmentation fault 4 | void foo() noexcept(noexcept(x)) {} | ^~~ 0x2031cbc internal_error(char const*, ...) ???:0 0x11fb4f4 check_qualified_type(tree_node const*, tree_node const*, int) ???:0 0x11fb5f3 get_qualified_type(tree_node*, int) ???:0 0x1206345 build_qualified_type(tree_node*, int) ???:0 0x843cba build_noexcept_spec(tree_node*, int) ???:0 0x9301e1 maybe_instantiate_noexcept(tree_node*, int) ???:0 0x83311a mark_used(tree_node*, int) ???:0 0x79d629 build_new_method_call(tree_node*, tree_node*, vec<tree_node*, va_gc, vl_embed>**, tree_node*, int, tree_node**, int) ???:0 0x960c3c finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, bool, int) ???:0 0x90ee14 c_parse_file() ???:0 0xa0d1b9 c_common_parse_file() ???:0 Online demo: https://gcc.godbolt.org/z/PW6sn8Tjq