Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Jonathan_B_4
Beginner
145 Views

Internal compiler error using templates

Hello,

When attempting to compile a template function using std::lower_bound, I am getting an inernal compiler error:

error : assertion failed at: "shared/cfe/edgglue/edg_expr.c", line 845

This happens when I am providing both const and non-const implementation. The code works fine in both Visual Studio 2010 compiler and GCC.

With ICC 15.0, if I write:

const_iterator lower_bound(const key_type& k) const{

MyCompare& me = *this;

return std::lower_bound(begin(), end(), k, *this);

}

it works fine. On another hand as soon I add the non-const flavor on top of it:

iterator lower_bound(const key_type& k){

MyCompare& me = *this;

return std::lower_bound(begin(), end(), k, me);

}

The internal compiler shows up.

Can you please help me with this?

 

Thanks

Jonathan

 

0 Kudos
7 Replies
Sukruth_H_Intel
Employee
145 Views

Hi Jonathan,

                    Sorry for the inconvenience caused. I had tried a simple reproducer as attached with const_iterator and was *NOT* able to reproduce the issue that you had mentioned above (Internal error). So could you please provide me a small testcase? So that I can reproduce it on my side and escalate the same to my engineering team.

BTW, I had tried using Intel C++ compiler for system 2015 version on Ubuntu* 12.04 LTS. GCC* version is 4.6.3. Command line used :-

icpc iterator1.cpp -std=c++11

Regards,
Sukruth H V

Jonathan_B_4
Beginner
145 Views

Hi Sukhrut,

Thanks for coming back to me.

I have built a use case which reproduces the problem on Windows, using VS2010, and sent it to you via a private message.

Please keep me informed on your progress on this.

Thanks,

Jonathan

Jonathan_B_4
Beginner
145 Views

Hi Sukhrut,

Any update on this problem? Have you managed to reproduce it on VS 2010.

FYI, I have tested it with ICC on Linux, and there it worked fine. We still need to have it working for Windows as we want to use ICC as a cross-platform compiler.

Thanks

Jonathan

Jonathan_B_4
Beginner
145 Views

Hello,

I have sent you a couple of emails in private but have not heard from you back. I wanted to know if there was any progress on this issue. Our evaluation licence is going to expire soon and we have not managed yet to test our software with ICC as it cannot compile in Windows 7.

Also currently we are using the version 5 of Redhat which looks like it is not supported by ICC 15.0 (linking with stdlib C fails) . We are planning to upgrade to version 7. Can you please confirm ICC 15.0 works fine with Redhat 7?

Please keep me updated on your progress.

Best Regards,

Jonathan

 

Sukruth_H_Intel
Employee
145 Views

Hi Jonathan,

                     I have replied to you through an email with screenshots of VS as how to set some of the attributes to disable some of the warnings. To answer your question regarding the supported OS, Yes we do support RHEL 6 and 7 as well. We have validated our product on the below OS :-

 

Red Hat Enterprise* Linux* 6, 7

 Ubuntu* 10.04 LTS, 12.04 LTS, 14.04

 Fedora* 20

 Wind River* Linux* 5

 openSUSE* 12.1

 SUSE LINUX Enterprise Server* 11 SP2, 12

Please do let me know if you need any further info on the same.

Regards,
Sukruth H V

 

Jonathan_B_4
Beginner
145 Views

Hello,

Is there any progress on the internal compiler error?

FYI, I have managed to workaround it by reimplemention rhe lower_bound method, but then I got other similar crashes afterwards on other stl algorithms.It will be quite costly if I have to reimplement all the stl algorithms we are using.

Thanks and Regards,

Jonathan

Sukruth_H_Intel
Employee
145 Views

Hi Jonathan,

                    Our engineering team had reproduced the issue with a testcase. I have requested them to provide workaround (if any). I would update you on this.

Regards,

Sukruth H V

Reply