1// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only
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}
20