Issue 182496
Summary [OpenCL] Error building program when declaring a struct inside a switch statement
Labels new issue
Assignees
Reporter tpongo-afk
    When I declare a struct in a switch case block the build fails on my internal GPU as target but not on the CPU as target.

The output and build log:
```
Error building program: -11
Build log:
1:9:9: error: expected _expression_
        MyStruct data;
```

The code to reproduce the error:
```
typedef struct {
    int num;
} MyStruct;

__kernel void test() {
    int a = 0;
    switch(a) {
 case 0:
        MyStruct data;
    break;
    }
}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to