diff options
author | Jeff Law <jlaw@ventanamicro.com> | 2024-07-23 19:11:04 -0600 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2024-07-28 19:05:49 +0200 |
commit | 73948d0d4ec3b7866df9e141ac49acfb86768149 (patch) | |
tree | 2af213d9e733ce120fea5723c60d8c1a7a588d34 /gcc | |
parent | 1bc9314f8b837da7a68912142387d924791e5de4 (diff) | |
download | gcc-73948d0d4ec3b7866df9e141ac49acfb86768149.zip gcc-73948d0d4ec3b7866df9e141ac49acfb86768149.tar.gz gcc-73948d0d4ec3b7866df9e141ac49acfb86768149.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.
Diffstat (limited to 'gcc')
-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(); +} |