Files
ispc/tests_errors/goto-4.ispc
Matt Pharr 78c6d3c02f Add initial support for 'goto' statements.
ispc now supports goto, but only under uniform control flow--i.e.
it must be possible for the compiler to statically determine that
all program instances will follow the goto.  An error is issued at
compile time if a goto is used when this is not the case.
2012-01-05 12:22:36 -08:00

11 lines
142 B
Plaintext

// "goto" statements are only legal under "uniform" control flow
void func(int x) {
label:
for(int i =0 ;i<x;)
goto label;
}