Software Archive
Read-only legacy content
公告
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 讨论

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

Christof_Soeger
初学者
1,546 次查看

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 项奖励
3 回复数
Kevin_D_Intel
员工
1,546 次查看

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 项奖励
Kevin_D_Intel
员工
1,546 次查看

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 项奖励
Christof_Soeger
初学者
1,546 次查看

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

0 项奖励
回复