When I compile this program: ``` #include <variant> #include <vector> struct G { int x; }; int main() { struct A { int x; }; A a; std::variant<A> b {a}; std::vector<A> c {a}; std::variant<G> d {G {}}; __builtin_trap(); } ``` Then run it in gdb, note that `print b` prints ``` std::variant<> [no contained value] ``` but `print d` prints ``` std::variant<G> [index 0] = {{x = 0}} ``` In the first case the print is wrong. It's caused by `Type.template_argument` function: If this is called in the Python shell ``` >>> gdb.lookup_symbol("b")[0].type.template_argument(0) Traceback (most recent call last): File "<stdin>", line 1, in <module> RuntimeError: syntax error ```
Is this a duplicate of PR20590?
Fixed. *** This bug has been marked as a duplicate of bug 11907 ***