summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2016-05-07 07:25:57 -0700
committerH.J. Lu <hjl.tools@gmail.com>2016-05-07 07:49:45 -0700
commit0b51ef4707a8dfbda82644f232d56f4c5f8ec958 (patch)
treedb3269426123536dbe8038ce9ad62d21673ae55b
parent62d3ab2ff9de16b31cfa53ede733a86383d0cb48 (diff)
downloadgcc-hjl/pr70155/bitwise.tar.gz
Add pr70155-23.chjl/pr70155/bitwise
-rw-r--r--gcc/testsuite/gcc.target/i386/pr70155-23.c31
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;
+}