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

Bug report: pointer to array of incomplete type causes segfault in mcpcom

wulf4
Beginner
349 Views

Hello,

I found no better place for a bug report, so I'll try here.

I wondered if this program is correct C; gcc does not compile it, Sun C does. So I tried icc to get a third opinion :-)

int main(void)
{
struct foo { struct foo (*ptr)[1]; };
}

$ icc blah.c

icc: error #10106: Fatal error in /home/wulf4/intel/Compiler/11.1/064/bin/ia32/mcpcom, terminated by segmentation violation
compilation aborted for blah.c (code 1)

valgrind is very noisy, first message shown:

==13563== Conditional jump or move depends on uninitialised value(s)
==13563== at 0x85EAE25: __intel_sse2_strlen (in /home/wulf4/intel/Compiler/11.1/064/bin/ia32/mcpcom)

system information:

debian unstable, linux 2.6.30-1-686, eglibc 2.10.2

icc Version 11.1

Celeron M CPU 520

Cheers

Wulf4

0 Kudos
3 Replies
TimP
Honored Contributor III
349 Views

icc aims for gcc compatibility, so it's not entirely surprising if it doesn't go beyond what your active gcc does. An internal error, at least when running on a supported system, would be a bug reportable on your premier.intel.com account.

$ icl wulf.c
Intel C++ Compiler Professional for applications running on IA-32, Version 11
.1 Build 20091130 Package ID: w_cproc_p_11.1.054
Copyright (C) 1985-2009 Intel Corporation. All rights reserved.

wulf.c
compilation aborted for wulf.c (code -1073741571)

This does seem excessively cryptic, given that gcc gives an indication what it doesn't like:

$ gcc wulf.c
wulf.c: In function `main':
wulf.c:3:27: error: array type has incomplete element type
0 Kudos
Om_S_Intel
Employee
349 Views

The statement is ill formed.

The compiler must not crash. The icc crashing is bug. I have submitted a report to Intel compiler development team.

0 Kudos
wulf4
Beginner
349 Views
Thank you; please let me know if you need additional information!
0 Kudos
Reply