title: What limits the number of nested loops in c?
body: <p><strong>Edit:</strong> For those of you looking for an answer to the question as stated the standard limits the number of nested loops at compile time.  At runtime this is a different issue as the only limit would be the size of the program segment.</p>
  
  <p><strong>Solved:</strong> I was looking too early on in the build process.  The c file gets further preprocessing applied to it.  Off to the subsequent steps.</p>
  
  <p>I have a problem with c code generated via perl from a language that applies rules for generating pronunciation.  In essense the input is a huge dictionary of exceptions for pronounciation rules.  The code is riddled with gotos and it worked up until one of the exception dictionaries reached 23K rules.  </p>
  
  <p>The code is basically unreadable but I have managed to make the c code compile after removing what appears to be the 6200th nested loop:</p>
  
  <pre><code>for (dictionionary1=seed1;dicitonary1&lt;limit1;dictionary1++)
  {
      for (dictionionary2=seed2;dicitonary2&lt;limit2;dictionary2++)
      {
             /* .... */
          for (dictionionary6199=seed6199;dicitonary6199&lt;limit6199;dictionary6199++)
          {
                 /* two hundred more removed adding one makes it not compile */
  
          }
  
      }
  }
  </code></pre>
  
  <p>Both gcc and xlC are able to handle these but aCC  3.73 (on H11.23 PA RISC) is puking. </p>
  
  <pre><code>Compiling /home/ojblass/exception_dictionary_a.c...
  Loading the kernel...
  Pid 18324 killed due to text modification or page I/O error
  /bin/ksh: 28004 Bus error(coredump)
  *** Error exit code 138
  </code></pre>
  
  <p>I have found this <a href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=378529" rel="nofollow noreferrer">link</a> and tried many of the suggested fixes without success.</p>
  
  <p>For legacy reasons I have to compile for 32 bit (it uses a 32 bit library that I have no 64 bit counterpart for).  </p>
  
  <pre><code>maxdsiz = 256 MB (x10000000) tried up to 4 GB
  maxssiz = 16 MB (x1000000) tried up to 100MB
  maxtsiz = 256 MB (x10000000) tried up to 1 GB
  </code></pre>
  
  <p>Any suggestions at compiler settings or a good link for documetation for aCC 3.73?  I am drowning in search results.  </p>
  
  <p>I have coded a workaround breaking the dictionary into two parts resulting in dictionary_an.c and dictionary_az.c.  I have had to touch some core logic I don't feel comfortable touching in order to pull this off and I was hoping to back down to the original configuration.</p>