Software Archive
Read-only legacy content
17060 Discussions

compiler internal error when compiling with gmpxx.h for mic with -std=c++11

Christof_Soeger
Beginner
1,532 Views

Hi,

I'm using gmp (https://gmplib.org/) for a project. With c++11 enabled AND using offload to mic, compilation gives me an internal error. I attached a small example for demonstration

$icpc -fopenmp -std=c++11 -wd3218 -I. -o device_nr.o -c device_nr.cpp

./gmpxx.h(1927) (col. 18): internal error: assertion failed at: "shared/cfe/edgcpfe/il_to_str.c", line 6593

compilation aborted for device_nr.cpp (code 4)

The example itself is not important, the relevant part is

#pragma offload_attribute (push,target(mic))
#include <gmpxx.h>
#pragma offload_attribute (pop)

The error is then triggered by this line in gmpxx.h

inline mpz_class operator"" _mpz(const char* s)

(which is only active with c++11 enabled). Compilation on the host is no problem, it only happens compilation for mic.

Is this an compile bug?

 

EDIT: I'm using icpc (ICC) 15.0.0 20140723

0 Kudos
3 Replies
Kevin_D_Intel
Employee
1,532 Views

Yes, this is in a compiler bug. Any internal error whether source is correct or not should not trigger an internal error. I will try reproducing this and post an update shortly. Thank you for isolating and reporting this.

0 Kudos
Kevin_D_Intel
Employee
1,532 Views

I submitted this to Development (see internal tracking id below) for further analysis and repair. I was unable to find a work around but requested Development's advice/help with that and I will pass that along if something is available.

(Internal tracking id: DPD200364017)

0 Kudos
Christof_Soeger
Beginner
1,532 Views

Thanks for the feedback. For now I can comment out the code in the gmpxx header as I don't use this part.

0 Kudos
Reply