diff gcc/lto/lto-lang.c @ 63:b7f97abdc517 gcc-4.6-20100522

update gcc from gcc-4.5.0 to gcc-4.6
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Mon, 24 May 2010 12:47:05 +0900
parents 77e2b8dfacca
children f6334be47118
line wrap: on
line diff
--- a/gcc/lto/lto-lang.c	Fri Feb 12 23:41:23 2010 +0900
+++ b/gcc/lto/lto-lang.c	Mon May 24 12:47:05 2010 +0900
@@ -616,14 +616,15 @@
 
 const char *resolution_file_name;
 static int
-lto_handle_option (size_t scode, const char *arg, int value ATTRIBUTE_UNUSED)
+lto_handle_option (size_t scode, const char *arg,
+		   int value ATTRIBUTE_UNUSED, int kind ATTRIBUTE_UNUSED)
 {
   enum opt_code code = (enum opt_code) scode;
   int result = 1;
 
   switch (code)
     {
-    case OPT_fresolution:
+    case OPT_fresolution_:
       resolution_file_name = arg;
       result = 1;
       break;
@@ -632,6 +633,14 @@
       warn_psabi = value;
       break;
 
+    case OPT_fsigned_char:
+      flag_signed_char = value;
+      break;
+
+    case OPT_funsigned_char:
+      flag_signed_char = !value;
+      break;
+
     default:
       break;
     }
@@ -1010,6 +1019,12 @@
       uintmax_type_node = long_unsigned_type_node;
       signed_size_type_node = long_integer_type_node;
     }
+  else if (strcmp (SIZE_TYPE, "long long unsigned int") == 0)
+    {
+      intmax_type_node = long_long_integer_type_node;
+      uintmax_type_node = long_long_unsigned_type_node;
+      signed_size_type_node = long_long_integer_type_node;
+    }
   else
     gcc_unreachable ();
 
@@ -1031,13 +1046,16 @@
   linemap_add (line_table, LC_RENAME, 0, NULL, 0);
 
   /* Create the basic integer types.  */
-  build_common_tree_nodes (flag_signed_char, /*signed_sizetype=*/false);
+  build_common_tree_nodes (flag_signed_char);
 
   /* Share char_type_node with whatever would be the default for the target.
      char_type_node will be used for internal types such as
      va_list_type_node but will not be present in the lto stream.  */
+  /* ???  This breaks the more common case of consistent but non-standard
+     setting of flag_signed_char, so share according to flag_signed_char.
+     See PR42528.  */
   char_type_node
-    = DEFAULT_SIGNED_CHAR ? signed_char_type_node : unsigned_char_type_node;
+    = flag_signed_char ? signed_char_type_node : unsigned_char_type_node;
 
   /* Tell the middle end what type to use for the size of objects.  */
   if (strcmp (SIZE_TYPE, "unsigned int") == 0)
@@ -1050,6 +1068,11 @@
       set_sizetype (long_unsigned_type_node);
       size_type_node = long_unsigned_type_node;
     }
+  else if (strcmp (SIZE_TYPE, "long long unsigned int") == 0)
+    {
+      set_sizetype (long_long_unsigned_type_node);
+      size_type_node = long_long_unsigned_type_node;
+    }
   else
     gcc_unreachable ();
 
@@ -1147,11 +1170,11 @@
 #define LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE lto_format_attribute_table
 
 #undef LANG_HOOKS_BEGIN_SECTION
-#define LANG_HOOKS_BEGIN_SECTION lto_elf_begin_section
+#define LANG_HOOKS_BEGIN_SECTION lto_obj_begin_section
 #undef LANG_HOOKS_APPEND_DATA
-#define LANG_HOOKS_APPEND_DATA lto_elf_append_data
+#define LANG_HOOKS_APPEND_DATA lto_obj_append_data
 #undef LANG_HOOKS_END_SECTION
-#define LANG_HOOKS_END_SECTION lto_elf_end_section
+#define LANG_HOOKS_END_SECTION lto_obj_end_section
 
 #undef LANG_HOOKS_INIT_TS
 #define LANG_HOOKS_INIT_TS lto_init_ts