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

Array created with std::array is mistakenly in a section that is initialized, instead of uninitialized

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Not Prioritized Not Prioritized

      The attached test case has these lines ...

      int builtin_array[100];
      std::array<int, 100> std_array;
      

      Build it and search the assembly for the lines that put each array in a section.

      $ tiarmclang -S file.cpp
      
      $ findstr section file.s | findstr array
              .section        .bss.builtin_array,"aw",%nobits
              .section        .data.std_array,"aw",%progbits
      

      The builtin_array is in an uninitialized section. The std_array is in an initialized section. They should both be in an uninitialized section.

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

              Created:
              Updated: