Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gdc.dg/pr94424.d @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
line wrap: on
line source
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94424 // { dg-additional-options "-fmain -funittest" } // { dg-do run { target hw } } // { dg-skip-if "needs gcc/config.d" { ! d_runtime } } @safe unittest { struct C { ubyte i; this(ubyte i) { this.i = i; } } auto c1 = C(1); auto c2 = C(2); assert(__cmp([c1, c1][], [c2, c2][]) < 0); assert(__cmp([c2, c2], [c1, c1]) > 0); assert(__cmp([c2, c2], [c2, c1]) > 0); }