This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/80462] New: [avr] Incorrect "warning: uninitialized variable 'xxx' put into program memory area" for identical strings


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

            Bug ID: 80462
           Summary: [avr] Incorrect "warning: uninitialized variable 'xxx'
                    put into program memory area" for identical strings
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gjl at gcc dot gnu.org
  Target Milestone: ---

const __flash char string1[] = "same string";
const __flash char string2[] = "same string";

throws the following incorrect warning when compiled with -Os -Wall
-fmerge-all-constants:

file.c:2:20: warning: uninitialized variable 'string2' put into program memory
area [-Wuninitialized]
 const __flash char string2[] = "same string";
                    ^~~~~~~

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]