OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-prof/] [prof-robust-1.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-options "-O2 -w" } */
2
 
3
#include <stdio.h>
4
#include <stdlib.h>
5
 
6
#ifdef _PROFILE_USE
7
int foo(int x) {
8
  return 3 * x;
9
}
10
#else
11
int foo(int x) {
12
  return 3 * x;
13
}
14
#endif
15
 
16
int x = 1000;
17
 
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;
25
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.