473,399 Members | 2,278 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Compiler Error 2001 on long 2-d array initialiser

We have hit an internal compiler error when processing a very long array
initialiser (for a lookup table). Most of the compiler versions we tried
compiled the code successfully, but very slowly (one person reported hours,
but I have not seen that personally), but one failed:

Microsoft (R) 32-bit C/C++ Optimizing Compiler
Version 13.10.3077 for 80x86
Copyright (C) Microsoft Corporation 1984-2002. All rights reserved.

slow.c
fatal error C1001: INTERNAL COMPILER ERROR
(compiler file
'f:\vs70builds\3077\vc\Compiler\Utc\src\P2\main.c' , line 148)

The code itself was automatically generated, and an extract is below
(the whole is available, but as 1233 lines, is a bit big to post).
(The code was originally generated into Fortran, where big DATA statements
are not unusual).

As the code is automatically generated from data held elsewhere,
we have worked round it by changing the big 2d table: int imbtab[ 87][191]
to 87 separate static tables, one for each row, and then a table of pointers
to the rows. This reworked version compiles quickly with no problems.

Tim

int ucf950( int ibyte, int istat )
{
int ipos, itab;
int isbtab[256] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95,
96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111,
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127,
-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,
-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,
-9999, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15,
-16, -17, -18, -19, -20, -21, -22, -23, -24, -25, -26, -27, -28, -29, -30, -31,
-32, -33, -34, -35, -36, -37, -38,-9999,-9999, -39, -40, -41, -42, -43, -44, -45,
-46, -47, -48, -49, -50, -51, -52, -53, -54, -55, -56, -57, -58, -59, -60, -61,
-62, -63, -64, -65, -66, -67, -68, -69, -70, -71, -72, -73, -74, -75, -76, -77,
-78, -79, -80, -81, -82, -83, -84, -85, -86, -87,-9999,-9999,-9999,-9999,-9999,-9999
};
int imbtab[ 87][191] = {
/* Row 1 (index 0) of IMBTAB gives the mappings for the follow bytes of lead byte 161 */
{ 12288,65292,12289,12290,65294, 8231,65307,65306,65311,65281,65072, 8230, 8229,65104,65105,65106,
183,65108,65109,65110,65111,65372, 8211,65073, 8212,65075, 9588,65076,65103,65288,65289,65077,
65078,65371,65373,65079,65080,12308,12309,65081,65 082,12304,12305,65083,65084,12298,12299,65085,
65086,12296,12297,65087,65088,12300,12301,65089,65 090,12302,12303,65091,65092,65113,65114,-9999,
-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,
-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,
-9999,65115,65116,65117,65118, 8216, 8217, 8220, 8221,12317,12318, 8245, 8242,65283,65286,65290,
8251, 167,12291, 9675, 9679, 9651, 9650, 9678, 9734, 9733, 9671, 9670, 9633, 9632, 9661, 9660,
12963, 8453, 175,65507,65343, 717,65097,65098,65101,65102,65099,65100,65119,6512 0,65121,65291,
65293, 215, 247, 177, 8730,65308,65310,65309, 8806, 8807, 8800, 8734, 8786, 8801,65122,65123,
65124,65125,65126,65374, 8745, 8746, 8869, 8736, 8735, 8895,13266,13265, 8747, 8750, 8757, 8756,
9792, 9794, 8853, 8857, 8593, 8595, 8592, 8594, 8598, 8599, 8601, 8600, 8741, 8739,65295 },
/* Row 2 (index 1) of IMBTAB gives the mappings for the follow bytes of lead byte 162 */
{ 65340, 8725,65128,65284,65509,12306,65504,65505,65285,653 12, 8451, 8457,65129,65130,65131,13269,
13212,13213,13214,13262,13217,13198,13199,13252, 176,20825,20827,20830,20829,20833,20835,21991,
29929,31950, 9601, 9602, 9603, 9604, 9605, 9606, 9607, 9608, 9615, 9614, 9613, 9612, 9611, 9610,
9609, 9532, 9524, 9516, 9508, 9500, 9620, 9472, 9474, 9621, 9484, 9488, 9492, 9496, 9581,-9999,
-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,
-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,
-9999, 9582, 9584, 9583, 9552, 9566, 9578, 9569, 9698, 9699, 9701, 9700, 9585, 9586, 9587,65296,
65297,65298,65299,65300,65301,65302,65303,65304,65 305, 8544, 8545, 8546, 8547, 8548, 8549, 8550,
8551, 8552, 8553,12321,12322,12323,12324,12325,12326,12327,123 28,12329,21313,21316,21317,65313,
65314,65315,65316,65317,65318,65319,65320,65321,65 322,65323,65324,65325,65326,65327,65328,65329,
65330,65331,65332,65333,65334,65335,65336,65337,65 338,65345,65346,65347,65348,65349,65350,65351,
65352,65353,65354,65355,65356,65357,65358,65359,65 360,65361,65362,65363,65364,65365,65366 },

....and lots more similar blocks ending in

/* Row 87 (index 86) of IMBTAB gives the mappings for the follow bytes of lead byte 249 */
{ 32408,32411,32409,33248,33249,34374,34375,34376,35 193,35194,35196,35195,35327,35736,35737,36517,
36516,36515,37998,37997,37999,38001,38003,38729,39 026,39263,40040,40046,40045,40459,40461,40464,
40463,40466,40465,40609,40693,40713,40775,40824,40 827,40826,40825,22302,28774,31855,34876,36274,
36518,37315,38004,38008,38006,38005,39520,40052,40 051,40049,40053,40468,40467,40694,40714,-9999,
-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,
-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,-9999,
-9999,40868,28776,28773,31991,34410,34878,34877,348 79,35742,35996,36521,36553,38731,39027,39028,
39116,39265,39339,39524,39526,39527,39716,40469,40 471,40776,25095,27422,29223,34380,36520,38018,
38016,38017,39529,39528,39726,40473,29225,34379,35 743,38019,40057,40631,30325,39531,40058,40477,
28777,28778,40612,40830,40777,40856,30849,37561,35 023,22715,24658,31911,23290, 9556, 9574, 9559,
9568, 9580, 9571, 9562, 9577, 9565, 9554, 9572, 9557, 9566, 9578, 9569, 9560, 9575, 9563, 9555,
9573, 9558, 9567, 9579, 9570, 9561, 9576, 9564, 9553, 9552, 9581, 9582, 9584, 9583, 9619 }
};
/* -------- */
/* The Code */
/* -------- */
if ( ibyte < 0 )
/* Invalid value */
return -9999;
else if ( ibyte <= 255 ) {
if ( istat >= 0 )
/* lead byte */
return isbtab[ibyte];
else if ( istat >= -87 ) {
/* follow byte */
if ( ibyte < 64 )
return -9999;
else if ( ibyte <= 254 ) {
itab = -istat - 1;
ipos = ibyte - 64;
return imbtab[itab][ipos];
}
else
return -9999;
}
else
return -9999;
}
else
/* Invalid value */
return -9999;
}

