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

            Bug ID: 90340
           Summary: Not optimal code when compiling C library for
                    vsnprintf, code size increase 17%
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fredrik.hederstie...@securitas-direct.com
  Target Milestone: ---

Created attachment 46284
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46284&action=edit
Testcase with example code <vsprintf.c> from Linux C library

When compiling some old Linux kernel library code for vsnprintf, the code
generated seems not optimal, and code size increased almost 17% for Cortex.M.

This was starting with gcc-9.1.0, previous versions did not show this.

(Generally when testing against CSiBE the overall average code size increased
with gcc-9.1.0 compared to previous version for the first time since gcc-4.6.0)
http://gcc.hederstierna.com/csibe/

Attached stripped example file from Linux library.
Compliled with -Os (makefile attached)

Gcc-8.2.0 generated more compact code size 806 bytes,
Gcc-9.1.0 generated some large switch table code size 942 bytes.
Difference is +136 bytes (+16.9%).

Reply via email to