diff gcc/fortran/trans-types.h @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
line wrap: on
line diff
--- a/gcc/fortran/trans-types.h	Fri Oct 27 22:46:09 2017 +0900
+++ b/gcc/fortran/trans-types.h	Thu Oct 25 07:37:49 2018 +0900
@@ -1,5 +1,5 @@
 /* Header for Fortran 95 types backend support.
-   Copyright (C) 2002-2017 Free Software Foundation, Inc.
+   Copyright (C) 2002-2018 Free Software Foundation, Inc.
    Contributed by Paul Brook <paul@nowt.org>
    and Steven Bosscher <s.bosscher@student.tudelft.nl>
 
@@ -23,6 +23,7 @@
 #ifndef GFC_BACKEND_H
 #define GFC_BACKEND_H
 
+
 extern GTY(()) tree gfc_array_index_type;
 extern GTY(()) tree gfc_array_range_type;
 extern GTY(()) tree gfc_character1_type_node;
@@ -33,12 +34,25 @@
 extern GTY(()) tree gfc_float128_type_node;
 extern GTY(()) tree gfc_complex_float128_type_node;
 
+/* logical_type_node is the Fortran LOGICAL type of default kind.  In
+   addition to uses mandated by the Fortran standard, also prefer it
+   for compiler generated temporary variables, is it avoids some minor
+   issues with boolean_type_node (the C/C++ _Bool/bool). Namely:
+   - On x86, partial register stalls with 8/16 bit register access,
+     and length prefix changes.
+   - On s390 there is a compare with immediate and jump instruction,
+     but it works only with 32-bit quantities and not 8-bit such as
+     boolean_type_node.
+*/
+extern GTY(()) tree logical_type_node;
+extern GTY(()) tree logical_true_node;
+extern GTY(()) tree logical_false_node;
+
 /* This is the type used to hold the lengths of character variables.
    It must be the same as the corresponding definition in gfortran.h.  */
-/* TODO: This is still hardcoded as kind=4 in some bits of the compiler
-   and runtime library.  */
 extern GTY(()) tree gfc_charlen_type_node;
 
+
 /* The following flags give us information on the correspondence of
    real (and complex) kinds with C floating-point types long double
    and __float128.  */
@@ -59,6 +73,7 @@
 void gfc_init_types (void);
 void gfc_init_c_interop_kinds (void);
 
+tree get_dtype_type_node (void);
 tree gfc_get_int_type (int);
 tree gfc_get_real_type (int);
 tree gfc_get_complex_type (int);