Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Pointer-to-local variable probably doesn't follow correct semantics #217

Closed
litherum opened this issue Oct 15, 2018 · 0 comments
Closed
Labels
Implementation Does not affect the specification

Comments

@litherum
Copy link
Contributor

Migrated from https://bugs.webkit.org/show_bug.cgi?id=179245

Imagine the following

thread int* foo(int x) {
int y = x;
return &y;
}

fragment void bar() {
thread int* z = foo(6);
*z = 7;
foo(8);
// Now, *z should equal 8.
}

Our instantiation will currently create a copy of foo() at the two call sites, thereby leading to two distinct "y" variables. This probably means the above doesn't lead to the correct result.

@litherum litherum changed the title WHLSL's pointer-to-local variable probably doesn't follow correct semantics Pointer-to-local variable probably doesn't follow correct semantics Oct 18, 2018
@litherum litherum added Implementation Does not affect the specification and removed Implementation Does not affect the specification labels Nov 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Implementation Does not affect the specification
Projects
None yet
Development

No branches or pull requests

1 participant