c-common.h (enum c_tree_index): Add g77 type entries.

* c-common.h (enum c_tree_index): Add g77 type entries.
        (g77_integer_type_node, g77_uinteger_type_node): New.
        (g77_longint_type_node, g77_ulongint_type_node): New.
        * c-decl.c (init_decl_processing): Initialize them.

Co-Authored-By: Richard Henderson <rth@cygnus.com>

From-SVN: r33992
This commit is contained in:
Chris Demetriou 2000-05-18 17:53:04 +00:00 committed by Richard Henderson
parent 91542396a6
commit 7aba5a5ff9
3 changed files with 69 additions and 1 deletions

View File

@ -1,3 +1,11 @@
2000-05-18 Chris Demetriou <cgd@sibyte.com>
Richard Henderson <rth@cygnus.com>
* c-common.h (enum c_tree_index): Add g77 type entries.
(g77_integer_type_node, g77_uinteger_type_node): New.
(g77_longint_type_node, g77_ulongint_type_node): New.
* c-decl.c (init_decl_processing): Initialize them.
2000-05-18 Richard Henderson <rth@cygnus.com>
* config/h8300/h8300.md (subs patterns): Use %G to negate.

View File

@ -45,7 +45,12 @@ enum c_tree_index
CTI_VOID_FTYPE_PTR,
CTI_INT_FTYPE_INT,
CTI_PTR_FTYPE_SIZETYPE,
CTI_G77_INTEGER_TYPE,
CTI_G77_UINTEGER_TYPE,
CTI_G77_LONGINT_TYPE,
CTI_G77_ULONGINT_TYPE,
CTI_MAX
};
@ -74,6 +79,12 @@ extern tree c_global_trees[CTI_MAX];
#define int_ftype_int c_global_trees[CTI_INT_FTYPE_INT]
#define ptr_ftype_sizetype c_global_trees[CTI_PTR_FTYPE_SIZETYPE]
/* g77 integer types, which which must be kept in sync with f/com.h */
#define g77_integer_type_node c_global_trees[CTI_G77_INTEGER_TYPE]
#define g77_uinteger_type_node c_global_trees[CTI_G77_UINTEGER_TYPE]
#define g77_longint_type_node c_global_trees[CTI_G77_LONGINT_TYPE]
#define g77_ulongint_type_node c_global_trees[CTI_G77_ULONGINT_TYPE]
/* Pointer to function to generate the VAR_DECL for __FUNCTION__ etc.
ID is the identifier to use, NAME is the string.
TYPE_DEP indicates whether it depends on type of the function or not

View File

@ -3034,6 +3034,55 @@ init_decl_processing ()
= build_function_type (ptr_type_node,
tree_cons (NULL_TREE, ptr_type_node, endlink));
/* Types which are common to the fortran compiler and libf2c. When
changing these, you also need to be concerned with f/com.h. */
if (TYPE_PRECISION (float_type_node)
== TYPE_PRECISION (long_integer_type_node))
{
g77_integer_type_node = long_integer_type_node;
g77_uinteger_type_node = long_unsigned_type_node;
}
else if (TYPE_PRECISION (float_type_node)
== TYPE_PRECISION (integer_type_node))
{
g77_integer_type_node = integer_type_node;
g77_uinteger_type_node = unsigned_type_node;
}
else
g77_integer_type_node = g77_uinteger_type_node = NULL_TREE;
if (g77_integer_type_node != NULL_TREE)
{
pushdecl (build_decl (TYPE_DECL, get_identifier ("__g77_integer"),
g77_integer_type_node));
pushdecl (build_decl (TYPE_DECL, get_identifier ("__g77_uinteger"),
g77_uinteger_type_node));
}
if (TYPE_PRECISION (float_type_node) * 2
== TYPE_PRECISION (long_integer_type_node))
{
g77_longint_type_node = long_integer_type_node;
g77_ulongint_type_node = long_unsigned_type_node;
}
else if (TYPE_PRECISION (float_type_node) * 2
== TYPE_PRECISION (long_long_integer_type_node))
{
g77_longint_type_node = long_long_integer_type_node;
g77_ulongint_type_node = long_long_unsigned_type_node;
}
else
g77_longint_type_node = g77_ulongint_type_node = NULL_TREE;
if (g77_longint_type_node != NULL_TREE)
{
pushdecl (build_decl (TYPE_DECL, get_identifier ("__g77_longint"),
g77_longint_type_node));
pushdecl (build_decl (TYPE_DECL, get_identifier ("__g77_ulongint"),
g77_ulongint_type_node));
}
builtin_function ("__builtin_aggregate_incoming_address",
build_function_type (ptr_type_node, NULL_TREE),
BUILT_IN_AGGREGATE_INCOMING_ADDRESS,