#include "intl.h"
#include "ggc.h"
#include "graph.h"
-#include "loop.h"
#include "regs.h"
#include "timevar.h"
#include "diagnostic.h"
#include "target.h"
#include "langhooks.h"
#include "cfglayout.h"
-#include "tree-alias-common.h"
#include "cfgloop.h"
#include "hosthooks.h"
#include "cgraph.h"
#include "coverage.h"
#include "value-prof.h"
#include "alloc-pool.h"
+#include "tree-mudflap.h"
#if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
#include "dwarf2out.h"
or 0 if between functions. */
tree current_function_decl;
-/* Set to the FUNC_BEGIN label of the current function, or NULL_TREE
+/* Set to the FUNC_BEGIN label of the current function, or NULL
if none. */
-tree current_function_func_begin_label;
+const char * current_function_func_begin_label;
/* Temporarily suppress certain warnings.
This is set while reading code from a system header file. */
int flag_complex_divide_method = 0;
-/* Nonzero means performs web construction pass. When flag_web ==
- AUTODETECT_FLAG_VAR_TRACKING it will be set according to optimize
- and default_debug_hooks in process_options (). */
-
-int flag_web = AUTODETECT_FLAG_VAR_TRACKING;
-
/* Nonzero means that we don't want inlining by virtue of -fno-inline,
not just because the tree inliner turned us off. */
one, unconditionally renumber instruction UIDs. */
int flag_renumber_insns = 1;
-/* Enable points-to analysis on trees. */
-enum pta_type flag_tree_points_to = PTA_NONE;
-
/* Nonzero if we should track variables. When
flag_var_tracking == AUTODETECT_FLAG_VAR_TRACKING it will be set according
to optimize, debug_info_level and debug_hooks in process_options (). */
FILE *asm_out_file;
FILE *aux_info_file;
FILE *dump_file = NULL;
-FILE *cgraph_dump_file = NULL;
+char *dump_file_name;
/* The current working directory of a translation. It's generally the
directory from which compilation was initiated, but a preprocessed
if (*endp != 0)
{
if (pname != 0)
- error ("invalid option argument `%s'", pname);
+ error ("invalid option argument %qs", pname);
return defval;
}
&& DECL_INITIAL (decl) == 0
&& DECL_EXTERNAL (decl)
&& ! DECL_ARTIFICIAL (decl)
+ && ! TREE_NO_WARNING (decl)
&& ! TREE_PUBLIC (decl)
&& (warn_unused_function
|| TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))))
{
if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
- pedwarn ("%J'%F' used but never defined", decl, decl);
+ pedwarn ("%J%qF used but never defined", decl, decl);
else
- warning ("%J'%F' declared `static' but never defined", decl, decl);
+ warning ("%J%qF declared %<static%> but never defined",
+ decl, decl);
/* This symbol is effectively an "extern" declaration now. */
TREE_PUBLIC (decl) = 1;
assemble_external (decl);
&& ! (TREE_CODE (decl) == VAR_DECL && DECL_REGISTER (decl))
/* Otherwise, ask the language. */
&& lang_hooks.decls.warn_unused_global (decl))
- warning ("%J'%D' defined but not used", decl, decl);
+ warning ("%J%qD defined but not used", decl, decl);
/* Avoid confusing the debug information machinery when there are
errors. */
if (DECL_P (node))
{
expanded_location xloc = expand_location (DECL_SOURCE_LOCATION (node));
- warning ("`%s' is deprecated (declared at %s:%d)",
+ warning ("%qs is deprecated (declared at %s:%d)",
IDENTIFIER_POINTER (DECL_NAME (node)),
xloc.file, xloc.line);
}
const char *what = NULL;
tree decl = TYPE_STUB_DECL (node);
- if (TREE_CODE (TYPE_NAME (node)) == IDENTIFIER_NODE)
- what = IDENTIFIER_POINTER (TYPE_NAME (node));
- else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL
- && DECL_NAME (TYPE_NAME (node)))
- what = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (node)));
+ if (TYPE_NAME (node))
+ {
+ if (TREE_CODE (TYPE_NAME (node)) == IDENTIFIER_NODE)
+ what = IDENTIFIER_POINTER (TYPE_NAME (node));
+ else if (TREE_CODE (TYPE_NAME (node)) == TYPE_DECL
+ && DECL_NAME (TYPE_NAME (node)))
+ what = IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (node)));
+ }
if (decl)
{
expanded_location xloc
= expand_location (DECL_SOURCE_LOCATION (decl));
if (what)
- warning ("`%s' is deprecated (declared at %s:%d)", what,
+ warning ("%qs is deprecated (declared at %s:%d)", what,
xloc.file, xloc.line);
else
warning ("type is deprecated (declared at %s:%d)",
else
{
if (what)
- warning ("type is deprecated");
+ warning ("%qs is deprecated", what);
else
- warning ("`%s' is deprecated", what);
+ warning ("type is deprecated");
}
}
}
{
/* Initialize yet another pass. */
+ init_cgraph ();
init_final (main_input_filename);
coverage_init (aux_base_name);
functions in this compilation unit were deferred. */
coverage_finish ();
+ /* Likewise for mudflap static object registrations. */
+ if (flag_mudflap)
+ mudflap_finish_file ();
+
/* Write out any pending weak symbol declarations. */
weak_finish ();
#endif
if (!valid_target_option)
- error ("invalid option `%s'", name);
+ error ("invalid option %qs", name);
}
/* Print version information to FILE.
else
asm_out_file = fopen (asm_file_name, "w+b");
if (asm_out_file == 0)
- fatal_error ("can't open %s for writing: %m", asm_file_name);
+ fatal_error ("can%'t open %s for writing: %m", asm_file_name);
}
#ifdef IO_BUFFER_SIZE
goto make_message;
}
}
- abort ();
+ gcc_unreachable ();
}
data += sizeof (target_flags);
len -= sizeof (target_flags);
make_message:
{
char *r;
- asprintf (&r, _("created and used with differing settings of `-m%s'"),
+ asprintf (&r, _("created and used with differing settings of '-m%s'"),
flag_that_differs);
if (r == NULL)
return _("out of memory");
if (flag_unroll_all_loops)
flag_unroll_loops = 1;
- if (flag_unroll_loops)
- {
- flag_old_unroll_loops = 0;
- flag_old_unroll_all_loops = 0;
- }
-
- if (flag_old_unroll_all_loops)
- flag_old_unroll_loops = 1;
-
- /* Old loop unrolling requires that strength_reduction be on also. Silently
- turn on strength reduction here if it isn't already on. Also, the loop
- unrolling code assumes that cse will be run after loop, so that must
- be turned on also. */
- if (flag_old_unroll_loops)
- {
- flag_strength_reduce = 1;
- flag_rerun_cse_after_loop = 1;
- }
+ /* The loop unrolling code assumes that cse will be run after loop. */
if (flag_unroll_loops || flag_peel_loops)
flag_rerun_cse_after_loop = 1;
warning ("this target machine does not have delayed branches");
#endif
- if (flag_tree_based_profiling && flag_test_coverage)
- sorry ("test-coverage not yet implemented in trees.");
if (flag_tree_based_profiling && flag_profile_values)
sorry ("value-based profiling not yet implemented in trees.");
debug_type_names[write_symbols]);
/* Now we know which debug output will be used so we can set
- flag_var_tracking, flag_rename_registers and flag_web if the user has
+ flag_var_tracking, flag_rename_registers if the user has
not specified them. */
if (debug_info_level < DINFO_LEVEL_NORMAL
|| debug_hooks->var_location == do_nothing_debug_hooks.var_location)
flag_rename_registers = default_debug_hooks->var_location
!= do_nothing_debug_hooks.var_location;
- if (flag_web == AUTODETECT_FLAG_VAR_TRACKING)
- flag_web = optimize >= 2 && (default_debug_hooks->var_location
- != do_nothing_debug_hooks.var_location);
-
if (flag_var_tracking == AUTODETECT_FLAG_VAR_TRACKING)
flag_var_tracking = optimize >= 1;
{
aux_info_file = fopen (aux_info_file_name, "w");
if (aux_info_file == 0)
- fatal_error ("can't open %s: %m", aux_info_file_name);
+ fatal_error ("can%'t open %s: %m", aux_info_file_name);
}
if (! targetm.have_named_sections)
{
location_t save_loc = input_location;
if (dump_base_name == 0)
- dump_base_name = name ? name : "gccdump";
+ dump_base_name = name && name[0] ? name : "gccdump";
/* Other front-end initialization. */
#ifdef USE_MAPPED_LOCATION
front end is initialized. */
init_eh ();
init_optabs ();
- init_optimization_passes ();
/* The following initialization functions need to generate rtl, so
provide a dummy function context for them. */