Index: gdb/testsuite/gdb.dwarf2/dw2-restrict.c |
diff --git a/gdb/testsuite/gdb.base/watch-non-mem.c b/gdb/testsuite/gdb.dwarf2/dw2-restrict.c |
similarity index 85% |
copy from gdb/testsuite/gdb.base/watch-non-mem.c |
copy to gdb/testsuite/gdb.dwarf2/dw2-restrict.c |
index 51a859495f694a8649a894436b39f765bb5866cf..367ffdc66333433857985230a3b1bf82bbba2c9c 100644 |
--- a/gdb/testsuite/gdb.base/watch-non-mem.c |
+++ b/gdb/testsuite/gdb.dwarf2/dw2-restrict.c |
@@ -1,6 +1,6 @@ |
/* This testcase is part of GDB, the GNU debugger. |
- Copyright 2010-2012 Free Software Foundation, Inc. |
+ Copyright 2012-2013 Free Software Foundation, Inc. |
This program is free software; you can redistribute it and/or modify |
it under the terms of the GNU General Public License as published by |
@@ -15,13 +15,12 @@ |
You should have received a copy of the GNU General Public License |
along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
-int global = 0; |
+int f (char * restrict x) |
+{ |
+ return x[0]; |
+} |
int main() |
{ |
- global++; |
- global++; |
- global++; |
- |
- return 0; |
+ return f("hi bob"); |
} |