re PR c++/44366 ([C++0x] g++ crashes when declaring a lambda expression using a typed...
[platform/upstream/gcc.git] / gcc / toplev.c
index 6c20b3c..20da382 100644 (file)
@@ -208,10 +208,6 @@ tree current_function_decl;
    if none.  */
 const char * current_function_func_begin_label;
 
-/* Nonzero means to collect statistics which might be expensive
-   and to print them when we are done.  */
-int flag_detailed_statistics = 0;
-
 /* A random sequence of characters, unless overridden by user.  */
 static const char *flag_random_seed;
 
@@ -222,28 +218,6 @@ unsigned local_tick;
 
 /* -f flags.  */
 
-/* Nonzero means `char' should be signed.  */
-
-int flag_signed_char;
-
-/* Nonzero means give an enum type only as many bytes as it needs.  A value
-   of 2 means it has not yet been initialized.  */
-
-int flag_short_enums;
-
-/* Nonzero if structures and unions should be returned in memory.
-
-   This should only be defined if compatibility with another compiler or
-   with an ABI is needed, because it results in slower code.  */
-
-#ifndef DEFAULT_PCC_STRUCT_RETURN
-#define DEFAULT_PCC_STRUCT_RETURN 1
-#endif
-
-/* Nonzero for -fpcc-struct-return: return values the same way PCC does.  */
-
-int flag_pcc_struct_return = DEFAULT_PCC_STRUCT_RETURN;
-
 /* 0 means straightforward implementation of complex divide acceptable.
    1 means wide ranges of inputs must work for complex divide.
    2 means C99-like requirements for complex multiply and divide.  */
@@ -281,10 +255,6 @@ enum tls_model flag_tls_default = TLS_MODEL_GLOBAL_DYNAMIC;
 enum ira_algorithm flag_ira_algorithm = IRA_ALGORITHM_CB;
 enum ira_region flag_ira_region = IRA_REGION_MIXED;
 
-/* Set the default value for -fira-verbose.  */
-
-unsigned int flag_ira_verbose = 5;
-
 /* Set the default for excess precision.  */
 
 enum excess_precision flag_excess_precision_cmdline = EXCESS_PRECISION_DEFAULT;
@@ -772,17 +742,19 @@ wrapup_global_declaration_2 (tree decl)
     {
       struct varpool_node *node;
       bool needed = true;
-      node = varpool_node (decl);
+      node = varpool_get_node (decl);
 
-      if (node->finalized)
+      if (!node && flag_ltrans)
+       needed = false;
+      else if (node && node->finalized)
        needed = false;
-      else if (node->alias)
+      else if (node && node->alias)
        needed = false;
       else if (!cgraph_global_info_ready
               && (TREE_USED (decl)
                   || TREE_USED (DECL_ASSEMBLER_NAME (decl))))
        /* needed */;
-      else if (node->needed)
+      else if (node && node->needed)
        /* needed */;
       else if (DECL_COMDAT (decl))
        needed = false;
@@ -1655,7 +1627,7 @@ default_tree_printer (pretty_printer *pp, text_info *text, const char *spec,
 static void *
 realloc_for_line_map (void *ptr, size_t len)
 {
-  return ggc_realloc (ptr, len);
+  return GGC_RESIZEVAR (void, ptr, len);
 }
 
 /* A helper function: used as the allocator function for
@@ -1663,7 +1635,7 @@ realloc_for_line_map (void *ptr, size_t len)
 static void *
 alloc_for_identifier_to_locale (size_t len)
 {
-  return ggc_alloc (len);
+  return ggc_alloc_atomic (len);
 }
 
 /* Initialization of the front end environment, before command line
@@ -1731,7 +1703,7 @@ general_init (const char *argv0)
      table.  */
   init_ggc ();
   init_stringpool ();
-  line_table = GGC_NEW (struct line_maps);
+  line_table = ggc_alloc_line_maps ();
   linemap_init (line_table);
   line_table->reallocator = realloc_for_line_map;
   init_ttree ();
@@ -1948,14 +1920,14 @@ process_options (void)
       FILE *final_output = fopen (flag_dump_final_insns, "w");
       if (!final_output)
        {
-         error ("could not open final insn dump file %qs: %s",
-                flag_dump_final_insns, strerror (errno));
+         error ("could not open final insn dump file %qs: %m",
+                flag_dump_final_insns);
          flag_dump_final_insns = NULL;
        }
       else if (fclose (final_output))
        {
-         error ("could not close zeroed insn dump file %qs: %s",
-                flag_dump_final_insns, strerror (errno));
+         error ("could not close zeroed insn dump file %qs: %m",
+                flag_dump_final_insns);
          flag_dump_final_insns = NULL;
        }
     }