Dear All, This patch is fairly obvious and follows a suggestion from Tobias to use gfc_element_size. He even wrote the testcase!
Bootstrapped and regested on FC17/x86_64 - OK for trunk? Cheers Paul PS In writing this, I have just noted that I need to trap ts->type == BT_HOLLERITH. It would be a rather bizarre thing to try to do but I just know that somebody, somewhere will eventually try it :-) Consider that it will be done in the committed version. 2013-10-20 Paul Thomas <pa...@gcc.gnu.org> PR fortran 57893 * class.c : Include target-memory.h. (gfc_find_intrinsic_vtab) Build a minimal expression so that gfc_element_size can be used to obtain the storage size, rather that the kind value. 2013-10-20 Paul Thomas <pa...@gcc.gnu.org> PR fortran 57893 * gfortran.dg/unlimited_polymorphic_12.f90 : New test.
pr58793.diff
Description: Binary data