Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/pr54782.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do compile } */ |
2 /* { dg-require-effective-target pthread } */ | |
3 /* { dg-options "-O -ffast-math -ftree-parallelize-loops=2 -g" } */ | |
4 | |
5 struct S | |
6 { | |
7 int n; | |
8 float *a; | |
9 }; | |
10 | |
11 int | |
12 foo (struct S *s) | |
13 { | |
14 float sum = 0; | |
15 int i; | |
16 for (i = 0; i < s->n; i++) | |
17 sum += s->a[i]; | |
18 return sum; | |
19 } |