11 lines · plain
1// RUN: %clang_cc1 %s -fsyntax-only -verify -triple spir-unknown-unknown2 3#pragma OPENCL EXTENSION cl_khr_fp16 : enable4 5constant half a = 1.0h; 6constant half aa = 1.0H;7constant half b = 1.0hh; // expected-error{{invalid suffix 'hh' on floating constant}}8constant half c = 1.0fh; // expected-error{{invalid suffix 'fh' on floating constant}}9constant half d = 1.0lh; // expected-error{{invalid suffix 'lh' on floating constant}}10constant half e = 1.0hf; // expected-error{{invalid suffix 'hf' on floating constant}}11