An early draft of the GOP tax reform bill contained this provision, as reported by taxfoundation.org:
The Senate draft of the Tax Cuts and Jobs Act would require sellers of stock in any one company to dispose of shares in the order they were acquired. Sellers could no longer designate which blocks of their shares they wished to sell to minimize capital gains taxes. The new rule would be “first in, first out” (FIFO).
Did this provision survive in the final bill, and if so, does it apply to ETFs as well as company stocks?