1 /* This testcase is part of GDB, the GNU debugger.
3 Copyright 2014 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>. */
36 unsigned int unsigned_int_vla
[n
];
40 unsigned long unsigned_long_vla
[n
];
43 unsigned short unsigned_short_vla
[n
];
44 unsigned char unsigned_char_vla
[n
];
45 struct foo foo_vla
[n
];
49 for (i
= 0; i
< n
; i
++)
52 unsigned_int_vla
[i
] = i
*2;
53 double_vla
[i
] = i
/2.0;
54 float_vla
[i
] = i
/2.0f
;
56 unsigned_long_vla
[i
] = i
*2;
59 unsigned_short_vla
[i
] = i
*2;
60 unsigned_char_vla
[i
] = 'A';
66 size_t int_size
= sizeof(int_vla
); /* vlas_filled */
67 size_t uint_size
= sizeof(unsigned_int_vla
);
68 size_t double_size
= sizeof(double_vla
);
69 size_t float_size
= sizeof(float_vla
);
70 size_t long_size
= sizeof(long_vla
);
71 size_t char_size
= sizeof(char_vla
);
72 size_t short_size
= sizeof(short_vla
);
73 size_t ushort_size
= sizeof(unsigned_short_vla
);
74 size_t uchar_size
= sizeof(unsigned_char_vla
);
75 size_t foo_size
= sizeof(foo_vla
);
76 size_t bar_size
= sizeof(bar_vla
);
78 return; /* break_end_of_vla_factory */
This page took 0.030653 seconds and 4 git commands to generate.