Skip to content

[SYCL][GDB] Fix op[] when called with typedef argument #6459

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

Merged

Conversation

NCKempke
Copy link
Contributor

The implementation of 'index' did not strip typedefs from the argument
passed to it, when passed as a single number. Instead, TYPE_CODE_INT was
expected.

This leads to failures when calling 'accessor[arg]' using an arg that is
either a typedef or something like size_t, which are considered
TYPE_CODE_TYPEDEF inside GDB. The check fails and the function
continues on and fails even though the argument could have been used in
the int cast.

Typedef stripping was added to the if condition to fix this.

Signed-off-by: Nils-Christian Kempke [email protected]

The implementation of 'index' did not strip typedefs from the argument
passed to it, when passed as a single number.  Instead, TYPE_CODE_INT was
expected.

This leads to failures when calling 'accessor[arg]' using an arg that is
either a typedef or something like size_t, which are considered
TYPE_CODE_TYPEDEF inside GDB.  The check fails and the function
continues on and fails even though the argument could have been used in
the int cast.

Typedef stripping was added to the if condition to fix this.

Signed-off-by: Nils-Christian Kempke <[email protected]>
@NCKempke NCKempke requested a review from a team as a code owner July 20, 2022 15:22
@NCKempke NCKempke requested a review from v-klochkov July 20, 2022 15:22
@bader bader changed the title [SYCL][GDB]: Fix op[] when called with typedef argument [SYCL][GDB] Fix op[] when called with typedef argument Jul 29, 2022
@bader bader merged commit b7bfe39 into intel:sycl Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants