https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53770

--- Comment #3 from petschy at gmail dot com ---
Tried now w/ g++ 4.9.1 (Debian 4.9.1-19), and single stepping is still wrong.
The only difference is that it doesn't stop on ++f in line 30 after breaking
out  from the loop. However, all the other bugs are still there.

Also tested w/ g++-5.0 (8fe6ab3):
- in do_print(), the outer loop iteration is OK, it doesn't stop now on the
last printf line
- it still doesn't step on the break; on line 26
- but then continues correctly on line 36 after breaking out (was: line 30 ++f)
- the difference is still present between the templated and non-templated
versions: do_print2(), the non-templated version jumps from line 85 to 91 (the
break is still skipped), which is the closing brace of the loop. The templated
version jumps to the first statement after the loop, correctly.

$ g++-5.0.0 -v
Using built-in specs.
COLLECT_GCC=g++-5.0.0
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/5.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --enable-languages=c,c++ --disable-multilib
--program-suffix=-5.0.0
Thread model: posix
gcc version 5.0.0 20150203 (experimental) (GCC)

Reply via email to