aboutsummaryrefslogtreecommitdiff
path: root/SingleSource/Regression/C/gcc-c-torture/execute/20001031-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'SingleSource/Regression/C/gcc-c-torture/execute/20001031-1.c')
-rw-r--r--SingleSource/Regression/C/gcc-c-torture/execute/20001031-1.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/SingleSource/Regression/C/gcc-c-torture/execute/20001031-1.c b/SingleSource/Regression/C/gcc-c-torture/execute/20001031-1.c
new file mode 100644
index 00000000..a2a6c830
--- /dev/null
+++ b/SingleSource/Regression/C/gcc-c-torture/execute/20001031-1.c
@@ -0,0 +1,37 @@
+extern void abort (void);
+extern void exit (int);
+
+void t1 (int x)
+{
+ if (x != 4100)
+ abort ();
+}
+
+int t2 (void)
+{
+ int i;
+ t1 ((i = 4096) + 4);
+ return i;
+}
+
+void t3 (long long x)
+{
+ if (x != 0x80000fffULL)
+ abort ();
+}
+
+long long t4 (void)
+{
+ long long i;
+ t3 ((i = 4096) + 0x7fffffffULL);
+ return i;
+}
+
+main ()
+{
+ if (t2 () != 4096)
+ abort ();
+ if (t4 () != 4096)
+ abort ();
+ exit (0);
+}