]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR lto/42531 (FAIL: gcc.c-torture/compile/20011119-1.c)
authorDave Korn <dave.korn.cygwin@gmail.com>
Wed, 30 Dec 2009 23:20:55 +0000 (23:20 +0000)
committerDave Korn <davek@gcc.gnu.org>
Wed, 30 Dec 2009 23:20:55 +0000 (23:20 +0000)
PR lto/42531
* lto-streamer-out.c (produce_asm): Skip any leading asterisk when
using DECL_ASSEMBLER_NAME to generate a section name.
(copy_function): Likewise.

From-SVN: r155528

gcc/ChangeLog
gcc/lto-streamer-out.c

index 7263ff84f185d082e617477a206611cbb30433ad..7a9eab0d7055700a6dbc2250aee9072f7974093f 100644 (file)
@@ -1,3 +1,10 @@
+2009-12-30  Dave Korn  <dave.korn.cygwin@gmail.com>
+
+       PR lto/42531
+       * lto-streamer-out.c (produce_asm): Skip any leading asterisk when
+       using DECL_ASSEMBLER_NAME to generate a section name.
+       (copy_function): Likewise.
+
 2009-12-30  Andreas Schwab  <schwab@linux-m68k.org>
 
        PR target/42516
index f81ff7278ef3210d8c5b5ce2a8cb9699e5107c58..1f9c2e05bb036271618679fd034b4e2d9756450e 100644 (file)
@@ -1784,6 +1784,8 @@ produce_asm (struct output_block *ob, tree fn)
   if (section_type == LTO_section_function_body)
     {
       const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (fn));
+      if (name[0] == '*')
+       name++;
       section_name = lto_get_section_name (section_type, name);
     }
   else
@@ -2007,11 +2009,16 @@ copy_function (struct cgraph_node *node)
   const char *data;
   size_t len;
   const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (function));
-  char *section_name =
-    lto_get_section_name (LTO_section_function_body, name);
+  char *section_name;
   size_t i, j;
   struct lto_in_decl_state *in_state;
-  struct lto_out_decl_state *out_state = lto_get_out_decl_state ();
+  struct lto_out_decl_state *out_state;
+
+  if (name[0] == '*')
+    name++;
+  section_name =
+    lto_get_section_name (LTO_section_function_body, name);
+  out_state = lto_get_out_decl_state ();
 
   lto_begin_section (section_name, !flag_wpa);
   free (section_name);