Re: try_finally_expr wrong source location info

2017-07-12 Thread Vyacheslav Barinov
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

Re: try_finally_expr wrong source location info

2017-06-13 Thread Vyacheslav Barinov
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

Re: try_finally_expr wrong source location info

2017-06-09 Thread Eric Botcazou
> 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

try_finally_expr wrong source location info

2017-06-09 Thread Vyacheslav Barinov
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