summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/uninit-14-O0.c
blob: abde6ca86e6daa6066208a833c7b5c870541ae99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* PR 24931 */
/* { dg-do compile } */
/* { dg-options "-Wuninitialized" } */

struct p {
        short x, y;
};

struct s {
        int i;
        struct p p;
};

struct s f()
{
        struct s s;
        s.p = (struct p){};
        s.i = (s.p.x || s.p.y);
        return s;
}