1 // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94424 2 // { dg-additional-options "-fmain -funittest" } 3 // { dg-do run } 4 // { dg-skip-if "needs gcc/config.d" { ! d_runtime } } 5 @safe unittest 6 { 7 struct C 8 { 9 ubyte i; thisC10 this(ubyte i) { this.i = i; } 11 } 12 13 auto c1 = C(1); 14 auto c2 = C(2); 15 16 assert(__cmp([c1, c1][], [c2, c2][]) < 0); 17 assert(__cmp([c2, c2], [c1, c1]) > 0); 18 assert(__cmp([c2, c2], [c2, c1]) > 0); 19 } 20