aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr120661-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr120661-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr120661-1.c51
1 files changed, 51 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr120661-1.c b/gcc/testsuite/gcc.dg/pr120661-1.c
new file mode 100644
index 0000000..abf9210
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr120661-1.c
@@ -0,0 +1,51 @@
+/* { dg-do compile } */
+/* { dg-options "-std=c23 -Os" } */
+
+typedef __builtin_va_list __gnuc_va_list;
+typedef __gnuc_va_list va_list;
+
+int e, a, b;
+int f(int b, ...) {
+ va_list args;
+ __builtin_c23_va_start(args, b);
+ unsigned c = 1;
+ for (int d; d < b; ++d)
+ c = c ^ 1;
+ return c;
+}
+static int fn3(int l, int i, int n) {
+ int j;
+ goto k;
+r:
+ j = (f(e) + 1641730381) * l + 1189664732 * n + 1064 * i - 1545337304;
+ if (903562339 * j + n >= 0)
+ goto m;
+ goto ac;
+k:
+ if (0)
+ goto ad;
+ goto t;
+ad:
+ if (b)
+ goto s;
+ goto r;
+m:
+ goto ad;
+t:
+ j = l;
+ l = 800794 * j;
+ goto ad;
+s:
+ b = 2 * b + 1;
+ if (a + (long)j)
+ goto t;
+ i = n;
+ goto s;
+ac:
+}
+int main() {
+ if (a)
+ if (fn3(-1, 1, -1))
+ fn3(1, 0, 3);
+ return 0;
+}