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

ICC 11.1: internal error: get_pointer_offset: bad kind

Zdenek_Sojka
Beginner
368 Views
Hello,

I am having problem with the attached code, which was reduced from OpenTTD. I tried searching for the problem at the forums, the search shows 11 results - but only 1 is shown, no matter if I press "next/last/prev/first/1/2" buttons. So sorry if it is a duplicate.

I hope this contains all needed information:
$ uname -a
Linux amd64 2.6.35-gentoo-r12 #1 SMP Mon Nov 1 13:42:50 CET 2010 x86_64 AMD Phenom 9950 Quad-Core Processor AuthenticAMD GNU/Linux
$ /opt/intel/Compiler/11.1/072/bin/intel64/icpc testcase.C -v
Version 11.1
/opt/intel/Compiler/11.1/072/bin/intel64/mcpcom -_g -mP3OPT_inline_alloca -D__HONOR_STD -D__ICC=1110 -D__INTEL_COMPILER=1110 -D_MT "-_Asystem(unix)" -D__ELF__ "-_Acpu(x86_64)" "-_Amachine(x86_64)" -D__INTEL_COMPILER_BUILD_DATE=20100414 -D__PTRDIFF_TYPE__=long "-D__SIZE_TYPE__=unsigned long" -D__WCHAR_TYPE__=int "-D__WINT_TYPE__=unsigned int" "-D__INTMAX_TYPE__=long int" "-D__UINTMAX_TYPE__=long unsigned int" -D__LONG_MAX__=9223372036854775807L -D__QMSPP_ -D__OPTIMIZE__ -D__NO_MATH_INLINES -D__NO_STRING_INLINES -D__GNUG__=4 -D__GNUC__=4 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 -D__NO_INLINE__ -D__i686 -D__i686__ -D__pentiumpro -D__pentiumpro__ -D__pentium4 -D__pentium4__ -D__SSE2__ -D__tune_pentium4__ -D__MMX__ -D__SSE__ -D__LP64__ -D_LP64 -D_GNU_SOURCE=1 -D__DEPRECATED=1 -D__GXX_WEAK__=1 -D__GXX_ABI_VERSION=1002 "-D__USER_LABEL_PREFIX__= " -D__REGISTER_PREFIX__= -D__INTEL_RTTI__ -D__EXCEPTIONS=1 -D__unix__ -D__unix -D__linux__ -D__linux -D__gnu_linux__ -B -Dunix -Dlinux -D__x86_64 -D__x86_64__ -_k -_8 -_l -_a -_b --gnu_version=430 -_W5 --gcc-extern-inline -p --bool -tused -mGLOB_eh_linux -x --mspp --multibyte_chars --bool -mP1OPT_version=11.1-intel64 -mGLOB_diag_file=/tmp/icpc6qSoue.diag -mP1OPT_print_version=FALSE -mP3OPT_use_mspp_call_convention -mCG_use_gas_got_workaround=F -mP2OPT_align_option_used=TRUE -mGLOB_options_string=-v -mGLOB_cxx_limited_range=FALSE -mGLOB_as_output_backup_file_name=/tmp/icpcOg7Vg9as_.s -mIPOPT_activate -mIPOPT_lite -mGLOB_machine_model=GLOB_MACHINE_MODEL_EFI2 -mGLOB_extended_instructions=0x8 -mIPOPT_args_in_regs=0 -mPGOPTI_value_profile_use=T -mP2OPT_hlo_level=2 -mP2OPT_hlo -mIPOPT_obj_output_file_name=/tmp/icpc6qSoue.o -mGLOB_linker_version=2.20.1.20100303 -mP3OPT_asm_target=P3OPT_ASM_TARGET_GAS -mGLOB_obj_output_file=/tmp/icpc6qSoue.o -mGLOB_source_dialect=GLOB_SOURCE_DIALECT_C_PLUS_PLUS -mP1OPT_source_file_name=testcase.C testcase.C
#include "..." search starts here:
#include <...> search starts here:
/opt/intel/Compiler/11.1/072/include/intel64
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include/g++-v4
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include/g++-v4/x86_64-pc-linux-gnu
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include/g++-v4/backward
/opt/intel/Compiler/11.1/072/include/intel64
/opt/intel/Compiler/11.1/072/include
/usr/include
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.5/include
End of search list.
testcase.C(15): internal error: get_pointer_offset: bad kind
int i = b.f ();
^

compilation aborted for testcase.C (code 4)
rm /tmp/icpcNiGmEClibgcc

rm /tmp/icpcxK1dzVgnudirs

rm /tmp/icpc983Apxdashv

rm /tmp/icpc4iS5kQgas

rm /tmp/icpcOg7Vg9as_.s

rm /tmp/icpc2edNcsldashv

rm /tmp/icpcEznY8Karg

rm /tmp/icpc6qSoue.o

0 Kudos
4 Replies
Andreas_Klaedtke
Beginner
368 Views
I have tried version 12.0.0 of the C++ compiler and it does not show the problem version 11.1.056 has.

Btw: I think you forgot the empty brackets "()" for the g() function call in foo.
0 Kudos
Mark_S_Intel1
Employee
368 Views
I can reproduce the error with the 11.1.072 compiler but not with the latest 12.0 compiler. Please try the 12.0 compiler and see if that works for you. You should also use the compiler drive "icpc" rather than calling "mcpcom" directly.

--mark
0 Kudos
bernaske
New Contributor I
368 Views
Hi,

i have testcase.C compile with the icc from Composer XE 12.0 compiler
on:

openSUSE 11.4 M3 64 Bit Release
Kernel: 2.6.37-rc2-1-desktop
glibc: 2.11.2-8.1

result: no error, compile normal
0 Kudos
Zdenek_Sojka
Beginner
368 Views
Thank you for replies! Good to hear it compiles fine in the new version. It is not available in Gentoo repository yet, but it shouldn't take long. Thanks again
0 Kudos
Reply