summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/ipa/type-playground-00.c
blob: 6bddfac993967ae75b89eaf44583acdfaa8f9051 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do link } */
/* { dg-options  "-flto -fipa-escape-analysis -fdump-ipa-escape-analysis -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-wpa-ipa-dump "0,32:integer_type x 0,32:integer_type = t," "escape-analysis" } } */