Crazy Pontiac

Hi, I was accelerating on a highway today when my car’s warning lights suddenly started flicking on and off and the transmission started shifting up and down erratically. I pulled over the car and it died, and died again when shifted from park into gear. The speedometer was maxed out to 120 mph, with the car sitting still. I checked fluids and turned off my air conditioner. Upon pulling back on the highway the speedometer reset, no more flashing warning lights, and normal shifting…Any thoughts? Thanks.

That MAY be an electrical glich. PCM?

CEL come on? Any codes?

Year/mileage/engine/standard or auto?