2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.dg / alias-10.c
blob6e9cb3f3c4240a53ea541fd0e0f7183a0e599775
1 /* For PR tree-optimization/14784 */
3 /* { dg-do compile } */
4 /* { dg-options "-O2 -funswitch-loops -fdump-tree-unswitch-details" } */
6 typedef struct bitmap_element_def
8 unsigned int indx;
9 } bitmap_element;
11 typedef struct bitmap_head_def {
12 bitmap_element *first;
13 int using_obstack;
14 } bitmap_head;
15 typedef struct bitmap_head_def *bitmap;
17 bitmap_element *bitmap_free;
19 void foo (bitmap head, bitmap_element *elt)
21 while (1)
23 /* Alias analysis problems used to prevent us from recognizing
24 that this condition is invariant. */
25 if (head->using_obstack)
26 bitmap_free = elt;
31 /* { dg-final { scan-tree-dump-times "Unswitching" 1 "unswitch"} } */
32 /* { dg-final { cleanup-tree-dump "unswitch" } } */