Bug 11150 - [3.3/3.4 Regression] No code generated with explicit template instantiation
Summary: [3.3/3.4 Regression] No code generated with explicit template instantiation
Status: RESOLVED DUPLICATE of bug 10968
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.3
: P2 normal
Target Milestone: 3.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: 11148
  Show dependency treegraph
 
Reported: 2003-06-11 04:14 UTC by Andrew Pinski
Modified: 2004-01-17 04:22 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2003-06-11 14:21:22


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2003-06-11 04:14:39 UTC
Compile the following code:
template <typename X>
class Foo {
    int i;
public:
    Foo() {
        X::explode();
    }
};

class Bar {
    Foo<int> foo_;
public:
    Bar() {}
};

template class Foo<int>;
and see that Foo<int>::Foo<int>() is not generated.
It used to generate code under 3.2.3.  This is from bug 11148 which I split up.
Comment 1 Kriang Lerdsuwanakij 2003-06-11 14:21:22 UTC
This is the correct testcase:

template <typename X>
class Foo {
    int i;
public:
    Foo() {
    }
};

class Bar {
    Foo<int> foo_;
public:
    Bar() {}
};

template class Foo<int>;
Comment 2 Wolfgang Bangerth 2003-06-11 14:36:13 UTC
May be related to PR 10968 which Jason fixed yesterday. Will
spin  a new bootstrap and check soon.
Comment 3 Wolfgang Bangerth 2003-06-11 15:25:11 UTC
Fixed indeed by Jason's patch of yesterday.

*** This bug has been marked as a duplicate of 10968 ***