Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site rexago1.UUCP Path: utzoo!linus!decvax!cwruecmp!rexago1!bc10 From: bc10@rexago1.UUCP (Andrew C. Eisenberg) Newsgroups: net.bugs.usg,net.micro.att Subject: AT&T PC7300 Compiler - 32k bug Message-ID: <166@rexago1.UUCP> Date: Mon, 6-Jan-86 15:33:42 EST Article-I.D.: rexago1.166 Posted: Mon Jan 6 15:33:42 1986 Date-Received: Wed, 8-Jan-86 06:40:14 EST Distribution: net Organization: Roadway Express Inc., Akron, OH Lines: 34 Xref: linus net.bugs.usg:378 net.micro.att:815 Recently when transferring a C program from a 3B2 to a PC7300, I ran into this bug: When a function in a program has a data space exeeding 32K bytes (words?) of memory, the assembler code produced by the compiler produces an illegal relative branch that would require more than 16bits to execute on a function call. This was found out in a call to the AT&T hotline. Our PC7300 is using UNIX 3.04 with UNIX 2 development tools. However, the same error also occurred on another PC7300 with UNIX 2.0.0.4 and the same development tools. According to the hotline, a similar problem has occurred with FORTRAN which we do not use here. Solutions: 1) Split up the offending function into smaller functions and recompile (with separate modules?) 2) Make some of the data global, but this allegedly has a similar 32k limit. 3) If you need more than 32k use malloc. 4) Make your data structure smaller! In my case, 4 was the solution since I had overgenerously allocated data space. If you haven't heard this before, then you have been WARNED! If you have experienced this problem before and have responses or clarifications, then please post to the net. -------------------------------------------------------------------------------- ________________ ________________ /___| | | | / []|| ROADWAY | | ROADWAY | |____||______________|-|______________| O-----O O O O Andrew C. Eisenberg -- rexago1!bc10@Case.CSNET - for you internet folks ...!decvax!cwruecmp!rexago1!bc10 - for UUCP "Beam me up Scotty, there is no intelligent life here!"