aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/f-lang.c9
2 files changed, 12 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 993a358..3b58f2e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2020-04-02 Tom Tromey <tromey@adacore.com>
+ * f-lang.c (build_fortran_types): Use arch_type to initialize
+ builtin_complex_s32 in the TYPE_CODE_ERROR case.
+
+2020-04-02 Tom Tromey <tromey@adacore.com>
+
* dwarf2/read.c (partial_die_info::read): Do not create a vector
of attributes.
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index 2ce4ad4..6b7a5fb 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -744,8 +744,13 @@ build_fortran_types (struct gdbarch *gdbarch)
= init_complex_type ("complex*8", builtin_f_type->builtin_real);
builtin_f_type->builtin_complex_s16
= init_complex_type ("complex*16", builtin_f_type->builtin_real_s8);
- builtin_f_type->builtin_complex_s32
- = init_complex_type ("complex*32", builtin_f_type->builtin_real_s16);
+
+ if (TYPE_CODE (builtin_f_type->builtin_real_s16) == TYPE_CODE_ERROR)
+ builtin_f_type->builtin_complex_s32
+ = arch_type (gdbarch, TYPE_CODE_ERROR, 256, "complex*32");
+ else
+ builtin_f_type->builtin_complex_s32
+ = init_complex_type ("complex*32", builtin_f_type->builtin_real_s16);
return builtin_f_type;
}