------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-14 
17:16 -------
Confirmed now, testcase:
typedef unsigned long BITMAP_WORD;

typedef struct bitmap_element_def
{
  struct bitmap_element_def *next;
  struct bitmap_element_def *prev;
  unsigned int indx;
  BITMAP_WORD bits[4];
} bitmap_element;
typedef struct bitmap_head_def {
  bitmap_element *first;
  bitmap_element *current;
  unsigned int indx;
} bitmap_head;
typedef struct bitmap_head_def *bitmap;

int f[100];
int g[100];
unsigned char
bitmap_equal_p (bitmap a, bitmap b)
{
  bitmap_element *a_elt;
  bitmap_element *b_elt;
  unsigned ix;
  for (a_elt = a->first, b_elt = b->first;
       a_elt && b_elt;
       a_elt = a_elt->next, b_elt = b_elt->next)
  {
    if (a_elt->indx != b_elt->indx)
      return 0;
    for (ix = 4; ix--;)
      {
        if (f[ix] != g[ix])
          {
            return 0;
          }
      }
  }
  return 1;
}


int main(void)
{
  bitmap a;
  a = __builtin_calloc (sizeof(*a),1);
  bitmap b;
  b = __builtin_calloc (sizeof(*b),1);
  a->first = __builtin_calloc(sizeof(*a->first), 1);
  b->first = __builtin_calloc(sizeof(*b->first), 1);
  for(int i = 0;i<5;i++)
  {
    a->first->bits[i] = i;
    b->first->bits[i] = i;
  }
  if (!bitmap_equal_p (a, b))
    __builtin_abort();
  return 0;
}


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-08-14 17:16:17
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23386

Reply via email to