Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/pr45652.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* { dg-do run { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */ | |
2 /* { dg-options "-O2 -fselective-scheduling2" } */ | |
3 | |
4 struct S { | |
5 double i[2]; | |
6 }; | |
7 | |
8 void __attribute__ ((noinline)) checkcd (struct S x) | |
9 { | |
10 if (x.i[0] != 7.0 || x.i[1] != 8.0) | |
11 __builtin_abort (); | |
12 } | |
13 | |
14 void __attribute__ ((noinline)) testvacd (int n, ...) | |
15 { | |
16 int i; | |
17 __builtin_va_list ap; | |
18 __builtin_va_start (ap, n); | |
19 for (i = 0; i < n; i++) | |
20 { | |
21 struct S t = __builtin_va_arg (ap, struct S); | |
22 checkcd (t); | |
23 } | |
24 __builtin_va_end (ap); | |
25 } | |
26 | |
27 void | |
28 testitcd (void) | |
29 { | |
30 struct S x = { { 7.0, 8.0 } }; | |
31 testvacd (2, x, x); | |
32 } | |
33 | |
34 int | |
35 main () | |
36 { | |
37 testitcd (); | |
38 return 0; | |
39 } |