Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

internal error: assertion failed at: "shared/cfe/edgcpfe/lower_name.c", line 8771

Xiaoge_S_
Beginner
429 Views

I found a potential problem in the C++ compiler. I can reproduce it using following code, which works OK in Clang 3.2 or G++ 4.8.1:

#include <functional>
#include <cstdio>

class T
{
    public:
        void dosth(int& a, const int* b)
        {
            a=*b;
        }
};

int main(void)
{
    T tt;
    int a=1;
    int b=10;
    auto func=std::bind(&T::dosth, &tt, std::ref(a), &b);
    func();
    printf("%d\n",a);
}

The version I am using is:

icc (ICC) 13.1.1 20130313
Copyright (C) 1985-2013 Intel Corporation.  All rights reserved.

Is there a solution for this?

0 Kudos
4 Replies
TimP
Honored Contributor III
429 Views

Apparently, you must have used g++ -std=c++11.

You could file a problem report on premier.intel.com, as any internal error is a reportable bug.  On another icpc version I get:

xs.cpp(20): error: no instance of overloaded function "std::_Bind<_Functor (_Bound_args...)>::operator() [with _Functor=std::_Mem_fn<void (T::*)(int &, const int *)>, _Bound_args=<T *, std::reference_wrapper<int>, int *>]" matches the argument list
            object type is: std::_Bind<std::_Mem_fn<void (T::*)(int &, const int *)> (T *, std::reference_wrapper<int>, int *)>
    func ();

0 Kudos
QIAOMIN_Q_
New Contributor I
429 Views

Hello Xiaoge,

I tried with 'icc version 13.1.1 (gcc version 4.4.6 compatibility)' and 'icc version 14.0.0 (gcc version 4.4.6 compatibility)' ,the executable both output the value '10' ,so what's your gcc version ?also the compilation options should be 'icc -std=c++11 *.cpp'

 

Thank you.
--
QIAOMIN.Q
Intel Developer Support

Please participate in our redesigned community support web site:
Tools Knowledge Base:          http://software.intel.com/en-us/articles/tools

0 Kudos
Xiaoge_S_
Beginner
429 Views

As mentioned before, I am using gcc 4.8.1. My ICC version looks to be icc version 13.1.1 (gcc version 4.7.0 compatibility), and I used the -std=c++11 parameter.

But it looks like a problem in EDG frontend?

QIAOMIN Q. (Intel) wrote:

Hello Xiaoge,

I tried with 'icc version 13.1.1 (gcc version 4.4.6 compatibility)' and 'icc version 14.0.0 (gcc version 4.4.6 compatibility)' ,the executable both output the value '10' ,so what's your gcc version ?also the compilation options should be 'icc -std=c++11 *.cpp'

 

Thank you.
--
QIAOMIN.Q
Intel Developer Support

Please participate in our redesigned community support web site:
Tools Knowledge Base:          http://software.intel.com/en-us/articles/tools

0 Kudos
Casey
Beginner
429 Views

that code compiles fine with icc 13.1.3.192 (gcc 4.6.3)

[bash]

casey@convect ~/code/icctest $ icc -o ice -std=c++11 ice.cpp
casey@convect ~/code/icctest $ ./ice
10
casey@convect ~/code/icctest $ icc -V
Intel(R) C Intel(R) 64 Compiler XE for applications running on Intel(R) 64, Version 13.1.3.192 Build 20130607
Copyright (C) 1985-2013 Intel Corporation. All rights reserved.[/bash]

0 Kudos
Reply