blob: 7e852ae70ebbda8894cd35f2b8e82bcb42d7dad4 [file] [log] [blame]
Stephen Hines0e2c34f2015-03-23 12:09:02 -07001// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL1.1
2
3void f1(double da) { // expected-error {{type 'double' requires cl_khr_fp64 extension}}
4 double d; // expected-error {{type 'double' requires cl_khr_fp64 extension}}
5 (void) 1.0; // expected-warning {{double precision constant requires cl_khr_fp64}}
6}
7
8#pragma OPENCL EXTENSION cl_khr_fp64 : enable
9
10void f2(void) {
11 double d;
12 (void) 1.0;
13}
14
15#pragma OPENCL EXTENSION cl_khr_fp64 : disable
16
17void f3(void) {
18 double d; // expected-error {{type 'double' requires cl_khr_fp64 extension}}
19}