From 44433db051a923a6e32baa8e448ec8cf5a88f5f8 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Tue, 9 Jun 2015 00:10:35 +0200 Subject: lto-streamer-out.c (lto_output_location): Stream reserved locations correctly. * lto-streamer-out.c (lto_output_location): Stream reserved locations correctly. * lto-streamer-in.c (lto_output_location): Likewise. From-SVN: r224251 --- gcc/lto-streamer-in.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'gcc/lto-streamer-in.c') diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c index b4070de..7729b6c 100644 --- a/gcc/lto-streamer-in.c +++ b/gcc/lto-streamer-in.c @@ -272,12 +272,13 @@ lto_location_cache::input_location (location_t *loc, struct bitpack_d *bp, gcc_assert (current_cache == this); - if (bp_unpack_value (bp, 1)) - { - *loc = UNKNOWN_LOCATION; - return; - } - *loc = BUILTINS_LOCATION + 1; + *loc = bp_unpack_int_in_range (bp, "location", 0, RESERVED_LOCATION_COUNT); + + if (*loc < RESERVED_LOCATION_COUNT) + return; + + /* Keep value RESERVED_LOCATION_COUNT in *loc as linemap lookups will + ICE on it. */ file_change = bp_unpack_value (bp, 1); line_change = bp_unpack_value (bp, 1); -- cgit v1.1