blob: b986bdd92a9f1955292a8ff6fef6806b227775f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-fre-details" } */
typedef union
{
int* data;
} SA;
typedef struct
{
int reserved;
char* array;
}SB;
typedef struct
{
int status;
}SC;
void foo(SA* pResult, SB* method, SC* self)
{
if (method->array[0] == 'L' && !self->status && pResult->data != 0)
pResult->data = pResult->data;
}
/* { dg-final { scan-tree-dump "Deleted redundant store" "fre" } } */
/* { dg-final { cleanup-tree-dump "fre" } } */
|