--- orig/p/module.c Sun Apr 7 20:31:27 2002 +++ p/module.c Thu Apr 25 15:08:42 2002 @@ -30,6 +30,7 @@ #include "objects.h" #include "util.h" #include "module.h" +#include "types.h" #include "p/version.h" #ifdef __EMX__ @@ -2774,11 +2775,28 @@ case ARRAY_TYPE: { tree type, domain, t1; + union tree_node t0; + int packed, save_flag_pack_struct = 0; + type = load_node (); domain = load_node (); + + copy_flags (&t0, flags); + packed = PASCAL_TYPE_PACKED (&t0); + if (packed) + { + save_flag_pack_struct = flag_pack_struct; + flag_pack_struct = 1; + } /* In case this array already exists, we do not want to spoil its flags, thus we copy it. */ t = build_type_copy (build_array_type (type, domain)); + if (packed) + { + flag_pack_struct = save_flag_pack_struct; + t = grok_packed (t); + } + t1 = mark_node_loaded (t, uid); if (t1 != t) {