[Bug c/49081] New: Incorrect counter used for compilation of string literals.

Roger.Jeurninck at home dot nl gcc-bugzilla@gcc.gnu.org
Fri May 20 16:10:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49081

           Summary: Incorrect counter used for compilation of string
                    literals.
           Product: gcc
           Version: 4.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: Roger.Jeurninck@home.nl


Created attachment 24301
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24301
reproduction file

------------------------------------------------
Bug found on Solaris 10 / gcc 4.4.2
Reproduceable on Ubuntu 10.04 / gcc 4.4.3
------------------------------------------------

Description

Incorrect counter used for compilation of string literals. 
(see attached example, and reproduction scenario)
By adding some dummy variables the static local string literals will get a
different symbol name which results in a binary different output file.
We have analysed that this can be solved by introducing a 'static' counter, see
attached solution.

Please let me know if you need more comments on the attached files.
thanks,
Roger



More information about the Gcc-bugs mailing list