------- Comment #14 from burnus at gcc dot gnu dot org 2010-02-17 21:25 ------- Created an attachment (id=19899) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19899&action=view) Draft patch - misses modifications to nml_get_addr_expr
The current standard is weird: allocatables/pointers/automatic/non-const-shape dummy arrays are valid - but only via host/use association. Thus, I postpone this until there is an official reply from J3/WG5. I attach a draft patch in order to make sure it won't get lost. The patch goes past the compile-time check and also past the ICE; however, it does not work as nml_get_addr_expr needs to be modified. One needs to pass the address of the array data, i.e. &(array_descriptor.data) rather than &array_descriptor - which should be done in nml_get_addr_expr. Note: nml_get_addr_expr's "array_flagged" remains zero for array descriptors. trans-array.c's gfc_conv_array_data might be a function, which one could use. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43062