What does Gfortran -std=legacy allow?

The Gfortran flag -std=legacy disables warning for very out of date non-standard Fortran syntax that should not be used anymore. However, where you are using a legacy package where the code isn’t being changed, using -std=legacy can be necessary, particularly for Gfortran ≥ 8.

Some of the syntax enabled by -std=legacy includes pre-Fortran 77 arbitrary length arrays, where A(1) was declared instead of A(*) in Fortran 77 or A(:) in modern Fortran.