On Sat, May 28, 2011 at 8:24 AM, Tobias Burnus <bur...@net-b.de> wrote: > Thanks for Richard for debugging this! > > Setting TREE_TYPE in trans-decl.c is nonsense and leads to types of the form > "_Complex _Complex int". The fix is rather obvious. > > Build and regtested on x86-64-linux. > OK for the trunk?
Note that I thought that instead of diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c index 94b9a59..02a75fd 100644 --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -1423,10 +1423,7 @@ gfc_get_nodesc_array_type (tree etype, gfc_array_spec * as, gfc_packed packed, if (as->rank) type = make_node (ARRAY_TYPE); else - { - type = build_variant_type_copy (etype); - TREE_TYPE (type) = etype; - } + type = build_variant_type_copy (etype); GFC_ARRAY_TYPE_P (type) = 1; TYPE_LANG_SPECIFIC (type) what was probably intended was - { - type = build_variant_type_copy (etype); - TREE_TYPE (type) = etype; - } + type = build_variant_type_copy (type); because when copying the element type the following line GFC_ARRAY_TYPE_P (type) = 1; doesn't make too much sense (to me). And the copying was probably to avoid clobbering the shared type. So, please figure out what is really intended here ;) Richard. > Tobias >