[Bug c++/59614] New: [4.9 regression] Explostion in compile time of heavily templated code
ivanov.maxim at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Dec 27 23:58:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59614
Bug ID: 59614
Summary: [4.9 regression] Explostion in compile time of heavily
templated code
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ivanov.maxim at gmail dot com
4.9 takes forever to compile code, which compiles in 9 seconds by version
4.8.2.
gdb shows that g++ spends time in "mark_type_abi_tags" function, which was
introduced in
http://gcc.gnu.org/git/?p=gcc.git;a=commit;h=9181c3d9ceed054efd8488eaea91d89353bb8d21
If I read patch correctly, 4.9 visits all template arguments recursively for
every template instantiation, but 4.8 didn't, at least not in "check_abi_tags".
I created following somewhat pathological, but still correct test case, with
help of Boost.MPL and Boost.Fusion, to make very deep template with high number
of occurrences of same templates in different parts of that template tree, you
can find it in this ticket attachment (had to compress it, otherwise it
wouldn't fit into bugzilla's 1000K size limit).
Version I was testing on is:
GNU C++ (SUSE Linux) version 4.9.0 20131210 [trunk revision 205857]
(x86_64-suse-linux)
compiled by GNU C version 4.9.0 20131210 [trunk revision 205857], GMP
version 5.1.2, MPFR version 3.1.2, MPC version 1.0
Thank you for your time.
More information about the Gcc-bugs
mailing list