-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HyperobjectType needs to copy dependence flags from parameters
- Loading branch information
1 parent
3d3c7bb
commit aee817f
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// RUN: %clang_cc1 %s -x c++ -fopencilk -emit-llvm -verify -mllvm -use-opencilk-runtime-bc=false -mllvm -debug-abi-calls -o /dev/null | ||
#define DEPTH 3 | ||
template<int N> struct R { | ||
static void identity(void *); | ||
static void reduce(void *, void *); | ||
int get(int depth) { return depth <= 0 ? i : field.get(depth - 1); } | ||
public: | ||
R<N - 1> field; | ||
// expected-note@-1{{in instantiation}} | ||
// expected-note@-2{{in instantiation}} | ||
// expected-note@-3{{in instantiation}} | ||
int _Hyperobject(identity, reduce) i; | ||
// expected-warning@-1{{reducer callbacks not implemented for structure members}} | ||
// expected-warning@-2{{reducer callbacks not implemented for structure members}} | ||
// expected-warning@-3{{reducer callbacks not implemented for structure members}} | ||
}; | ||
|
||
template<> struct R<0> { int field; int get(int) { return field; } }; | ||
|
||
extern R<DEPTH> r; | ||
|
||
int f() { return r.get(DEPTH / 2); } | ||
// expected-note@-1{{in instantiation}} | ||
// expected-note@-2{{in instantiation}} | ||
// expected-note@-3{{in instantiation}} | ||
|