https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70147

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Ok, so I analyzed more precisely what happens. The problem is that we want to
zero vtbp_ptr.ios_base (struct ios_base),
but as we are at the very beginning of a basic_istream::basic_istream,
following value is not initialized:
MEM[(struct basic_istream *)&__is]._vptr.basic_istream

and unfortunately address of zero store to vtbp_ptr.ios_base is based on that:
(void) (((struct basic_ios *) this + (__in_chrg == 0 ? (sizetype) *(long int *)
(((struct basic_istream *) this)->_vptr.basic_istream + 18446744073709551592) :
16))->D.42212._vptr.ios_base = 0B)

So fix should probably handle that and make the assignment conditional?

Martin

Reply via email to