Tighten condition in vect/pr85586.c (PR 85654)
[official-gcc.git] / gcc / testsuite / gcc.dg / pr52691.c
blobad07b815a55d1bfeb9a8150ba8e8d78ccd84b753
1 /* PR middle-end/52691 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
5 #include <stdarg.h>
7 int
8 foo (int a, ...)
10 int b = 0, c = 0;
11 va_list ap;
12 va_start (ap, a);
13 if (a > 1)
14 b = va_arg (ap, double);
15 if (a > 2)
16 c = va_arg (ap, long long);
17 va_end (ap);
18 return a + b + c;
21 /* { dg-final { scan-tree-dump "__builtin_next_arg" "optimized" { target { { i?86-*-* x86_64-*-* } && ia32 } } } } */
22 /* { dg-final { scan-tree-dump "__builtin_next_arg" "optimized" { target { powerpc*-*-darwin* powerpc*-*-aix* } } } } */
23 /* { dg-final { scan-tree-dump "__builtin_next_arg" "optimized" { target { powerpc*-*-linux* && lp64 } } } } */