diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/ipa/type-playground-01.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/ipa/type-playground-01.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/ipa/type-playground-01.c b/gcc/testsuite/gcc.dg/ipa/type-playground-01.c new file mode 100644 index 00000000000..f85ecc13ef1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/ipa/type-playground-01.c @@ -0,0 +1,19 @@ +/* { dg-do run } */ +/* { dg-options "-flto -fipa-escape-analysis -fdump-ipa-escape-analysis -ftp-comparison-functions=EQ_STRUCTURAL -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 cannot be compared +// via structural equality. + +// 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" } } */ |