/* com.c -- Implementation File (module.c template V1.0)
- Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Contributed by James Craig Burley.
#include "output.h" /* Must follow tree.h so TREE_CODE is defined! */
#include "convert.h"
#include "ggc.h"
-#include "defaults.h"
#endif /* FFECOM_targetCURRENT == FFECOM_targetGCC */
#define FFECOM_GCC_INCLUDE 1 /* Enable -I. */
# endif
#endif
-#ifndef RLIMIT_STACK
-# include <time.h>
-#else
-# if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-# else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
-# endif
+#ifdef RLIMIT_STACK
# include <sys/resource.h>
#endif
typedef struct { unsigned :16, :16, :16; } vms_ino_t;
#define ino_t vms_ino_t
#define INCLUDE_LEN_FUDGE 10 /* leave room for VMS syntax conversion */
-#ifdef __GNUC__
-#define BSTRING /* VMS/GCC supplies the bstring routines */
-#endif /* __GNUC__ */
#endif /* VMS */
#ifndef O_RDONLY
tmp = &space[0];
for (p = s, q = tmp; *p != '\0'; ++p, ++q)
- *q = ffesrc_toupper (*p);
+ *q = TOUPPER (*p);
*q = '\0';
t = build_string (i, tmp);
if (incremental)
{
- make_decl_rtl (decl, NULL, TREE_PUBLIC (decl) ? 1 : 0);
+ make_decl_rtl (decl, NULL);
assemble_variable (decl, TREE_PUBLIC (decl) ? 1 : 0, 0, 1);
}
TREE_STATIC (t) = TREE_STATIC (mt);
DECL_INITIAL (t) = NULL_TREE;
TREE_ASM_WRITTEN (t) = 1;
+ TREE_USED (t) = 1;
DECL_RTL (t)
= gen_rtx (MEM, TYPE_MODE (type),
/* Set up pointer types. */
if (ffecom_pointer_kind_ == FFEINFO_basictypeNONE)
- fatal ("no INTEGER type can hold a pointer on this configuration");
+ fatal_error ("no INTEGER type can hold a pointer on this configuration");
else if (0 && ffe_is_do_internal_checks ())
fprintf (stderr, "Pointer type kt=%d\n", ffecom_pointer_kind_);
ffetype_set_kind (ffeinfo_type (FFEINFO_basictypeINTEGER,
1, 0));
TREE_CONSTANT (glabel) = 1;
TREE_STATIC (glabel) = 1;
- DECL_CONTEXT (glabel) = 0;
+ DECL_CONTEXT (glabel) = current_function_decl;
DECL_INITIAL (glabel) = NULL;
- make_decl_rtl (glabel, NULL, 0);
+ make_decl_rtl (glabel, NULL);
expand_decl (glabel);
ffecom_save_tree_forever (glabel);
TREE_PUBLIC (decl) = 1;
if (library_name)
DECL_ASSEMBLER_NAME (decl) = get_identifier (library_name);
- make_decl_rtl (decl, NULL_PTR, 1);
+ make_decl_rtl (decl, NULL_PTR);
pushdecl (decl);
DECL_BUILT_IN_CLASS (decl) = class;
DECL_FUNCTION_CODE (decl) = function_code;
if (TREE_CODE (current_function_decl) != ERROR_MARK)
{
- make_function_rtl (current_function_decl);
+ make_decl_rtl (current_function_decl, NULL);
restype = TREE_TYPE (TREE_TYPE (current_function_decl));
DECL_RESULT (current_function_decl)
else
finput = fopen (filename, "r");
if (finput == 0)
- pfatal_with_name (filename);
+ fatal_io_error ("can't open %s", filename);
#ifdef IO_BUFFER_SIZE
setvbuf (finput, (char *) xmalloc (IO_BUFFER_SIZE), _IOFBF, IO_BUFFER_SIZE);
= chainon (current_binding_level->blocks, block);
}
-int
-lang_decode_option (argc, argv)
- int argc;
- char **argv;
-{
- return ffe_decode_option (argc, argv);
-}
+/* Each front end provides its own. */
+static void ffe_init PARAMS ((void));
+static void ffe_finish PARAMS ((void));
+static void ffe_init_options PARAMS ((void));
+
+struct lang_hooks lang_hooks = {ffe_init,
+ ffe_finish,
+ ffe_init_options,
+ ffe_decode_option,
+ NULL /* post_options */};
/* used by print-tree.c */
{
}
-void
-lang_finish ()
+static void
+ffe_finish ()
{
ffe_terminate_0 ();
return 0;
}
-void
-lang_init_options ()
+static void
+ffe_init_options ()
{
/* Set default options for Fortran. */
flag_move_all_movables = 1;
flag_complex_divide_method = 1;
}
-void
-lang_init ()
+static void
+ffe_init ()
{
/* If the file is output from cpp, it should contain a first line
`# 1 "real-filename"', and the current design of gcc (toplev.c
register tree block;
{
current_binding_level->this_block = block;
+ current_binding_level->names = chainon (current_binding_level->names,
+ BLOCK_VARS (block));
+ current_binding_level->blocks = chainon (current_binding_level->blocks,
+ BLOCK_SUBBLOCKS (block));
}
/* ~~gcc/tree.h *should* declare this, because toplev.c references it. */
dirtmp = (struct file_name_list *)
xmalloc (sizeof (struct file_name_list));
dirtmp->next = 0; /* New one goes on the end */
- if (spec[0] != 0)
- dirtmp->fname = spec;
- else
- fatal ("Directory name must immediately follow -I option with no intervening spaces, as in `-Idir', not `-I dir'");
+ dirtmp->fname = spec;
dirtmp->got_name_map = 0;
- append_include_chain (dirtmp, dirtmp);
+ if (spec[0] == 0)
+ error ("Directory name must immediately follow -I");
+ else
+ append_include_chain (dirtmp, dirtmp);
}
return 1;
}