blob: 7b490f6eca3d4185bce203b8d127ebac959588c5 (
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
|
/* { dg-do run } */
/* { dg-options "-flto -fipa-escape-analysis -fdump-ipa-escape-analysis -ftp-comparison-functions=EQ_CANONICAL -ftp-types-compared=astruct_s" } */
struct astruct_s {
struct astruct_s* a;
};
int
main(int argc, char* argv)
{
struct astruct_s a;
}
// This is proof that an incomplete type **CAN** be compared
// via identifier identity.
// Intuitevely, identifier identity may give false positives (and maybe false negatives too?)
// So, it must be the last resort comparisons.
//
// If we say that an identifier comparison may give false positives and false negatives
// then maybe it would be useful to documents attempts to explicitly produce false positives
// and false negatives to better understand what causes them.
// 0,64:astruct_s {0,64:astruct_s {}*;} x 0,0:astruct_s {} = f,
// I am not an expert on regex
/* { dg-final { scan-wpa-ipa-dump "0,64:astruct_s .0,64:astruct_s ..... x 0,0:astruct_s .. = f," "escape-analysis" } } */
|