aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr70333.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr70333.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr70333.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr70333.c b/gcc/testsuite/gcc.dg/torture/pr70333.c
new file mode 100644
index 00000000000..854e6d59e1a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr70333.c
@@ -0,0 +1,19 @@
+/* { dg-do run } */
+/* { dg-require-effective-target lp64 } */
+
+unsigned long int
+foo (signed char b, signed char e)
+{
+ return ((2ULL * b) * (e * 13)) * (32 << 24);
+}
+
+int
+main ()
+{
+ if (__CHAR_BIT__ == 8
+ && sizeof (int) == 4
+ && sizeof (long long) == 8
+ && foo (-60, 1) != 0xffffff3d00000000ULL)
+ __builtin_abort ();
+ return 0;
+}