fork download
  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. #include <stddef.h>
  4. #include <string.h>
  5.  
  6. int main(void)
  7. {
  8. goto start;
  9.  
  10. test:
  11. {
  12. return 111;
  13. }
  14. test_end:
  15.  
  16. start:;
  17.  
  18. static const ptrdiff_t sz_test = (&&test_end - &&test);
  19.  
  20. fprintf(stderr, "%td %p %p %p", sz_test, main, (&&test), (&&test_end));
  21.  
  22. void* a = alloca(sz_test);
  23.  
  24. memcpy(a, (&&test), sz_test);
  25.  
  26. goto *a;
  27. end:
  28. return 0;
  29. }
Runtime error #stdin #stdout 0s 1784KB
stdin
Standard input is empty
stdout
Standard output is empty