OSDN Git Service

gcc:
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / pr30137-1.c
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;
7 int foo3 (void) { return s == &s; }
8 int foo5 (void) { return s->ptr == s->ptr; }
9
10 struct { union { int i; short s } u; } x;
11 int foo6 (void) { return x.u.i == x.u.s; }
12
13 void **p;
14 int foo8 (void) { return p == &p; }
15 int foo9 (void) { return *p == p; }
16 int foo10 (void) { return *p == &p; }
17 int foo11 (void) { return p != &p; }
18 int foo12 (void) { return *p != p; }
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 /* { dg-final { cleanup-tree-dump "gimple" } } */