1 /* { dg-do compile { target { ! { logical_op_short_circuit || { m68k*-*-* bfin*-*-* v850*-*-* moxie*-*-* m32c*-*-* fr30*-*-* mcore*-*-* frv-*-* h8300-*-* m32r-*-* mn10300-*-* msp430-*-* pdp11-*-* rl78-*-* rx-*-* vax-*-*} } } } } */
2 /* { dg-options "-O2 -fdump-tree-vrp2-details" } */
3 /* { dg-final { scan-tree-dump-not "IRREDUCIBLE_LOOP" "vrp2" } } */
4 
5 void abort (void);
6 typedef struct bitmap_head_def *bitmap;
7 typedef const struct bitmap_head_def *const_bitmap;
8 typedef struct bitmap_obstack
9 {
10   struct bitmap_obstack *next;
11   unsigned int indx;
12 }
13 bitmap_element;
14 typedef struct bitmap_head_def
15 {
16   bitmap_element *first;
17 }
18 bitmap_head;
19 static __inline__ unsigned char
bitmap_elt_ior(bitmap dst,bitmap_element * dst_elt,bitmap_element * dst_prev,const bitmap_element * a_elt,const bitmap_element * b_elt)20 bitmap_elt_ior (bitmap dst, bitmap_element * dst_elt,
21 		bitmap_element * dst_prev, const bitmap_element * a_elt,
22 		const bitmap_element * b_elt)
23 {
24   ((void) (!(a_elt || b_elt) ? abort (), 0 : 0));
25 }
26 
27 unsigned char
bitmap_ior_and_compl(bitmap dst,const_bitmap a,const_bitmap b,const_bitmap kill)28 bitmap_ior_and_compl (bitmap dst, const_bitmap a, const_bitmap b,
29 		      const_bitmap kill)
30 {
31   bitmap_element *dst_elt = dst->first;
32   const bitmap_element *a_elt = a->first;
33   const bitmap_element *b_elt = b->first;
34   const bitmap_element *kill_elt = kill->first;
35   bitmap_element *dst_prev = ((void *) 0);
36   while (a_elt || b_elt)
37     {
38       if (b_elt && kill_elt && kill_elt->indx == b_elt->indx
39 	  && (!a_elt || a_elt->indx >= b_elt->indx));
40       else
41 	{
42 	  bitmap_elt_ior (dst, dst_elt, dst_prev, a_elt, b_elt);
43 	  if (a_elt && b_elt && a_elt->indx == b_elt->indx)
44 	    ;
45 	  else if (a_elt && (!b_elt || a_elt->indx <= b_elt->indx))
46 	    a_elt = a_elt->next;
47 	}
48     }
49 }
50