diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr28121.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr28121.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr28121.c b/gcc/testsuite/gcc.dg/pr28121.c new file mode 100644 index 000000000..5cbf8f89e --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr28121.c @@ -0,0 +1,27 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +short +GetCmd () +{ + int c, c1; + for (c = 255; c == 255;) + { + c = GetMouseButton (); + if (c >= 0) + { + c = ParsePos (c, -1, 0); + c1 = ParsePos (c1, c, 1); + if (c == c1 && (c >= 0 || c == -10)) + { + return c; + } + if (c >= 0 && c1 == -12) + { + return ((((((10) + 1) + 1)) + 1) << 7) | c; + } + c = 255; + } + } +} + |