File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -955,8 +955,10 @@ bool CompilerInstance::ExecuteAction(FrontendAction &Act) {
955955 // Adjust target options based on codegen options.
956956 getTarget ().adjustTargetOptions (getCodeGenOpts (), getTargetOpts ());
957957
958- if (auto *Aux = getAuxTarget ())
958+ if (auto *Aux = getAuxTarget ()) {
959+ Aux->adjust (getLangOpts ());
959960 getTarget ().setAuxTarget (Aux);
961+ }
960962
961963 // rewriter project will change target built-in bool type from its default.
962964 if (getFrontendOpts ().ProgramAction == frontend::RewriteObjC)
Original file line number Diff line number Diff line change 1+ // RUN: %clang_cc1 -triple spir64 -aux-triple x86_64-linux-gnu -fsycl -fsycl-is-device -verify -fsyntax-only %s
2+ // RUN: %clang_cc1 -triple x86_64-linux-gnu -fsycl -fsycl-is-device -fsyntax-only %s
3+ // RUN: %clang_cc1 -triple spir64 -aux-triple x86_64-linux-gnu -fsycl -fsycl-is-device -fsyntax-only -mlong-double-64 %s
4+
5+ template <typename Name, typename Func>
6+ __attribute__ ((sycl_kernel)) void kernel(Func kernelFunc) {
7+ // expected-note@+1 {{called by 'kernel<variables}}
8+ kernelFunc ();
9+ }
10+
11+ // expected-note@+1 {{'foo' defined here}}
12+ void foo (long double A) {}
13+
14+ int main () {
15+ // expected-note@+1 {{'CapturedToDevice' defined here}}
16+ long double CapturedToDevice = 1 ;
17+ kernel<class variables >([=]() {
18+ // expected-error@+2 {{'foo' requires 128 bit size 'long double' type support, but device 'spir64' does not support it}}
19+ // expected-error@+1 {{'CapturedToDevice' requires 128 bit size 'long double' type support, but device 'spir64' does not support it}}
20+ foo (CapturedToDevice);
21+ });
22+
23+ return 0 ;
24+ }
You can’t perform that action at this time.
0 commit comments