backport fix for PR65735

	PR tree-optimization/65735
	* tree-ssa-threadedge.c (fsm_find_control_statement_thread_paths):
	Remove visited_phis argument, add visited_bbs, avoid recursing into the
	same bb rather than just into the same phi node.
	(thread_through_normal_block): Adjust caller.

	* gcc.c-torture/compile/pr65735.c: New test.
2 files changed
tree: 4fff0a4fcd02fcdc01c0fbc0b0435b4be334a002
  1. gcc-4.8/
  2. gcc-4.9/
  3. build-gcc.sh
  4. build.py