Message ID | 20140124154419.GQ892@tucnak.redhat.com |
---|---|
State | New |
Headers | show |
--- gcc/input.c.jj 2014-01-24 16:32:34.000000000 +0100 +++ gcc/input.c 2014-01-24 16:41:42.012671452 +0100 @@ -698,7 +698,13 @@ location_get_source_line (expanded_locat static char *buffer; static ssize_t len; - fcache * c = lookup_or_add_file_to_cache_tab (xloc.file); + if (xloc.line == 0) + return NULL; + + fcache *c = lookup_or_add_file_to_cache_tab (xloc.file); + if (c == NULL) + return NULL; + bool read = read_line_num (c, xloc.line, &buffer, &len); if (read && line_len)