https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89490

            Bug ID: 89490
           Summary: char array constant put in string merge section
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: amodra at gmail dot com
  Target Milestone: ---

Created attachment 45813
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45813&action=edit
preprocessed source

gold flagged this from a svn r269173 build:
warning:
.../powerpc64le-linux/libstdc++-v3/src/.libs//libstdc++.a(lt1-codecvt.o): last
entry in mergeable string section
'.rodata._ZNSt12_GLOBAL__N_114write_utf8_bomIcEEbRNS_5rangeIT_Lb1EEESt12codecvt_mode.part.0.str1.8'
not null terminated

and yes, 3 bytes are put in the string merge section (flags AMS) without a NUL.
I'm not sure about the classification of this bug since I haven't done any
analysis, it may turn out to be a target problem.

cc1plus -fpreprocessed codecvt.ii -quiet -dumpbase codecvt.cc -mcpu=power9
-auxbase-strip codecvt.o -g -O2 -Wall -Wextra -Wwrite-strings -Wcast-qual
-Wabi=2 -std=gnu++11 -version -fchecking=1 -fno-implicit-templates
-fdiagnostics-show-location=once -ffunction-sections -fdata-sections
-frandom-seed=codecvt.lo -fchar8_t -fPIC -o codecvt.s

Reply via email to