This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/13479] [3.4 regression] 20-30% compile-time regression with template-heavy code
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Dec 2003 16:45:53 -0000
- Subject: [Bug optimization/13479] [3.4 regression] 20-30% compile-time regression with template-heavy code
- References: <20031223145058.13479.giovannibajo@libero.it>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From steven at gcc dot gnu dot org 2003-12-27 16:45 -------
Seems to be related to templates. Test case:
template<class type>
class foo {
private:
int size;
type *a;
public:
foo<type> (int max) {
size = max;
a = new type[size];
}
type& foo<type>::operator[] (int index) {
if (index > size)
index = size;
return a[index];
}
};
int test (void)
{
foo<int> bar(2);
bar[1] = 1;
}
gives,
CPROP of ~PtO^HØ , pass 1: 2304 bytes needed, 0 const props, 0 copy props
BYPASS of ~PtO^HØ : 3 basic blocks, 2304 bytes
etc.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13479