aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr49504.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/pr49504.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/pr49504.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr49504.c b/gcc/testsuite/gcc.target/i386/pr49504.c
new file mode 100644
index 0000000..503e6c2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr49504.c
@@ -0,0 +1,18 @@
+/* PR target/49504 */
+/* { dg-do run { target { x32 } } } */
+/* { dg-options "-O" } */
+
+unsigned long long
+foo (const void* p, unsigned long long q)
+{
+ unsigned long long a = (((unsigned long long) ((unsigned long) p)) + q) >> 32;
+ return a;
+}
+
+int
+main ()
+{
+ if (foo (foo, 0x100000000ULL) != 0x1)
+ __builtin_abort ();
+ return 0;
+}