aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/f-lang.c4
-rw-r--r--gdb/testsuite/gdb.fortran/complex.exp4
-rw-r--r--gdb/testsuite/gdb.fortran/types.exp19
3 files changed, 11 insertions, 16 deletions
diff --git a/gdb/f-lang.c b/gdb/f-lang.c
index 82252bf..94669c6 100644
--- a/gdb/f-lang.c
+++ b/gdb/f-lang.c
@@ -1636,7 +1636,7 @@ build_fortran_types (struct gdbarch *gdbarch)
= arch_integer_type (gdbarch, gdbarch_short_bit (gdbarch), 0, "integer*2");
builtin_f_type->builtin_integer
- = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch), 0, "integer");
+ = arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch), 0, "integer*4");
builtin_f_type->builtin_integer_s8
= arch_integer_type (gdbarch, gdbarch_long_long_bit (gdbarch), 0,
@@ -1644,7 +1644,7 @@ build_fortran_types (struct gdbarch *gdbarch)
builtin_f_type->builtin_real
= arch_float_type (gdbarch, gdbarch_float_bit (gdbarch),
- "real", gdbarch_float_format (gdbarch));
+ "real*4", gdbarch_float_format (gdbarch));
builtin_f_type->builtin_real_s8
= arch_float_type (gdbarch, gdbarch_double_bit (gdbarch),
diff --git a/gdb/testsuite/gdb.fortran/complex.exp b/gdb/testsuite/gdb.fortran/complex.exp
index 60f7c8e..f4a80fb 100644
--- a/gdb/testsuite/gdb.fortran/complex.exp
+++ b/gdb/testsuite/gdb.fortran/complex.exp
@@ -45,13 +45,13 @@ gdb_test "print c16" " = \\(-874,19\\)"
gdb_test "whatis c" "type = $complex4"
gdb_test "print \$_creal (c)" " = 1000"
with_test_prefix "c" {
- gdb_test "whatis \$" " = real"
+ gdb_test "whatis \$" " = real\\*4"
}
gdb_test "whatis c4" "type = $complex4"
gdb_test "print \$_creal (c4)" " = 1000"
with_test_prefix "c4" {
- gdb_test "whatis \$" " = real"
+ gdb_test "whatis \$" " = real\\*4"
}
gdb_test "whatis c8" "type = $complex8"
gdb_test "print \$_creal (c8)" " = 321"
diff --git a/gdb/testsuite/gdb.fortran/types.exp b/gdb/testsuite/gdb.fortran/types.exp
index 5ab44b1..594276f 100644
--- a/gdb/testsuite/gdb.fortran/types.exp
+++ b/gdb/testsuite/gdb.fortran/types.exp
@@ -73,26 +73,21 @@ proc test_float_literal_types_accepted {} {
# Test the default primitive Fortran types.
proc test_default_types {} {
- gdb_test "ptype integer*4" "type = integer"
- gdb_test "ptype integer_4" "type = integer"
-
- gdb_test "ptype logical" "type = logical*4"
-
- gdb_test "ptype real*4" "type = real"
- gdb_test "ptype real_4" "type = real"
-
- gdb_test "ptype complex" "type = complex*4"
+ gdb_test "ptype integer" "type = integer\\*4"
+ gdb_test "ptype logical" "type = logical\\*4"
+ gdb_test "ptype real" "type = real\\*4"
+ gdb_test "ptype complex" "type = complex\\*4"
}
# Test the the primitive Fortran types, those that GDB should always
# know, even if the program does not define them, are in fact, known.
proc test_primitive_types_known {} {
foreach type {void character \
- integer*1 integer*2 integer integer*8 \
- integer_1 integer_2 integer_8 \
+ integer*1 integer*2 integer*4 integer*8 \
+ integer_1 integer_2 integer_4 integer_8 \
logical*1 logical*2 logical*4 logical*8 \
logical_1 logical_2 logical_4 logical_8 \
- real real*8 real*16 real_8 real_16 \
+ real*4 real*8 real*16 real_4 real_8 real_16 \
complex*4 complex*8 complex*16 \
complex_4 complex_8 complex_16} {