Hello,
I've fixed the location issue by generating new STATEMENT_LIST_END tree for
each compound statement and using it to store the location of closing brace.
I do understand that it's rather an ugly workaround than a solution, but still
it resolves the issue for us and doesn't break GCC testsui
Hello,
>> But then, after lowering on the eh pass (gcc/tree-eh.c:1161), the "finally"
>> location is set up to the `gimple_location (tf->try_finally_expr)' which
>> actually expands to "testcase.cxx:4", a place where the "try" block starts.
>>
>> The dump testcase.cxx.009t.ehopt shows no location
> But then, after lowering on the eh pass (gcc/tree-eh.c:1161), the "finally"
> location is set up to the `gimple_location (tf->try_finally_expr)' which
> actually expands to "testcase.cxx:4", a place where the "try" block starts.
>
> The dump testcase.cxx.009t.ehopt shows no location info for des
Hello,
Recently I found that Address Sanitizer reports wrong line information for the
code using try-finally blocks:
1 #include
2 char *get_str() { return (char *) malloc(10); }
3 int main() {
4 std::unique_ptr l(new char);
5 l.reset(get_str());
6 get_str();
7 }
ASan report tells
#2