Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.c-torture/execute/pr54985.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
line wrap: on
line source
typedef struct st { int a; } ST; int __attribute__((noinline,noclone)) foo(ST *s, int c) { int first = 1; int count = c; ST *item = s; int a = s->a; int x; while (count--) { x = item->a; if (first) first = 0; else if (x >= a) return 1; a = x; item++; } return 0; } extern void abort (void); int main () { ST _1[2] = {{2}, {1}}; if (foo(_1, 2) != 0) abort (); return 0; }