Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array declaration with initialization in OKL causes segfault during parsing. #640

Open
kris-rowe opened this issue Dec 6, 2022 · 1 comment
Labels
bug Use this label when reporting bugs! CUDA DPC++ HIP OKL OpenCL parser priority Issues that are high priority for downstream projects

Comments

@kris-rowe
Copy link
Member

Details

In OKL code, using a variable in the initializer statement of array declaration causes the parser to segfault during translation for the "launched" backends (CUDA/HIP/OpenCL/SYCL).

Reproducer

The following OKL code can be used to reproduce the error at the command line by calling occa translate -m CUDA f.okl.

@kernel f() {
  @outer for (int o = 0; o < 1; ++o) {
    @inner for (int i = 0; i < 1; ++i) {
       int x = 0;
       // int y[2] = {1,2}; //okay
       int y[2] = {1,x}; //segfault
    }
  }
} 
@kris-rowe kris-rowe added bug Use this label when reporting bugs! parser OKL CUDA HIP OpenCL DPC++ labels Dec 6, 2022
@kris-rowe
Copy link
Member Author

Affects libCEED.

@kris-rowe kris-rowe added the priority Issues that are high priority for downstream projects label Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Use this label when reporting bugs! CUDA DPC++ HIP OKL OpenCL parser priority Issues that are high priority for downstream projects
Projects
None yet
Development

No branches or pull requests

1 participant