EDIT: This answer is more detailed than mine.
This is an example of a question covered by Rice's theorem. For example, the question of if a program outputs "Hello World" or not is covered by that theorem.
It also covers quantification over inputs (e.g. does program $P$ do $X$ on all input, does program $P$ do $X$ on some inputs, does program $P$ do $X$ on even inputs, etc...).
In particular, it states that in general, the problem is only semidecidable, just like the Halting problem.
EDIT: The theorem is only about what a program does, not its internals. So the question of "does a program ever get to line 7?" technically is not covered by the theorem. To get around this, just imagine that your interpreter/compiler prints out the line number it is currently on. Now the question is "does the program ever say it is on line 7?", which is a question about what it does, and therefore covered by Rice's theorem. You do not need to actually make the modification; just proving the possibility is enough.