icl crashed compiling following code

icl crashed compiling following code

//name: h.cpp:

//actually no other codes

compiler option:

icl.exe -c -Od -Zi W3 -GF -EHsc -Gy -Gd -Fo"Debug/" -Fd"Debug/" -D "_AFXDLL" -MD -D "WIN32" -D "_MBCS" -D "_CONSOLE" h.cpp

Intel C++ Compiler for 32-bit applications, Version 7.1 Build 20030307Z
Copyright (C) 1985-2003 Intel Corporation. All rights reserved.

Can someone explains why?

Also is it possible for the compiler to generate
errors instead of warning messages, for the pointer conversions like:

const char *q;
char *q1 = q; // generates only warning here
int *p = q1; // generates only warning here

Thanks in advance.

- xin

9 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I wasn't able to reproduce the crash, but I think I have an answer for your second question.

If you'll note, the warning that you would like to change to an error is this:

t.cpp(2): warning #144: a value of type "const char *" cannot be used to initialize an entity of type "char *"

On Windows, you can turn this warning into an error by adding the -Qwe144 switch. Note that I used 144 for "warning #144".

On Linux, you can do the same thing with -we144

icl -help will describe these options.


Thanks a lot!

For the first problem I found even there is only one include the compiler will crash in my system:

// no other code

icl -c -Od -Zi -W3 -GF -EHsc -Gy -Gd -D "_AFXDLL" -MD -D "WIN32" -D "_MBCS" -D "_CONSOLE"
Intel C++ Compiler for 32-bit applications, Version 7.1 Build 20030307Z
Copyright (C) 1985-2003 Intel Corporation. All rights reserved.

C:Program FilesMicrosoft Visual Studio .NETVc7INCLUDExlocnum(1129): (col. 37)internal error: assertion failed at: "proton/edgglue/edg_main.c", line 593

I also found it went through without any problem if I remove one of the three flags, -MD or -Zi or -Od.

- xin

Really only 2 switches are required for this assertion
-MD and any one from the list -Zi -ZI -Z7
So assertion requirements:
1. using STD lib from MSVC7.0
2. using dynamic RTL version
3. request for debug symbols included.

try the combo of "-O1 -Zi -MD" ?

Anyway, do you think it is a bug from icl?

Yes, surely. I can open the corresponding issue in the Intel Support. BTW, it is not the only bug in icl dealing with locales.

Wanted to add that I think this is fixed in W_CC_PU_7.1.010 available on Premier Support (https://premier.intel.com).

Intel Developer Support

For on-line assistance: http://support.intel.com/support/performancetools
For product support information: http://www.intel.com/software/products/support
* Intel and Pentium are registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries
* Other names and brands may be claimed as the property of others

I found a workaround for the first problem.
It uses the undocumented MS linker switch /alternatename.
This switch can be added in the additional linker options (1),
or into source code via #pragma comment(linker, "...") (2).

In the linker options, add:


In one of your sources, after the includes, write:

#pragma comment(linker, "/alternatename:__imp_??6std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z=__imp_??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z")

I am also facing a similar problem wherein my code crashes when I use any of the optimization options lile /O3 /Og etc with icl ver 8.0.
I tried using MS linker switch #pragma comment(linker, "/alternatename........"
in the source file but I get the following warning:
a.obj : warning LNK4044: unrecognized option "alternatename:__imp......."

I have MSVC ver 6.0. Do I need MSVC ver 7.0 in order to compile.

Also, the code works fine if I use icl ver7.0 for compilation with the optimization options but crashes with icl ver 8.0.

Leave a Comment

Please sign in to add a comment. Not a member? Join today