| 1 |
/* PR tree-optimization/63379 */ |
| 2 |
|
| 3 |
#include "tree-vect.h" |
| 4 |
|
| 5 |
extern void abort (void); |
| 6 |
|
| 7 |
typedef struct { |
| 8 |
int x; |
| 9 |
int y; |
| 10 |
} Point; |
| 11 |
|
| 12 |
Point pt_array[25]; |
| 13 |
|
| 14 |
void __attribute__((noinline,noclone)) |
| 15 |
generate_array(void) |
| 16 |
{ |
| 17 |
unsigned int i; |
| 18 |
for (i = 0; i<25; i++) |
| 19 |
{ |
| 20 |
pt_array[i].x = i; |
| 21 |
pt_array[i].y = 1000+i; |
| 22 |
} |
| 23 |
} |
| 24 |
|
| 25 |
int main() |
| 26 |
{ |
| 27 |
check_vect (); |
| 28 |
generate_array (); |
| 29 |
Point min_pt = pt_array[0]; |
| 30 |
Point *ptr, *ptr_end; |
| 31 |
for (ptr = pt_array+1, ptr_end = pt_array+25; ptr != ptr_end; ++ptr) |
| 32 |
{ |
| 33 |
min_pt.x = (min_pt.x < ptr->x) ? min_pt.x : ptr->x; |
| 34 |
min_pt.y = (min_pt.y < ptr->y) ? min_pt.y : ptr->y; |
| 35 |
} |
| 36 |
|
| 37 |
if (min_pt.x != 0 || min_pt.y != 1000) |
| 38 |
abort (); |
| 39 |
return 0; |
| 40 |
} |
| 41 |
|