diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr38271.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr38271.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr38271.c b/gcc/testsuite/gcc.dg/torture/pr38271.c new file mode 100644 index 000000000..2c64a9b34 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr38271.c @@ -0,0 +1,18 @@ +/* { dg-do compile } */ +/* { dg-options "-Wuninitialized" } */ + +struct xxx { + short a; + short b; + void *c; +}; + +void bar(struct xxx); + +void foo(struct xxx *p, int i) +{ + struct xxx s0 = *p; + struct xxx s = s0; + if (s.a) i++; + bar(s); +} |