summaryrefslogtreecommitdiff
path: root/gdb/f-valprint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/f-valprint.c')
-rw-r--r--gdb/f-valprint.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index b2e327189b5..70ad59f9bf2 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -589,9 +589,10 @@ f_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
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 gdb_byte *valaddr, int embedded_offset,
if (index != TYPE_NFIELDS (type) - 1)
fputs_filtered (", ", stream);
}
- fprintf_filtered (stream, "}");
+ fprintf_filtered (stream, " )");
break;
default: