Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-10241

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • Code Generation Tools
    • CODEGEN-8576
    • Hide
      C7000_2.1.2.LTS
      C7000_2.0.1.STS
      C7000_5.0.0.STS*
      C7000_2.1.0.LTS
      ARM_18.12.0.LTS
      C2000_21.6.0.LTS
      C7000_3.0.0.STS
      C7000_3.1.0.LTS
      ARM_20.2.0.LTS
      C7000_4.0.0.STS
      C7000_4.1.0.LTS
      C2000_20.2.0.LTS
      C7000_1.4.0.LTS
      C2000_22.6.0.LTS
      C7000_2.0.0.STS
      C2000_18.12.0.LTS
      Show
      C7000_2.1.2.LTS C7000_2.0.1.STS C7000_5.0.0.STS* C7000_2.1.0.LTS ARM_18.12.0.LTS C2000_21.6.0.LTS C7000_3.0.0.STS C7000_3.1.0.LTS ARM_20.2.0.LTS C7000_4.0.0.STS C7000_4.1.0.LTS C2000_20.2.0.LTS C7000_1.4.0.LTS C2000_22.6.0.LTS C7000_2.0.0.STS C2000_18.12.0.LTS
    • 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

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

              Created:
              Updated: