summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-prof
diff options
context:
space:
mode:
authordavidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-29 00:19:35 +0000
committerdavidxl <davidxl@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-29 00:19:35 +0000
commit06306fd38457a4c44c68350d77c693575a8664d7 (patch)
treed953d6304eb53816e1ea571fc8d365f55655d39a /gcc/testsuite/gcc.dg/tree-prof
parent92cb1544b6bbd3e5f500b14430b6452329cff716 (diff)
downloadgcc-06306fd38457a4c44c68350d77c693575a8664d7.tar.gz
split checksum into cfg checksum and line checksum
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173147 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-prof')
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/prof-robust-1.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-prof/prof-robust-1.c b/gcc/testsuite/gcc.dg/tree-prof/prof-robust-1.c
new file mode 100644
index 00000000000..316cfc75734
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/prof-robust-1.c
@@ -0,0 +1,25 @@
+/* { dg-options "-O2 -w" } */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef _PROFILE_USE
+int foo(int x) {
+ return 3 * x;
+}
+#else
+int foo(int x) {
+ return 3 * x;
+}
+#endif
+
+int x = 1000;
+
+int main(int argc, char *argv[]) {
+ int i;
+ int sum = 0;
+ for (i = 0; i < x; i++)
+ sum += i;
+ printf("%d\n", sum);
+ return 0;
+}