Loop that iterates a very large number of times causes compiler to fail with: Optimizer terminated abnormally

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low
    • Code Generation Tools
    • CODEGEN-8576
    • Hide
      C7000_6.x.0.LTS*
      C7000_2.1.2.LTS
      C7000_2.0.1.STS
      C7000_6.0.0.STS
      C7000_2.1.0.LTS
      C7000_5.0.0.LTS
      C7000_3.0.0.STS
      C7000_3.1.0.LTS
      C7000_4.0.0.STS
      C7000_4.1.0.LTS
      C7000_1.4.0.LTS
      C7000_2.0.0.STS
      C7000_6.1.0.STS
      Show
      C7000_6.x.0.LTS* C7000_2.1.2.LTS C7000_2.0.1.STS C7000_6.0.0.STS C7000_2.1.0.LTS C7000_5.0.0.LTS C7000_3.0.0.STS C7000_3.1.0.LTS C7000_4.0.0.STS C7000_4.1.0.LTS C7000_1.4.0.LTS C7000_2.0.0.STS C7000_6.1.0.STS
    • default

      The attached source file has this function ...

      static void writeData(uint8_t* pbyData, uint64_t sizeSize)
      {
              for(uint64_t x = 0; x < sizeSize; x++) {
                      pbyData[x] = (uint8_t)x;
              }
      }

      The function is invoked with the constant value 0x100000000 for the second argument sizeSize.  Under -o3, the compiler is able to determine that the loop iterates 0x100000000 times.  Something then goes wrong as the optimizer part of the compiler processes this very large iteration count.

      % cl7x -o3 main.cpp
      
      >>>> Optimizer terminated abnormally
      >>>>    in function main()
      >>>>    in file "main.cpp"
      
      This is caused by a defect in the TI C/C++ Optimizer.
      TI Customer Support may be able to suggest a workaround to avoid this.
      
      Upgrading to the newest version of the compiler may fix this problem.
      
      Contact TI in the E2E support forums at http://e2e.ti.com under
      "Development Tools", "TI C/C++ Compiler".  See the link titled
      "Submitting an issue".
      
      We need to see this ENTIRE error message and a complete, reproducible
      test case including ALL of the command-line options.
      Include the .pp file created by option --preproc_with_comment
      
      >> Compilation failure

            Assignee:
            TI User
            Reporter:
            TI User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Connection: Intermediate to External PROD System
                EXTSYNC-2777 - Loop that iterates a very large num...
                SYNCHRONIZED
                • Last Sync Date: