Hello and welcome to Just answer.com, Super mechanic here. About your vehicle.
The most likely thing that will give you a no start/no spark would be the ignition control module, in the Subaru it is sometimes called an ignitor. It will look like this, It is mounted on the side, top of wheel well.Images available only to Customers.
They are about $190 to get after market but you might want to check the connector at it just in case. What I would try to do, (being that it will probably test good by the time you got it out and to a place that could test it) would be to try cooling it down with some cold water when it is giving you the problem and see if that will start it, then you will know for sure.
REMEMBER, you don't have to ACCEPT until you are 100% satisfied with the answer. BUT, we don't get paid unless you hit the *ACCEPT* key.
You can also follow up after you ACCEPT, thanks