Re: [PATCH] c++: Fix ICE with inline variable in template [PR97975]

2020-12-02 Thread Jason Merrill via Gcc-patches
On 12/1/20 12:38 PM, Marek Polacek wrote: In this test, we have static inline const int c = b; in a class template, and we call store_init_value as usual. There, the value is IMPLICIT_CONV_EXPR(b) which is is_nondependent_static_init_expression but isn't

[PATCH] c++: Fix ICE with inline variable in template [PR97975]

2020-12-01 Thread Marek Polacek via Gcc-patches
In this test, we have static inline const int c = b; in a class template, and we call store_init_value as usual. There, the value is IMPLICIT_CONV_EXPR(b) which is is_nondependent_static_init_expression but isn't is_nondependent_constant_expression (they only differ in STRICT). We call