diff -urpN src-orig/gdb/eval.c src/gdb/eval.c --- src-orig/gdb/eval.c 2008-03-21 16:02:37.000000000 +0100 +++ src/gdb/eval.c 2008-04-18 16:11:06.000000000 +0200 @@ -1720,7 +1720,7 @@ evaluate_subexp_standard (struct type *e returns the correct type value */ deprecated_set_value_type (arg1, tmp_type); - return value_ind (value_add (value_coerce_array (arg1), arg2)); + return value_subscripted_rvalue (arg1, arg2, 0); } case BINOP_LOGICAL_AND: diff -urpN src-orig/gdb/f-typeprint.c src/gdb/f-typeprint.c --- src-orig/gdb/f-typeprint.c 2008-02-28 20:10:42.000000000 +0100 +++ src/gdb/f-typeprint.c 2008-04-17 17:41:30.000000000 +0200 @@ -368,14 +369,22 @@ f_type_print_base (struct type *type, st break; case TYPE_CODE_STRUCT: - fprintfi_filtered (level, stream, "Type "); + case TYPE_CODE_UNION: + if (TYPE_CODE (type) == TYPE_CODE_UNION) + fprintfi_filtered (level, stream, "Type, C_Union :: "); + else + fprintfi_filtered (level, stream, "Type "); fputs_filtered (TYPE_TAG_NAME (type), stream); fputs_filtered ("\n", stream); for (index = 0; index < TYPE_NFIELDS (type); index++) { - f_print_type (TYPE_FIELD_TYPE (type, index), "", stream, show, level + 4); + f_type_print_base (TYPE_FIELD_TYPE (type, index), stream, show, + level + 4); fputs_filtered (" :: ", stream); - fputs_filtered (TYPE_FIELD_NAME (type, index), stream); + fprintfi_filtered (level, stream, "%s", + TYPE_FIELD_NAME (type, index)); + f_type_print_varspec_suffix (TYPE_FIELD_TYPE (type, index), + stream, 0, 0, 0); fputs_filtered ("\n", stream); } fprintfi_filtered (level, stream, "End Type "); diff -urpN src-orig/gdb/f-valprint.c src/gdb/f-valprint.c --- src-orig/gdb/f-valprint.c 2008-01-11 14:34:14.000000000 +0100 +++ src/gdb/f-valprint.c 2008-04-15 20:13:55.000000000 +0200 @@ -589,9 +589,10 @@ f_val_print (struct type *type, const gd break; case TYPE_CODE_STRUCT: + case TYPE_CODE_UNION: /* Starting from the Fortran 90 standard, Fortran supports derived types. */ - fprintf_filtered (stream, "{ "); + fprintf_filtered (stream, "( "); for (index = 0; index < TYPE_NFIELDS (type); index++) { int offset = TYPE_FIELD_BITPOS (type, index) / 8; @@ -601,7 +602,7 @@ f_val_print (struct type *type, const gd if (index != TYPE_NFIELDS (type) - 1) fputs_filtered (", ", stream); } - fprintf_filtered (stream, "}"); + fprintf_filtered (stream, " )"); break; default: diff -urpN src-orig/gdb/valarith.c src/gdb/valarith.c --- src-orig/gdb/valarith.c 2008-02-04 01:23:04.000000000 +0100 +++ src/gdb/valarith.c 2008-04-18 15:08:21.000000000 +0200 @@ -39,7 +39,6 @@ #define TRUNCATION_TOWARDS_ZERO ((-5 / 2) == -2) #endif -static struct value *value_subscripted_rvalue (struct value *, struct value *, int); static struct type *unop_result_type (enum exp_opcode op, struct type *type1); static struct type *binop_result_type (enum exp_opcode op, struct type *type1, struct type *type2); @@ -257,7 +256,7 @@ value_subscript (struct value *array, st (eg, a vector register). This routine used to promote floats to doubles, but no longer does. */ -static struct value * +struct value * value_subscripted_rvalue (struct value *array, struct value *idx, int lowerbound) { struct type *array_type = check_typedef (value_type (array)); diff -urpN src-orig/gdb/value.h src/gdb/value.h --- src-orig/gdb/value.h 2008-04-06 10:56:36.000000000 +0200 +++ src/gdb/value.h 2008-04-18 13:43:16.000000000 +0200 @@ -558,4 +558,5 @@ extern struct value *value_allocate_spac extern struct value *value_of_local (const char *name, int complain); +extern struct value * value_subscripted_rvalue (struct value *array, struct value *idx, int lowerbound); #endif /* !defined (VALUE_H) */