diff options
| author | H.J. Lu <hjl.tools@gmail.com> | 2016-05-07 07:25:57 -0700 |
|---|---|---|
| committer | H.J. Lu <hjl.tools@gmail.com> | 2016-05-07 07:49:45 -0700 |
| commit | 0b51ef4707a8dfbda82644f232d56f4c5f8ec958 (patch) | |
| tree | db3269426123536dbe8038ce9ad62d21673ae55b | |
| parent | 62d3ab2ff9de16b31cfa53ede733a86383d0cb48 (diff) | |
| download | gcc-hjl/pr70155/bitwise.tar.gz | |
Add pr70155-23.chjl/pr70155/bitwise
| -rw-r--r-- | gcc/testsuite/gcc.target/i386/pr70155-23.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr70155-23.c b/gcc/testsuite/gcc.target/i386/pr70155-23.c new file mode 100644 index 00000000000..442889270ce --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr70155-23.c @@ -0,0 +1,31 @@ +/* { dg-do run { target int128 } } */ +/* { dg-options "-O2 -funroll-loops" } */ + +extern void abort (void); + +__attribute__ ((noinline)) +unsigned __int128 +foo (__int128 ixi, unsigned ctr) +{ + unsigned __int128 irslt = 1; + __int128 ix = ixi; + + for (; ctr; ctr--) + { + irslt *= ix; + ix *= ix; + } + + if (irslt != 14348907) + abort (); + return irslt; +} + +int +main () +{ + unsigned __int128 res; + + res = foo (3, 4); + return 0; +} |
