Compiler inconsistently handles multiple definitions of a global variable in different files with and without link time optimization

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Low

      The attached files each contain this variable definition ...

      void *global_handle;
      

      Build it with no optimization ...

      % armcl -mv7m4 -mt -me f1.c f2.c -z -o f.out
      [f1.c]
      [f2.c]
      <Linking>
      

      ... a clean build results. Build it with link time optimization ...

      % armcl -mv7m4 -mt -me -o4 f1.c f2.c -z -o f.out
      [f1.c]
      [f2.c]
      <Linking>
      error: symbol "global_handle" has already been defined
      
      >> Compilation failure
      
      >> Compilation failure
      fatal error: Failed linktime optimization
      
      >> Compilation failure
      

      ... errors are emitted.

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

              Created:
              Updated:

                Connection: Intermediate to External PROD System
                EXTSYNC-3582 - Compiler inconsistently handles mul...
                SYNCHRONIZED
                • Last Sync Date: