With stratospheric flight or martian exploration in perspective, the compressibility influence on the wake dynamics of a NACA0012 profile is investigated. The unsteady flow past the airfoil at is characterized using direct numerical simulations for various angles of attack and Mach numbers up to . Steady flows obtained using the selective frequency damping (SFD) technique are used as base states for a global linear stability analysis. The influence of both the angle of attack and the Reynolds number on the most amplified mode characteristics is first investigated in the incompressible regime. Then, the compressibility effects in the subcritical regime are considered. A stabilizing or a destabilizing effect of compressibility is observed depending on the angle of attack and the Reynolds number. For , compressibility has a destabilizing effect close to the critical threshold, which results in an earlier Hopf bifurcation, whereas increasing the Mach number always results in a decrease of the growth rate of the mode well above the critical threshold. Finally, the mode frequency decreases with the Mach number.