PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / ssa-thread-12.c
blobd829b04d177da7b12a6e5d7ffeb27f1bf7fbfdd2
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-thread2-details -fdump-tree-thread3-details -fdump-tree-thread4-details" } */
3 /* { dg-final { scan-tree-dump "FSM" "thread2" } } */
4 /* { dg-final { scan-tree-dump "FSM" "thread3" } } */
5 /* { dg-final { scan-tree-dump "FSM" "thread4" { xfail *-*-* } } } */
7 typedef struct bitmap_head_def *bitmap;
8 typedef const struct bitmap_head_def *const_bitmap;
9 typedef struct VEC_int_base
12 VEC_int_base;
13 typedef struct VEC_int_heap
15 VEC_int_base base;
17 VEC_int_heap;
18 typedef unsigned long BITMAP_WORD;
19 typedef struct bitmap_element_def
21 struct bitmap_element_def *next;
22 unsigned int indx;
24 bitmap_element;
25 typedef struct bitmap_head_def
28 bitmap_head;
29 typedef struct
31 bitmap_element *elt1;
32 bitmap_element *elt2;
33 BITMAP_WORD bits;
35 bitmap_iterator;
36 static __inline__ void
37 bmp_iter_and_compl_init (bitmap_iterator * bi, const_bitmap map1,
38 const_bitmap map2, unsigned start_bit,
39 unsigned *bit_no)
43 static __inline__ void
44 bmp_iter_next (bitmap_iterator * bi, unsigned *bit_no)
48 static __inline__ unsigned char
49 bmp_iter_and_compl (bitmap_iterator * bi, unsigned *bit_no)
51 if (bi->bits)
53 while (bi->elt2 && bi->elt2->indx < bi->elt1->indx)
54 bi->elt2 = bi->elt2->next;
58 extern int VEC_int_base_length (VEC_int_base *);
59 bitmap
60 compute_idf (bitmap def_blocks, bitmap_head * dfs)
62 bitmap_iterator bi;
63 unsigned bb_index, i;
64 VEC_int_heap *work_stack;
65 bitmap phi_insertion_points;
66 while ((VEC_int_base_length (((work_stack) ? &(work_stack)->base : 0))) > 0)
68 for (bmp_iter_and_compl_init
69 (&(bi), (&dfs[bb_index]), (phi_insertion_points), (0), &(i));
70 bmp_iter_and_compl (&(bi), &(i)); bmp_iter_next (&(bi), &(i)))