PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-prof / prof-robust-1.c
blob316cfc75734adb9e94f000538f3355f5ffb91d31
1 /* { dg-options "-O2 -w" } */
3 #include <stdio.h>
4 #include <stdlib.h>
6 #ifdef _PROFILE_USE
7 int foo(int x) {
8 return 3 * x;
10 #else
11 int foo(int x) {
12 return 3 * x;
14 #endif
16 int x = 1000;
18 int main(int argc, char *argv[]) {
19 int i;
20 int sum = 0;
21 for (i = 0; i < x; i++)
22 sum += i;
23 printf("%d\n", sum);
24 return 0;