Re: [PATCH] c++: Fix crash with template spec in different namespace [PR94255]

2020-04-20 Thread Jason Merrill via Gcc-patches
On 4/18/20 10:49 AM, Marek Polacek wrote: This is an ICE on invalid, because we're specializing S::foo in the wrong namespace. cp_parser_class_specifier_1 parses S::foo in M and then it tries to push the nested-name-specifier of foo, which is S. By that, we're breaking the assumption of push_in

[PATCH] c++: Fix crash with template spec in different namespace [PR94255]

2020-04-18 Thread Marek Polacek via Gcc-patches
This is an ICE on invalid, because we're specializing S::foo in the wrong namespace. cp_parser_class_specifier_1 parses S::foo in M and then it tries to push the nested-name-specifier of foo, which is S. By that, we're breaking the assumption of push_inner_scope that the pushed scope must be a sc