let select_all_outputs proj kf pdg =
  let outputs = !Db.Outputs.get_external kf in
    debug 1 "selecting output zones %a@." Locations.Zone.pretty outputs;
  try
    let nodes, undef = !Db.Pdg.find_location_nodes_at_end pdg outputs in
    let nodes =
      try ((!Db.Pdg.find_ret_output_node pdg),None) :: nodes
      with Not_found -> nodes
    in
    let nodes_and_co = ([], [], Some (nodes, undef)) in
    let to_select = add_nodes_and_undef_to_select false nodes_and_co [] in
      select_pdg_elements proj pdg to_select
  with Not_found -> (* end is unreachable *) ()