1 /* { dg-do compile } */
2 /* { dg-options "-w -fdump-tree-gimple" } */
3 
4 /* Things that should not be folded.  */
5 
6 struct { long base; int tail; void * volatile ptr; } *s;
foo3(void)7 int foo3 (void) { return s == &s; }
foo5(void)8 int foo5 (void) { return s->ptr == s->ptr; }
9 
10 struct { union { int i; short s } u; } x;
foo6(void)11 int foo6 (void) { return x.u.i == x.u.s; }
12 
13 void **p;
foo8(void)14 int foo8 (void) { return p == &p; }
foo9(void)15 int foo9 (void) { return *p == p; }
foo10(void)16 int foo10 (void) { return *p == &p; }
foo11(void)17 int foo11 (void) { return p != &p; }
foo12(void)18 int foo12 (void) { return *p != p; }
foo13(void)19 int foo13 (void) { return *p != &p; }
20 
21 /* { dg-final { scan-tree-dump-not "= 0;" "gimple" } } */
22 /* { dg-final { scan-tree-dump-not "= 1;" "gimple" } } */
23