internal error: assertion failed: lower_constant: bad kind (shared/cfe/edgcpfe/lower_il.c, line 5315)

internal error: assertion failed: lower_constant: bad kind (shared/cfe/edgcpfe/lower_il.c, line 5315)

 % cat test.ii
extern "C" typedef
bool (*IsAcceptableThis) (const int &v);
typedef bool (*NativeImpl) (int *, int);
template < IsAcceptableThis, NativeImpl > void CallNonGenericMethod ();
typedef int (*JSNative) (int *, unsigned, int *);
typedef struct
{
    JSNative op;
}
JSNativeWrapper;
struct A
{
    JSNativeWrapper a;
};
struct B
{
};
template < typename NativeType > class C:B
{
public:
    NativeType ThisType;
    typedef C ThisTypeArray;
    static bool IsThisClass (const int &v);
    static bool fun_subarray_impl (int *, int);
    static int fun_subarray (int *, unsigned, int *)
    {
        CallNonGenericMethod < ThisTypeArray::IsThisClass,
                             ThisTypeArray::fun_subarray_impl > ();
        return 0;
    }
};
class D:public C < int >
{
};
A a[] = { D::fun_subarray };

 % icpc test.ii
test.ii(4): internal error: assertion failed: lower_constant: bad kind (shared/cfe/edgcpfe/lower_il.c, line 5315)
  template < IsAcceptableThis, NativeImpl > void CallNonGenericMethod ();
                                                 ^
compilation aborted for test.ii (code 4)
 % icpc -v
icpc version 13.0.0 (gcc version 4.7.0 compatibility)

2 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

Thank you for reporting this and providing a small example.

I have entered this in our bug tracking database as DPD200236114 and will try to fix it as soon as possible.

One possible workaround is to make the static member functions IsThisClass and fun_subarray_impl global functions instead (of course this might require allowing greater access on some of your member data).

Sorry for the inconvenience.

Judy

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi