aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/python-value.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.python/python-value.c')
-rw-r--r--gdb/testsuite/gdb.python/python-value.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.python/python-value.c b/gdb/testsuite/gdb.python/python-value.c
index 17e5c62..092c520 100644
--- a/gdb/testsuite/gdb.python/python-value.c
+++ b/gdb/testsuite/gdb.python/python-value.c
@@ -33,19 +33,21 @@ enum e
TWO = 2
};
+typedef struct s *PTR;
+
enum e evalue = TWO;
int
main (int argc, char *argv[])
{
+ char *cp = argv[0]; /* Prevent gcc from optimizing argv[] out. */
struct s s;
union u u;
+ PTR x = &s;
s.a = 3;
s.b = 5;
u.a = 7;
- argv[0][0] = 'a'; /* Just to avoid getting argv optimized out. */
-
return 0; /* break to inspect struct and union */
}