diff options
author | Erick Ochoa <erick.ochoa@theobroma-systems.com> | 2020-05-12 15:17:49 +0200 |
---|---|---|
committer | Erick Ochoa <erick.ochoa@theobroma-systems.com> | 2020-05-12 15:17:49 +0200 |
commit | 31035eeb11c0f3b172878782824586f99a3e52f3 (patch) | |
tree | a1c022cfd47897b93b08084a1ea4ca56ad731031 | |
parent | fa1425e6975392104b5105df4e600cf3787a6708 (diff) |
Add test case 00
-rw-r--r-- | gcc/testsuite/gcc.dg/ipa/type-playground-00.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/ipa/type-playground-00.c b/gcc/testsuite/gcc.dg/ipa/type-playground-00.c new file mode 100644 index 00000000000..21180e53a4a --- /dev/null +++ b/gcc/testsuite/gcc.dg/ipa/type-playground-00.c @@ -0,0 +1,21 @@ +/* { dg-do run } */ +/* { dg-options "-fipa-hello-world -fdump-ipa-hello-world -ftp-comparison-functions=EQ_POINTER -ftp-types-compared=int " } */ + +int +main () +{ + int a = 0; + const int b = 0; + return 0; +} + +// This is proof that comparing trees using only +// pointer equality yields different trees +// when types have different attributes. +// i.e. +// TREE_TYPE(a) == TREE_TYPE(b) +// evaluates to false + + +/* { dg-final { scan-ipa-dump "0,32:integer_type x 0,32:integer_type = f," "hello-world" } } */ + |