pure-c / purec

C backend for PureScript
232 stars 8 forks source link

GC issues under clang compile time optimizations #20

Closed felixSchl closed 3 years ago

felixSchl commented 6 years ago

Branch bug/clang-opts demonstrates a minimal program to reproduce GC issues due to compile time optimization (any level of optimization appears to trigger this). Note that the various random seeming pure units need to be there to trigger the issue. I have a hunch it's related to type-classes (or hash maps, more generally speaking) - hence the monomorphic versions of bind, pure, and discard for Effect.)

For example, on my machine the example program prints: "test: append" as opposed to "test: quark", for example when compiled with -O3.

felixSchl commented 3 years ago

The code has been changed drastically since this was first opened and is likely no longer relevant. Closing.