Hi,
Looks like a bug. If I add the struct A definition above the struct B definition, then it compiles. But, that is not in line with what I’d expect considering c/c++ behavior(Just need the definition somewhere as long as it’s forward declared).
The below code compiles for what it’s worth. Thanks for reporting this and can you please create an issue on github?
----- test.ispc
// forward declaration of A
struct A;
// definition of A
struct A
{
int mX;
};
struct B
{
uniform A * uniform mA;
};
export void
run()
{
B b;
// BUG: this does not compile ???
b.mA->mX = 3;
// but this is fine
// uniform A * uniform a2 = b.mA;
// a2->mX = 3;
}
Thanks,
Deepak
--
You received this message because you are subscribed to the Google Groups "Intel SPMD Program Compiler Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
ispc-users+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ispc-users/6a1365c5-9aa1-4759-9364-0b7544eef5ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to ispc-...@googlegroups.com.
Yeah. That looks like the same issue. I’ll update #284 once I look into it.
Thanks for pointing it out.
-Deepak
To unsubscribe from this group and stop receiving emails from it, send an email to
ispc-users+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ispc-users/f52e6060-42e5-4ebb-a9dc-710d066cc2e5%40googlegroups.com.