Projet_SETI_RISC-V/riscv-gnu-toolchain/gcc/libphobos/testsuite/libphobos.exceptions/unknown_gc.d
2023-03-06 14:48:14 +01:00

13 lines
408 B
D

// { 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;
extern(C) __gshared string[] rt_options = [ "gcopt=gc:unknowngc" ];
void main()
{
// GC initialized upon first call -> Unknown GC error is thrown
GC.enable();
}