GLSL spec defaults to 'core' profile if the profile tag is missing. A profile tag shall be appended to the #version directive if GLSL >= 150.
fbbc153150faecdaa7f37c15eb03fc484276bb40
See 'The OpenGL Shading Language' Language Version 4.40, Document Revision 9, 2014-06-16, Chapter 3.3 p18.