Gap phenomenon for autonomous functionals