This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/22439] New: ICE with unsigned char array: size_binop, at fold-const.c:1637
- From: "etienne_lorrain at yahoo dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jul 2005 13:05:34 -0000
- Subject: [Bug c/22439] New: ICE with unsigned char array: size_binop, at fold-const.c:1637
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
etienne@cygne:~/projet$ gcc fntbin2h.c
fntbin2h.c: In function 'fct':
fntbin2h.c:50: warning: passing argument 1 of 'fct2' from incompatible pointer
type
fntbin2h.c:62: internal compiler error: in size_binop, at fold-const.c:1637
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.0/README.Bugs>.
etienne@cygne:~/projet$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-
languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --
with-system-zlib --libexecdir=/usr/lib --enable-nls --without-included-
gettext --enable-threads=posix --program-suffix=-4.0 --enable-__cxa_atexit --
enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug --
enable-java-gc=boehm --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-
1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --enable-
checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.1 20050701 (prerelease) (Debian 4.0.0-12)
etienne@cygne:~/projet$
------------------------------
/* fntbin2h.c of Gujin (see sourceforge) */
void PRINTF (char *, ...);
void fct2(unsigned char *font[256], void *ptr);
void fct (unsigned fntheigh, void *ptr)
{
unsigned char font[256][fntheigh];
unsigned font_index;
const unsigned char font_order[256] = {
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F,
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87,
0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F,
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97,
0x98, 0x99, 0x9A, 0x9B, 0x9C, 0x9D, 0x9E, 0x9F,
0x7F, '¹', '²', '³', '¼', '½', '¾', '%',
'ª', 'º', '°', '·', '.', ':', ',', ';',
'\'', '"', '`', '^', '~', '¨', '´', '¸',
'«', '»', '¬', '×', 'µ', '&', '§', '¶',
'[', ']', '{', '}', '(', ')', '<', '>',
'#', '@', '?', '¿', '!', '¡', '¦', '|',
'+', '-', '±', '÷', '/', '\\', '_', '',
'¯', '*', '=', '¤', '£', '$', '¢', '¥',
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', ' ', 0xA0, '®', '©', 'Þ', 'þ', /* NBSP, big/small
islandic thorn */
/* Accented letter order:
grave, acute, circumflex, tilda, trema, round */
'A', 'À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ',
'B', 'C', 'Ç', 'D', 'Ð', 'E', 'È', 'É',
'Ê', 'Ë', 'F', 'G', 'H', 'I', 'Ì', 'Í',
'Î', 'Ï', 'J', 'K', 'L', 'M', 'N', 'Ñ',
'O', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'P',
'Q', 'R', 'S', 'ß', 'T', 'U', 'Ù', 'Ú',
'Û', 'Ü', 'V', 'W', 'X', 'Y', 'Ý', 'Z',
'a', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ',
'b', 'c', 'ç', 'd', 'ð', 'e', 'è', 'é',
'ê', 'ë', 'f', 'g', 'h', 'i', 'ì', 'í',
'î', 'ï', 'j', 'k', 'l', 'm', 'n', 'ñ',
'o', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'p',
'q', 'r', 's', 't', 'u', 'ù', 'ú', 'û',
'ü', 'v', 'w', 'x', 'y', 'ý', 'ÿ', 'z'
};
fct2 (font, ptr);
PRINTF ("const union font_line_u font8x%u[256][%u] = {\n", fntheigh,
fntheigh);
for (font_index = 0; font_index < 256; font_index++) {
unsigned cpt;
if ( font_order[font_index] < 0x20
|| (font_order[font_index] >= 0x80 && font_order[font_index] < 0xA0))
PRINTF (" [0x%X] = {\n", font_order[font_index]);
else if (font_order[font_index] == '\'' || font_order[font_index]
== '\\')
PRINTF (" ['\\%c'] = {\n", font_order[font_index]);
else
PRINTF (" ['%c'] = {\n", font_order[font_index]);
for (cpt = 0; cpt < fntheigh; cpt++) {
unsigned tmp = font[font_order[font_index]][cpt];
PRINTF ("\t%c (%c,%c,%c,%c,%c,%c,%c,%c),\n",
// (cpt == 0) ? 'T' : ((cpt == fntheigh - 1) ? 'B' : 'M'),
'B',
(tmp & 0x80)? 'X' : '_', (tmp & 0x40)? 'X' : '_',
(tmp & 0x20)? 'X' : '_', (tmp & 0x10)? 'X' : '_',
(tmp & 0x08)? 'X' : '_', (tmp & 0x04)? 'X' : '_',
(tmp & 0x02)? 'X' : '_', (tmp & 0x01)? 'X' : '_');
}
PRINTF ("\t},\n");
}
PRINTF (" }; /* font8x%u */\n", fntheigh);
}
------------------------------
Thanks,
Etienne.
--
Summary: ICE with unsigned char array: size_binop, at fold-
const.c:1637
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: etienne_lorrain at yahoo dot fr
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i486-linux-gnu
GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22439