summaryrefslogtreecommitdiff
path: root/gcc/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/input.c')
-rw-r--r--gcc/input.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/input.c b/gcc/input.c
index 52dde0bc97e..c88e4c0c448 100644
--- a/gcc/input.c
+++ b/gcc/input.c
@@ -51,6 +51,13 @@ expand_location_1 (source_location loc,
expanded_location xloc;
const struct line_map *map;
enum location_resolution_kind lrk = LRK_MACRO_EXPANSION_POINT;
+ tree block = NULL;
+
+ if (IS_ADHOC_LOC (loc))
+ {
+ block = LOCATION_BLOCK (loc);
+ loc = LOCATION_LOCUS (loc);
+ }
memset (&xloc, 0, sizeof (xloc));
@@ -74,6 +81,7 @@ expand_location_1 (source_location loc,
xloc = linemap_expand_location (line_table, map, loc);
}
+ xloc.data = block;
if (loc <= BUILTINS_LOCATION)
xloc.file = loc == UNKNOWN_LOCATION ? NULL : _("<built-in>");