diff options
author | Jeff Law <jlaw@ventanamicro.com> | 2024-07-23 19:11:04 -0600 |
---|---|---|
committer | Jeff Law <jlaw@ventanamicro.com> | 2024-07-23 19:11:04 -0600 |
commit | f9a60d575f02822852aa22513c636be38f9c63ea (patch) | |
tree | b00ab39c9fc97bfcf0afb6275df10a463bc8ecac | |
parent | daedc197bba2cb532d015034ff2a68803735e9d3 (diff) | |
download | gcc-f9a60d575f02822852aa22513c636be38f9c63ea.zip gcc-f9a60d575f02822852aa22513c636be38f9c63ea.tar.gz gcc-f9a60d575f02822852aa22513c636be38f9c63ea.tar.bz2 |
[PR rtl-optimization/115877][6/n] Add testcase from pr115877
This just adds the testcase from pr115877. It's working now on the trunk. I'm
not done with cleanups/bugfixing, but there's no reason to not have the
testcase installed at this point.
PR rtl-optimization/115877
gcc/testsuite
* gcc.dg/torture/pr115877.c: New test.
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr115877.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr115877.c b/gcc/testsuite/gcc.dg/torture/pr115877.c new file mode 100644 index 0000000..432b128 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr115877.c @@ -0,0 +1,20 @@ +/* { dg-do run { target int128 } } */ + +char a[16]; +unsigned short u; + +__int128 +foo (int i) +{ + i -= (unsigned short) ~u; + a[(unsigned short) i] = 1; + return i; +} + +int +main () +{ + __int128 x = foo (0); + if (x != -0xffff) + __builtin_abort(); +} |