emscripten-core / emscripten-core/emscripten
Code compiling on -O1 but not on -O3
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
Please include the following in your bug report:
**Version of emscripten/emsdk:**
2.0.6
em++ arguments being used
-O3 -std=c++17 -pthread -s FETCH=1 -s WASM=1 -s NO_EXIT_RUNTIME -s INITIAL_MEMORY=1000MB -s USE_PTHREADS=1 -s PTHREAD_POOL_SIZE=20 -s \"EXTRA_EXPORTED_RUNTIME_METHODS=['ccall']\" -s DISABLE_EXCEPTION_CATCHING=0 --bind
**Failing command line in full:**
Fatal: local.get of unknown in arg0 of call to emscripten_asm_const_int (used by EM_ASM* macros) in function 8078.
This might be caused by aggressive compiler transformations. Consider using EM_JS instead.
The similar issue I could find online is this [mail archive](https://www.mail-archive.com/emscripten-discuss@googlegroups.com/msg09285.html) where they get a similar issue where O3 build gives the same error as O1
Contributor guide
Assessment
This issue has not been assessed yet.