Bug 131383

Summary: Internal compiler error in cp_tree_equal, at cp/tree.c:1627
Product: [Fedora] Fedora Reporter: Sam Black <penguin>
Component: gcc34Assignee: Jakub Jelinek <jakub>
Status: CLOSED UPSTREAM QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 2   
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-04 07:18:44 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 123268    

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