/*
 * [config]
 * expect_result: fail
 * glsl_version: 1.50
 * require_extensions: GL_ARB_shader_image_load_store
 * [end config]
 */
#version 150
#extension GL_ARB_shader_image_load_store: require

/*
 * From the ARB_shader_image_load_store spec:
 *
 * "It is an error to pass an image variable qualified with 'readonly'
 *  to imageStore() or other built-in functions that modify image
 *  memory."
 *
 * Call a built-in function on a readonly qualified image.
 */
layout(r32i) readonly uniform iimage1D img;

void main()
{
    imageAtomicOr(img , int(0) , int(0));
}
