Bug on 64Bits Platform

Canqun Yang <canqun-/[email protected]> Tue, 13 May 2003 17:58:25 +0800 (CST)
Newsgroups gmane.comp.compilers.g95
Message-ID <[email protected]>
Hi,

   There is a bug for G95 on IA-64 or other 64bits
platform. The g95_init_types defined in trans-types.c
assigns a wrong value to g95_max_array_element_size. 

/* trans-types.c  */
void
g95_init_types (void)
{
  unsigned HOST_WIDE_INT n;
  ......
  /* g95_index_integer_kind = 64/8 = 8 */
  g95_index_integer_kind = TYPE_PRECISION
(long_unsigned_type_node) / 8;
  g95_array_index_type = g95_get_int_type
(g95_index_integer_kind);

  / * n = 64 */
  n = TREE_INT_CST_LOW (TYPE_SIZE
(g95_array_index_type));

  /* n == sizeof (HOST_WIDE_INT) * 8)  */
  if (n > sizeof (HOST_WIDE_INT) * 8)
    n = sizeof (HOST_WIDE_INT) * 8;

  /* n = n + 6 = 70  */
  n += G95_DTYPE_SIZE_SHIFT;

  /* g95_max_array_element_size = 0 */
  g95_max_array_element_size = (~(unsigned
HOST_WIDE_INT) 0) >> n;

  size_type_node = g95_array_index_type;
}

   If this bug is fixed, all testcases of G95 can be
passed.

   Canqun Yang.

_________________________________________________________
Do You Yahoo!? 
相见不如聊天!不出门一样面对面!网络摄像头对对派送中~赶快用你的雅虎电邮帐号参与吧……
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.messenger.yahoo.com/


-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com