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

Use of -Og generates code that is hard to debug

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low

      The documentation of -Og states that several optimizations are not performed. Examples include no function inlining, and no value propagation. The idea is to optimize, but not to the point of making debug difficult.

      The attached source code has a static function and a static structure. Build it.

      $ tiarmclang @options.txt -S file.c
      

      Inspect the resulting assembly in file.s. The call to the static function is inlined. The static structure is eliminated.

      Please see the related forum thread for further context.

            syncuser TI User
            syncuser TI User
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: