aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-streamer-out.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2011-02-03 11:49:06 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2011-02-03 11:49:06 +0100
commit7d58701c40deacbfe57540f7e96ef2a60334880d (patch)
tree8f105a12f97685d36faec6cfd024477671d08a7e /gcc/lto-streamer-out.c
parent89843f5dfbb0b867f42c7743a8691ebe5bb35682 (diff)
downloadgcc-7d58701c40deacbfe57540f7e96ef2a60334880d.zip
gcc-7d58701c40deacbfe57540f7e96ef2a60334880d.tar.gz
gcc-7d58701c40deacbfe57540f7e96ef2a60334880d.tar.bz2
re PR lto/47274 (ICE in lto_varpool_replace_node, at lto-symtab.c:306)
PR lto/47274 * lto-streamer-out.c (write_symbol): When writing kind and visibility, copy them into a unsigned char variable and pass address of it to lto_output_data_stream. From-SVN: r169785
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r--gcc/lto-streamer-out.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index e471d70..d1aac23 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -2410,6 +2410,7 @@ write_symbol (struct lto_streamer_cache_d *cache,
int slot_num;
uint64_t size;
const char *comdat;
+ unsigned char c;
/* None of the following kinds of symbols are needed in the
symbol table. */
@@ -2505,8 +2506,10 @@ write_symbol (struct lto_streamer_cache_d *cache,
lto_output_data_stream (stream, name, strlen (name) + 1);
lto_output_data_stream (stream, comdat, strlen (comdat) + 1);
- lto_output_data_stream (stream, &kind, 1);
- lto_output_data_stream (stream, &visibility, 1);
+ c = (unsigned char) kind;
+ lto_output_data_stream (stream, &c, 1);
+ c = (unsigned char) visibility;
+ lto_output_data_stream (stream, &c, 1);
lto_output_data_stream (stream, &size, 8);
lto_output_data_stream (stream, &slot_num, 4);
}