(In reply to Johannes Pfau from comment #12) > Smaller test case: > ---------------------------------------- > class ThreadError {} > void foo() > { > __gshared error = new ThreadError(); > } It took me a while to put two and two together, but the unnamed data would be created by ClassReferenceExp. Can certainly give it a proper anonymous name and unset the readonly flag on it.