Nov 16 '05 #1
0 1402

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: | last post by:
I first thought I had some compiler setting wrong in VC# 2003 but it turns out that it has something to do with .NET framework v1.1 itself. If I understand correctly, .NET installer also installs a...
1
by: Hafeez | last post by:
I am having real trouble compiling this code http://www.cs.wisc.edu/~vganti/birchcode/codeHier/AttrProj.tgz The attachment shows errors when compiled using the current version of g++ in a...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
2
by: Tony Wilkinson | last post by:
Hi, As a complete novice to C# I have fallen at the first hurdle. Sad but true, I can't get 'Hello World' to work! I have downloaded the .net SDK etc and installed them on my workstation as...
4
by: james margey | last post by:
Hi to all, I have spent 3 days at this error and i have two days to go for a deadline, and i am about to go off my nut, the reason being: Microsoft dont seem to be able to provide a solution, I...
7
by: Jorgen Haukland, Norway | last post by:
Hi, I have created a Java webservice which runs in IBM WebSphere appserver. I take the WSDL-file and create a VS.NET WinForm application and calls the service running on my PC and everything...
3
by: Hennesey | last post by:
Hello all, I am developing a Visual Studio .Net 2005 application. This application consumes a JAVA web service from Axis 1.3. When I call a method of the web service I get the following error...
1
by: Alasdair | last post by:
Hi, I'm wondering if there is any way of getting around the "too many initialiser" error when giving initial values for an array. I'm trying to make a random word generator, so I need long lists of...
3
by: Jeremy Chapman | last post by:
I've writtin a very simple web service in axis which returns an array of classes. I consume it in a .net app. When receiving the response, my .net app generates an error "Cannot assign object...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.