https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94609
H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2020-04-15 --- Comment #9 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Iain Buclaw from comment #7) > > However the front-end for some time now has implemented an isPOD method that > recursively checks all fields too. It would be better to use this instead. > > --- a/gcc/d/types.cc > +++ b/gcc/d/types.cc > @@ -915,7 +915,7 @@ public: > /* For structs with a user defined postblit or a destructor, > also set TREE_ADDRESSABLE on the type and all variants. > This will make the struct be passed around by reference. */ > - if (t->sym->postblit || t->sym->dtor) > + if (!t->sym->isPOD ()) > { > for (tree tv = t->ctype; tv != NULL_TREE; tv = TYPE_NEXT_VARIANT > (tv)) > TREE_ADDRESSABLE (tv) = 1; > > > > The test itself now passes with the above, but going to rebuild the library > and run it on the wider testsuite. I tested with glibc 2.30 with fix for https://sourceware.org/bugzilla/show_bug.cgi?id=25810 I got FAIL: libphobos.phobos_shared/std/algorithm/mutation.d execution test FAIL: libphobos.phobos_shared/std/algorithm/mutation.d execution test FAIL: libphobos.phobos_shared/std/algorithm/mutation.d execution test FAIL: libphobos.phobos_shared/std/conv.d execution test FAIL: libphobos.phobos_shared/std/conv.d execution test FAIL: libphobos.phobos_shared/std/conv.d execution test FAIL: libphobos.phobos_shared/std/datetime/systime.d execution test FAIL: libphobos.phobos_shared/std/datetime/systime.d execution test FAIL: libphobos.phobos_shared/std/datetime/systime.d execution test FAIL: libphobos.phobos_shared/std/range/primitives.d (test for excess errors) FAIL: libphobos.phobos/std/algorithm/mutation.d execution test FAIL: libphobos.phobos/std/algorithm/mutation.d execution test FAIL: libphobos.phobos/std/algorithm/mutation.d execution test FAIL: libphobos.phobos/std/conv.d execution test FAIL: libphobos.phobos/std/conv.d execution test FAIL: libphobos.phobos/std/conv.d execution test FAIL: libphobos.phobos/std/datetime/systime.d execution test FAIL: libphobos.phobos/std/datetime/systime.d execution test FAIL: libphobos.phobos/std/datetime/systime.d execution test FAIL: libphobos.phobos/std/range/primitives.d (test for excess errors) with $ make check RUNTESTFLAGS="--target_board='unix{-mx32,-m32,}'"