https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111577
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |WORKSFORME --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- [apinski@xeond2 gcc]$ ~/upstream-gcc/bin/g++ -Os -std=c++2b -march=skylake -m64 t.cc [apinski@xeond2 gcc]$ size -A a.out a.out : section size addr .interp 28 4195096 .note.gnu.property 32 4195128 .note.ABI-tag 32 4195160 .hash 76 4195192 .gnu.hash 52 4195272 .dynsym 336 4195328 .dynstr 494 4195664 .gnu.version 28 4196158 .gnu.version_r 144 4196192 .rela.dyn 48 4196336 .rela.plt 192 4196384 .init 27 4198400 .plt 144 4198432 .text 1341 4198576 .fini 13 4199920 .rodata 99 4202496 .eh_frame_hdr 92 4202596 .eh_frame 440 4202688 .gcc_except_table 29 4203128 .init_array 8 4210128 .fini_array 8 4210136 .dynamic 528 4210144 .got 16 4210672 .got.plt 88 4210688 .data 16 4210776 .bss 8 4210792 .comment 108 0 .gnu.build.attributes 7368 4218992 Total 11795 [apinski@xeond2 gcc]$ ~/upstream-gcc/bin/g++ -O0 -std=c++2b -march=skylake -m64 t.cc [apinski@xeond2 gcc]$ size -A a.out a.out : section size addr .interp 28 4195096 .note.gnu.property 32 4195128 .note.ABI-tag 32 4195160 .hash 368 4195192 .gnu.hash 356 4195560 .dynsym 1272 4195920 .dynstr 3067 4197192 .gnu.version 106 4200260 .gnu.version_r 176 4200368 .rela.dyn 48 4200544 .rela.plt 264 4200592 .init 27 4202496 .plt 192 4202528 .text 6162 4202720 .fini 13 4208884 .rodata 106 4210688 .eh_frame_hdr 548 4210796 .eh_frame 2276 4211344 .gcc_except_table 85 4213620 .init_array 8 4218320 .fini_array 8 4218328 .dynamic 528 4218336 .got 16 4218864 .got.plt 112 4218880 .data 16 4218992 .bss 8 4219008 .comment 108 0 .gnu.build.attributes 7368 4227208 Total 23330 For me on the trunk with the correct output -Os is smaller. 1341 vs 6162 for the text size.