https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67396
Bug ID: 67396 Summary: [4.9/5.0 regression] Performance regression compiling variadic function with many arguments Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: ppluzhnikov at google dot com Target Milestone: --- Created attachment 36270 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36270&action=edit test generator script For https://sourceware.org/bugzilla/show_bug.cgi?id=18872, I need a test case that calls printf() with >= 2700 arguments. GCC-4.9 and 5.0 (and current trunk) take excessively long to compile such test cases with optimization: $ perl gen_bz18872.pl 500 > t.c && time gcc-svn-r227321/bin/gcc -c -O2 t.c user 0m1.506s $ perl gen_bz18872.pl 1000 > t.c && time gcc-svn-r227321/bin/gcc -c -O2 t.c user 0m11.976s $ perl gen_bz18872.pl 2000 > t.c && gcc-svn-r227321/bin/gcc -c -O2 t.c user 1m40.911s $ perl gen_bz18872.pl 4000 > t.c && gcc-svn-r227321/bin/gcc -c -O2 t.c user 14m0.767s ### Yikes! For comparison, gcc-4.8 (Ubuntu 4.8.4-2ubuntu1~14.04) 4.8.4 compiles the 4000 argument case in 1.3s. The problem is already present in r220312 (the oldest build I have).