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 middle-end/44690] New: -fzero-initialized-in-bss does not work


const int i;     -fno-zero-initialized-in-bss -> .bss    = FAIL
const int i;        -fzero-initialized-in-bss -> .bss    
const int i = 0; -fno-zero-initialized-in-bss -> .rodata
const int i = 0;    -fzero-initialized-in-bss -> .rodata = FAIL
const int i = 1; -fno-zero-initialized-in-bss -> .rodata
const int i = 1;    -fzero-initialized-in-bss -> .rodata

gcc (GCC) 4.6.0 20100627 (experimental)
(gcc-4.4+ behaves the same)

-fzero-initialized-in-bss is the default now.

(a) Creating .robss would solve it all but OK, there isn't any.

(b) At least -O0 -g should default to -fno-zero-initialized-in-bss as it better
    catches bugs of modified const zeroed variables.


-- 
           Summary: -fzero-initialized-in-bss does not work
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jan dot kratochvil at redhat dot com
GCC target triplet: x86_64-unknown-linux-gnu


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


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