testcase #include <assert.h> struct foo { virtual void bar(){ } int foo::*baz; }; int main() { foo* x = new foo(); assert (x->baz == foo().baz); } result $ g++43 bug.cpp -o bag; ./bug assertion "x->baz == foo().baz" failed: file "bug.cpp", line 11
if (x->baz != (TARGET_EXPR <D.1717, D.1717 = {._vptr.foo=0B, .baz=-1};, <<< Unknown tree: aggr_init_expr 4 __comp_ctor D.1717 0B >>> ;>).baz) I believe there's a dup for this ...
PR 32245?
Sorry, my code is undefined. By 12.1/7, member of foo is not initialized. I