diff options
author | Lewis Hyatt <lhyatt@gmail.com> | 2022-11-01 17:50:27 -0400 |
---|---|---|
committer | Lewis Hyatt <lhyatt@gmail.com> | 2022-11-15 10:50:23 -0500 |
commit | 6238cc20f0e588f272569230b33458fedf755ab2 (patch) | |
tree | 300f206677cf5b7b0739d258452779dd8c188f1c /gcc/fortran | |
parent | 3037f11fb86eda234a27ab26748958f71a805005 (diff) | |
download | gcc-6238cc20f0e588f272569230b33458fedf755ab2.zip gcc-6238cc20f0e588f272569230b33458fedf755ab2.tar.gz gcc-6238cc20f0e588f272569230b33458fedf755ab2.tar.bz2 |
diagnostics: Fix macro tracking for ad-hoc locations
The result of linemap_resolve_location() can be an ad-hoc location, if that is
what was stored in a relevant macro map. maybe_unwind_expanded_macro_loc()
did not previously handle this case, causing it to print the wrong tracking
information for an example such as the new testcase macro-trace-1.c. Fix that
by checking for ad-hoc locations where needed.
gcc/ChangeLog:
* tree-diagnostic.cc (maybe_unwind_expanded_macro_loc): Handle ad-hoc
location in return value of linemap_resolve_location().
gcc/testsuite/ChangeLog:
* c-c++-common/cpp/macro-trace-1.c: New test.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions