DRAFT lib: tests: 17-compare-unsigned-le: Add case from 7s-unsigned-compare.
* lib/tests/scaffold/17-compare-unsigned-le.c: Add case from 7s-unsigned-compare; rewrite to avoid gcc-optimize.
This commit is contained in:
parent
a0c9c0aedb
commit
6aa77fe162
|
@ -1,6 +1,6 @@
|
||||||
/* -*-comment-start: "//";comment-end:""-*-
|
/* -*-comment-start: "//";comment-end:""-*-
|
||||||
* GNU Mes --- Maxwell Equations of Software
|
* GNU Mes --- Maxwell Equations of Software
|
||||||
* Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
|
* Copyright © 2018,2023 Janneke Nieuwenhuizen <janneke@gnu.org>
|
||||||
*
|
*
|
||||||
* This file is part of GNU Mes.
|
* This file is part of GNU Mes.
|
||||||
*
|
*
|
||||||
|
@ -21,10 +21,20 @@
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
unsigned r = -2;
|
unsigned u = -2;
|
||||||
if (r <= -3)
|
int i = -3;
|
||||||
|
int r = u <= -3;
|
||||||
|
if (r)
|
||||||
return 1;
|
return 1;
|
||||||
if (r <= -1)
|
|
||||||
return 0;
|
i = -1;
|
||||||
|
r = u <= -1;
|
||||||
|
if (!r)
|
||||||
return 2;
|
return 2;
|
||||||
|
|
||||||
|
u = 0;
|
||||||
|
i = -1;
|
||||||
|
r = i <= u;
|
||||||
|
if (r)
|
||||||
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue