From: Jakub Jelinek Date: Fri, 28 Nov 2014 17:05:34 +0000 (+0100) Subject: backport: re PR preprocessor/60436 (C preprocessor segfaults on assembly file) X-Git-Tag: releases/gcc-4.8.4~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c668eda1e7d68588eb7081e14d5b0ed80b13b649;p=thirdparty%2Fgcc.git backport: re PR preprocessor/60436 (C preprocessor segfaults on assembly file) Backported from mainline 2014-11-25 Jakub Jelinek PR preprocessor/60436 * line-map.c (linemap_line_start): If highest is above 0x60000000 and we are still tracking columns or highest is above 0x70000000, force add_map. From-SVN: r218168 --- diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 42cdc5c357b8..78117428e91d 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,13 @@ +2014-11-28 Jakub Jelinek + + Backported from mainline + 2014-11-25 Jakub Jelinek + + PR preprocessor/60436 + * line-map.c (linemap_line_start): If highest is above 0x60000000 + and we are still tracking columns or highest is above 0x70000000, + force add_map. + 2014-10-12 Bill Schmidt Backport from mainline r215873 diff --git a/libcpp/line-map.c b/libcpp/line-map.c index 125f08706b44..2425f5603ae0 100644 --- a/libcpp/line-map.c +++ b/libcpp/line-map.c @@ -527,10 +527,10 @@ linemap_line_start (struct line_maps *set, linenum_type to_line, && line_delta * ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) > 1000) || (max_column_hint >= (1U << ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map))) || (max_column_hint <= 80 - && ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) >= 10)) - { - add_map = true; - } + && ORDINARY_MAP_NUMBER_OF_COLUMN_BITS (map) >= 10) + || (highest > 0x60000000 + && (set->max_column_hint || highest > 0x70000000))) + add_map = true; else max_column_hint = set->max_column_hint; if (add_map) @@ -541,7 +541,7 @@ linemap_line_start (struct line_maps *set, linenum_type to_line, /* If the column number is ridiculous or we've allocated a huge number of source_locations, give up on column numbers. */ max_column_hint = 0; - if (highest >0x70000000) + if (highest > 0x70000000) return 0; column_bits = 0; }