xref: /netbsd-src/external/gpl3/gcc/dist/libphobos/testsuite/libphobos.init_fini/test18996.d (revision b1e838363e3c6fc78a55519254d99869742dd33c)
1 // Issue https://issues.dlang.org/show_bug.cgi?id=18996
2 // Array!string calls removeRange without first adding the range, but never
3 // initializes the GC. The behavior of the default GC is to ignore removing
4 // ranges when the range wasn't added. The ProtoGC originally would crash when
5 // this happened.
6 
7 import core.memory;
8 
main()9 void main()
10 {
11     GC.removeRange(null);
12     GC.removeRoot(null);
13 }
14