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)

publicaciones de 2 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

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

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya