+2010-04-20 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ * f-exp.y: Add new production to recognize the `logical*8' type.
+ (LOGICAL_S8_KEYWORD): New token.
+ * f-lang.c (enum f_primitive_types)
+ <f_primitive_type_logical_s8>: New field.
+ (f_language_arch_info): Handling `logical*8' type.
+ (build_fortran_types): Building `logical*8' type.
+ * f-lang.h (struct builtin_f_type) <builtin_logical_s8>: New field.
+
2010-04-19 Doug Evans <dje@google.com>
* ser-base.c (generic_readchar): Watch for EOF in read of error_fd.
/* Special type cases, put in to allow the parser to distinguish different
legal basetypes. */
%token INT_KEYWORD INT_S2_KEYWORD LOGICAL_S1_KEYWORD LOGICAL_S2_KEYWORD
+%token LOGICAL_S8_KEYWORD
%token LOGICAL_KEYWORD REAL_KEYWORD REAL_S8_KEYWORD REAL_S16_KEYWORD
%token COMPLEX_S8_KEYWORD COMPLEX_S16_KEYWORD COMPLEX_S32_KEYWORD
%token BOOL_AND BOOL_OR BOOL_NOT
{ $$ = parse_f_type->builtin_integer_s2; }
| CHARACTER
{ $$ = parse_f_type->builtin_character; }
+ | LOGICAL_S8_KEYWORD
+ { $$ = parse_f_type->builtin_logical_s8; }
| LOGICAL_KEYWORD
{ $$ = parse_f_type->builtin_logical; }
| LOGICAL_S2_KEYWORD
{ "integer_2", INT_S2_KEYWORD, BINOP_END },
{ "logical_1", LOGICAL_S1_KEYWORD, BINOP_END },
{ "logical_2", LOGICAL_S2_KEYWORD, BINOP_END },
+ { "logical_8", LOGICAL_S8_KEYWORD, BINOP_END },
{ "complex_8", COMPLEX_S8_KEYWORD, BINOP_END },
{ "integer", INT_KEYWORD, BINOP_END },
{ "logical", LOGICAL_KEYWORD, BINOP_END },
f_primitive_type_logical,
f_primitive_type_logical_s1,
f_primitive_type_logical_s2,
+ f_primitive_type_logical_s8,
f_primitive_type_integer,
f_primitive_type_integer_s2,
f_primitive_type_real,
= builtin->builtin_logical_s1;
lai->primitive_type_vector [f_primitive_type_logical_s2]
= builtin->builtin_logical_s2;
+ lai->primitive_type_vector [f_primitive_type_logical_s8]
+ = builtin->builtin_logical_s8;
lai->primitive_type_vector [f_primitive_type_real]
= builtin->builtin_real;
lai->primitive_type_vector [f_primitive_type_real_s8]
= arch_boolean_type (gdbarch, gdbarch_short_bit (gdbarch), 1,
"logical*2");
+ builtin_f_type->builtin_logical_s8
+ = arch_boolean_type (gdbarch, gdbarch_long_long_bit (gdbarch), 1,
+ "logical*8");
+
builtin_f_type->builtin_integer
= arch_integer_type (gdbarch, gdbarch_int_bit (gdbarch), 0,
"integer");
struct type *builtin_logical;
struct type *builtin_logical_s1;
struct type *builtin_logical_s2;
+ struct type *builtin_logical_s8;
struct type *builtin_real;
struct type *builtin_real_s8;
struct type *builtin_real_s16;
+2010-04-20 Jan Kratochvil <jan.kratochvil@redhat.com>
+ Sergio Durigan Junior <sergiodj@redhat.com>
+
+ * gdb.fortran/logical.exp: New testcase.
+ * gdb.fortran/logical.f90: New file.
+
2010-04-19 Doug Evans <dje@google.com>
* gdb.base/help.exp (help source): Update expected output.
--- /dev/null
+# Copyright 2010 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# This file was written by Jan Kratochvil <jan.kratochvil@redhat.com>.
+
+set test "logical"
+set srcfile ${test}.f90
+
+if { [prepare_for_testing "${test}.exp" "${test}" "${srcfile}" {debug f77 quiet}] } {
+ untested "Could not compile ${srcfile}."
+ return -1
+}
+
+if { ![runto MAIN__] } {
+ perror "Could not run to breakpoint `MAIN__'."
+ continue
+}
+
+gdb_breakpoint [gdb_get_line_number "stop-here"]
+gdb_continue_to_breakpoint "stop-here" ".*stop-here.*"
+gdb_test "p l" " = \\.TRUE\\."
+gdb_test "p l1" " = \\.TRUE\\."
+gdb_test "p l2" " = \\.TRUE\\."
+gdb_test "p l4" " = \\.TRUE\\."
+gdb_test "p l8" " = \\.TRUE\\."
--- /dev/null
+! Copyright 2010 Free Software Foundation, Inc.
+!
+! This program is free software; you can redistribute it and/or modify
+! it under the terms of the GNU General Public License as published by
+! the Free Software Foundation; either version 2 of the License, or
+! (at your option) any later version.
+!
+! This program is distributed in the hope that it will be useful,
+! but WITHOUT ANY WARRANTY; without even the implied warranty of
+! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+! GNU General Public License for more details.
+!
+! You should have received a copy of the GNU General Public License
+! along with this program; if not, write to the Free Software
+! Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+!
+! This file was written by Jan Kratochvil <jan.kratochvil@redhat.com>.
+
+program test
+ logical :: l
+ logical (kind=1) :: l1
+ logical (kind=2) :: l2
+ logical (kind=4) :: l4
+ logical (kind=8) :: l8
+ l = .TRUE.
+ l1 = .TRUE.
+ l2 = .TRUE.
+ l4 = .TRUE.
+ l8 = .TRUE.
+ l = .FALSE. ! stop-here
+end