Sun damage to vehicles here in AZ is common. However, guns left in a vehicle in summer time are dangerous to the owner - hot steel burns.
No, it won't melt, even though internal temps in a sealed vehicle in summer can soar past 170 degrees, (PLEASE stop leaving your dogs locked in your cars while going to the store!!!
!), I have never had any firearm, polymer or steel, fail in any way related to heat. No ammunition stored in the gun has "cooked off" or been degraded, but I always made it a point to replace carry ammo that had been stored in a hot place about every 6 months. Personal choice, no other reason.
I do not advocate a "trunk gun", darn hard to get to in a sudden dangerous place, LA style riot, etc.), and guns left permanently in cars are always subject to theft, but carrying a long gun on trips out of town isn't such a bad idea, in my not so humble opinion.