/*
 * [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 'writeonly'
 *  to imageLoad() or other built-in functions that read image
 *  memory."
 *
 * Call a built-in function on a writeonly qualified image.
 */
layout(r32i) writeonly uniform iimage1D img;

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