This compute shader works as expected:

Code :
#version 430 core
layout(local_size_x = 32) in;
shared int g_shared_data[32];
//...

This compute shader fails to compile with: 0(7) : error C0502: syntax error at token "shared"

Code :
#version 420 core
#extension GL_ARB_shader_storage_buffer_object : require
#extension GL_ARB_compute_shader : require
layout(local_size_x = 32) in;
shared int g_shared_data[32];
//...

Thanks.