Bug 131383 - Internal compiler error in cp_tree_equal, at cp/tree.c:1627
Summary: Internal compiler error in cp_tree_equal, at cp/tree.c:1627
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc34
Version: 2
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: FC3Target
TreeView+ depends on / blocked
 
Reported: 2004-08-31 20:00 UTC by Sam Black
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-04 07:18:44 UTC


Attachments (Terms of Use)

Description Sam Black 2004-08-31 20:00:20 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1)
Gecko/20020823 Netscape/7.0

Description of problem:
icall.cpp: In function `void SicVal(const T&)':
icall.cpp:26: internal compiler error: in cp_tree_equal, at cp/tree.c:1627


I've reduced the code to the following test case:

struct TfTraits
{
    template <bool B> struct BoolType { static const bool value =
false; };
    template <class T> static T &Hypothetical();
};

struct Sic_Traits
{
    template <class T, bool B> struct _Type { };
};

template <class T, bool B>
class Sic_TypedValHelper
{
public:
    Sic_TypedValHelper(const T &t) : _data(t) { }

private:
    T _data;
};

template <class T>
void SicVal(const T& t)
{
    typedef typename Sic_Traits::_Type<T,
TfTraits::BoolType<(sizeof(foo(TfTraits::Hypothetical<T*>())) ==
sizeof(TfTraits::BoolType<true>))>::value> TypeTraits;
    new Sic_TypedValHelper<T,
!TfTraits::BoolType<(sizeof(foo(TfTraits::Hypothetical<T*>())) ==
sizeof(TfTraits::BoolType<true>))>::value>(t);
}


Version-Release number of selected component (if applicable):
gcc-3.4.1-1

How reproducible:
Always

Steps to Reproduce:
1. Place the above source code in icall.cpp
2. gcc -c icall.cpp
    

Actual Results:  icall.cpp: In function `void SicVal(const T&)':
icall.cpp:26: internal compiler error: in cp_tree_equal, at cp/tree.c:1627


Expected Results:  The code should compile.

Additional info:

This works fine with gcc 3.2 and gcc 3.3.

Comment 1 Jakub Jelinek 2004-10-04 07:18:44 UTC
Moved upstream, http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17826


Note You need to log in before you can comment on or make changes to this bug.