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-06-03 16:05:55 +0200 |
commit | 6ae1318387607c4ca05cae3ea84e54a3e86d8701 (patch) | |
tree | 225b05d6b5786fc05113895b20e2c550b544632e | |
parent | 8b97e8a01774c9960b43c616d304b55c5e0f13ed (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" } } */ + |