Nothing will happen. It will fail.
Stockpile stores up energy for the user and has no secondary effect. The maximum number of Stockpiles the user can hold is three. If used after the third count, it will fail.
If Spit Up is used after Stockpiling, it will inflict damage according to the number of times Stockpile was used, and the Stockpile count will be reset. If Swallow is used after Stockpiling, the user will heal HP according to the number of times Stockpile was used, and the Stockpile count will be reset.
Both Spit Up and Swallow will fail if Stockpile has not been used before selecting.
In this generation, Stockpile's PP is 10.
Generation IV and on
In addition to its previous effects, Stockpile gains a secondary effect of raising the user's Defense stat and Special Defense stat by one stage each after Stockpiling. Once the user has used Spit Up or Swallow, the increase in Defense and Special Defense are lost.
In addition, Stockpile's PP is raised to 20.