14 lines
408 B
D
Raw Normal View History

2022-07-15 14:33:44 +02:00
// { dg-require-effective-target shared }
// { dg-options "-shared-libphobos" }
// { dg-shouldfail "unknowngc" }
// { dg-output "No GC was initialized, please recheck the name of the selected GC \\('unknowngc'\\)." }
import core.memory;
2022-07-15 14:33:44 +02:00
extern(C) __gshared string[] rt_options = [ "gcopt=gc:unknowngc" ];
void main()
{
// GC initialized upon first call -> Unknown GC error is thrown
GC.enable();
2022-07-15 14:33:44 +02:00
}