aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-streamer-out.c
diff options
context:
space:
mode:
authorDave Korn <dave.korn.cygwin@gmail.com>2009-12-30 23:20:55 +0000
committerDave Korn <davek@gcc.gnu.org>2009-12-30 23:20:55 +0000
commit8589115b9cf39923208629a049f406b887c0cd3b (patch)
treefd8521d5f3456865a1dddcc8da023acb3c52f855 /gcc/lto-streamer-out.c
parent331fc6d84dc38acba2f660d84260f395a8e6cf29 (diff)
downloadgcc-8589115b9cf39923208629a049f406b887c0cd3b.zip
gcc-8589115b9cf39923208629a049f406b887c0cd3b.tar.gz
gcc-8589115b9cf39923208629a049f406b887c0cd3b.tar.bz2
re PR lto/42531 (FAIL: gcc.c-torture/compile/20011119-1.c)
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
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r--gcc/lto-streamer-out.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index f81ff72..1f9c2e0 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -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);