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

icc doesn't compile code but gcc does

kern
Beginner
751 Views
Dear Intel Compiler Community!

I have an issue where icc and icpc (both report Version 11.1) fail to compile a code while gcc and g++ work perfectly fine. The maintainers of that code lead me to believe that this is an internal compiler error within icc/icpc.

The problem occurs when parsing a header file from the amiramesh library (http://www.amiravis.com/Ext411-01-libamiramesh/index.html).

In order to reproduce the issue, try the following calling sequence (I don't see much of a point in posting thousands of lines of output here as this appears to be easy to reproduce).

tar xfz libamiramesh-Linux.tar.gz
dune-common/bin/dunecontrol --opts=intelnompi.opts all

where intelnompi.opts looks like this:
CONFIGURE_FLAGS=" --with-amiramesh=../libamiramesh-Linux \
CC=icc \
CPPFLAGS=-DHX_HAS_STDIOSTREAM \
CXX=icpc \
CXXFLAGS='-I../libamiramesh-Linux/include/amiramesh -DHX_HAS_STDIOSTREAM' \
--disable-tr1-headers"

Omitting the CC=.. and CXX=.. lines from intelnompi.opts makes the system fall back to the GNU compilers which do the job just fine. In case these steps to reproduce the error don't work, I have uploaded the full output to

I'd appreciate any comments/suggestions/tips etc.

Leonard.
0 Kudos
1 Solution
Judith_W_Intel
Employee
751 Views

I've reduced your code to this small example which shows the problem:

template

struct CBase

{

void trace(int);

};

template< class T >

struct C : public CBase

{

template< int codim >

void trace()

{

trace(4);

}

using CBase::trace;

};

int main() {

C c;

c.trace<1>();

return 0;

}

As a workaround I thinkyou can move the using declaration of traceto somewhere before the call.
That seems to prevent the internal error. In the meantime, we're working on a fix....

Judy

View solution in original post

0 Kudos
8 Replies
TimP
Honored Contributor III
751 Views
For a full icpc version report, you need icpc -V. The latest update has more c++0x support than earlier ones, but certainly not complete, and I don't believe the std=c++0x option is recognized.
In any case, an internal error on a current release is a reportable bug, so you could submit the file which provokes it in a problem report on https://premier.intel.com (open a support account at https://registrationcenter.intel.com, if you haven't done so already).
0 Kudos
kern
Beginner
751 Views
Quoting - tim18
For a full icpc version report, you need icpc -V. The latest update has more c++0x support than earlier ones, but certainly not complete, and I don't believe the std=c++0x option is recognized.
In any case, an internal error on a current release is a reportable bug, so you could submit the file which provokes it in a problem report on https://premier.intel.com (open a support account at https://registrationcenter.intel.com, if you haven't done so already).

Hello tim18,

thanks for your reply. I filed that bug report now, so I guess this topic may be considered closed. For the record, icpc -V gives:
Intel C++ Compiler Professional for applications running on IA-32, Version 11.1 Build 20090511 Package ID: l_cproc_p_11.1.038
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.
30 DAY EVALUATION LICENSE

icpc: NOTE: The evaluation period for this product ends on 2-oct-2009 UTC.

Leonard.

UPDATE: I'm in the processes of getting the compiler version 11.1.046 hoping that this will resolve the issue.
0 Kudos
KitturGanesh
Employee
751 Views

Hi,
I just noticed an issue filed in Premier, and I'll respond there on this, just FYI
-thanks,
Kittur
0 Kudos
KitturGanesh
Employee
751 Views
Hi Leonard,
I've reproduced the issue generating a smaller test case that reproduces the internal error when compiling icpc.
Also, I"ve filed the issue with our developers and will update this post as soon as there's an update on this issue, just FYI.

BTW, the option -stdc++0x isvalid in icpc, and enables preliminary support for some C++0x features (like Lambda, auto etc). Once, this internal error issue is resolved, we can then attempt to build your application and see if there are any problems or issues encountered thereof.

-regards,
Kittur
0 Kudos
kern
Beginner
751 Views
Hi Leonard,
I've reproduced the issue generating a smaller test case that reproduces the internal error when compiling icpc.
Also, I"ve filed the issue with our developers and will update this post as soon as there's an update on this issue, just FYI.

BTW, the option -stdc++0x isvalid in icpc, and enables preliminary support for some C++0x features (like Lambda, auto etc). Once, this internal error issue is resolved, we can then attempt to build your application and see if there are any problems or issues encountered thereof.

-regards,
Kittur
Hi Kittur,

thank you for your efforts! I'll be (patiently) standing by for any updates.

Best regards,
Leonard.
0 Kudos
Judith_W_Intel
Employee
752 Views

I've reduced your code to this small example which shows the problem:

template

struct CBase

{

void trace(int);

};

template< class T >

struct C : public CBase

{

template< int codim >

void trace()

{

trace(4);

}

using CBase::trace;

};

int main() {

C c;

c.trace<1>();

return 0;

}

As a workaround I thinkyou can move the using declaration of traceto somewhere before the call.
That seems to prevent the internal error. In the meantime, we're working on a fix....

Judy

0 Kudos
kern
Beginner
751 Views

As a workaround I thinkyou can move the using declaration of traceto somewhere before the call.
That seems to prevent the internal error. In the meantime, we're working on a fix....


Hello Judy,

I've relayed your workaround to the dune developer team. They implemented it and icpc is now able to compile the packages without errors. Thank you _very_ much.

Best regards,
Leonard.
0 Kudos
KitturGanesh
Employee
751 Views

Hi,
This issue is fixed in the latest version of the compiler that's released. You can download the Intel Composer XE update 1 release from the https://registrationcenter.intel.com/RegCenter/
-regards,
Kittur

0 Kudos
Reply