aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorChris Demetriou <cgd@sibyte.com>2000-05-18 17:53:04 +0000
committerRichard Henderson <rth@gcc.gnu.org>2000-05-18 10:53:04 -0700
commit7aba5a5ff92706b3db2ef3bfa8df22ea14bc2118 (patch)
treec3ae46a413ca81be9f5e82070f7c0313b25dbf07 /gcc/c-decl.c
parent91542396a697108f57f553951d6ff7c0c03c38d8 (diff)
downloadgcc-7aba5a5ff92706b3db2ef3bfa8df22ea14bc2118.zip
gcc-7aba5a5ff92706b3db2ef3bfa8df22ea14bc2118.tar.gz
gcc-7aba5a5ff92706b3db2ef3bfa8df22ea14bc2118.tar.bz2
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
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 040b695..d1393d4 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -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,