summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/ipa/type-playground-00.c
blob: 21180e53a4a91b5628809814be72f9b02c903023 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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" } } */