According to the Fortran standard, logical is of the size of a
'single numeric storage unit' (just like real and integer). For
gfortran, flang and ifx/ifort this storage unit (or the default
logical type) is of size kind 4, actually occupying 4 bytes of
storage, and so the default type for logical expressions in
Fortran should probably also be Logical*4 and not Logical*2. I
adapted GDB's behavior to be in line with
gfortran/ifort/ifx/flang.
add (builtin->builtin_void);
lai->set_string_char_type (builtin->builtin_character);
- lai->set_bool_type (builtin->builtin_logical_s2, "logical");
+ lai->set_bool_type (builtin->builtin_logical, "logical");
}
/* See language.h. */
# Test the only possible values for a logical, TRUE and FALSE (and
# also true and false).
- gdb_test "pt .TRUE." "type = logical\\*2"
- gdb_test "pt .FALSE." "type = logical\\*2"
- gdb_test "pt .true." "type = logical\\*2"
- gdb_test "pt .false." "type = logical\\*2"
+ gdb_test "pt .TRUE." "type = logical\\*4"
+ gdb_test "pt .FALSE." "type = logical\\*4"
+ gdb_test "pt .true." "type = logical\\*4"
+ gdb_test "pt .false." "type = logical\\*4"
}
proc test_float_literal_types_accepted {} {