Goldcorp Inc. (TSX: G, NYSE: GG) flipped to a profit in the second quarter and trimmed its guidance for costs in 2017.