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

export symbols loss for builds using ICC with precompiled headers

sav
Novice
1,593 Views

Hello, everyone,

For builds using ICC, a part of export symbols can be lost:

test_icc_pch.png

while there is no such troubles for builds using MSVC:

test_msvc_pch.png

Reproduced for:

not reproduced for:

 

It was revealed by Qt builds using Windows ICC (see QTBUG-62956, QTBUG-62979 and QTCREATORBUG-19303), and Qt Developers believe it's a compiler bug.

Wherein a content of precompiled headers, used for that builds, has no effect on this issue. I.e., the same error reproduced even if '.h' file, used to produce '.pch' file, contain a space symbol only.

A test case to reproduce this issue added in attachment (613127).

 

Environment:

  • Windows 10 x64,
  • IPSXE 2017 Update 5,
  • MSVC 2017 15.3.3,
  • Windows SDK 10.0.15063.468,
  • Qt-5.10-dev (4ad6292028fde7cba698b9c1f7d7d080772d6cd2).

 

Best,
Alexander

 

 

0 Kudos
1 Solution
Judith_W_Intel
Employee
1,593 Views

 

Sorry for the delay. I have submitted this into our internal bugs database as cmplrs-48741.

 

Thanks for creating a nice small reproducer!

 

Judy

View solution in original post

0 Kudos
6 Replies
sav
Novice
1,593 Views

As another possible ICC issue, related to PCH use, can be considered precompilation of testcase from Description using ICC and MSVC:

icl -c -Yc -Fptest_icc_pch.pch -Fotest_icc_pch.obj -Tp test.cpp
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 18.0.1.156 Build 20171018
Copyright (C) 1985-2017 Intel Corporation.  All rights reserved.

test.cpp
test.cpp(2): warning #2728: could not create precompiled header file
  struct __declspec(dllexport) SelectionContext
  ^

<snip>

cl -c -Yc -Fptest_msvc_pch.pch -Fotest_msvc_pch.obj -Tp test.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.12.25830.2 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

test.cpp

<snip>

dir /B test*
test.cpp
test_icc_pch.obj
test_msvc_pch.obj
test_msvc_pch.pch

Found no evidence, that it occur during build of notable OSS projects. But still odd, that ICC failed to produce '.pchi' file from test case, while MSVC built it successfully.

 

0 Kudos
sav
Novice
1,593 Views

Updated description and signed out attached test case. Thereafter can it be registered on Inter bugtracker? Thanks.

 

0 Kudos
Judith_W_Intel
Employee
1,594 Views

 

Sorry for the delay. I have submitted this into our internal bugs database as cmplrs-48741.

 

Thanks for creating a nice small reproducer!

 

Judy

0 Kudos
sav
Novice
1,593 Views

Thanks, Judy.

What about error, mentioned in Post ? Is it expected behavior, or it was registered in that ticket too?

 

Best,

Alexander

 

0 Kudos
Emmenlauer__Mario
New Contributor I
1,593 Views

Is there already progress on this issue? I'm affected by the same problem with the current latest ICC 18.0.2.185.

0 Kudos
Melanie_B_Intel
Employee
1,593 Views

sav wrote:

Thanks, Judy.

What about error, mentioned in Post #2? Is it expected behavior, or it was registered in that ticket too?

 

Best,

Alexander

 

Concerning post #2, the command line option Fpfoo.pch requests that the precompiled header file be created in a file suffixed with .pch, but Intel precompiled header files have a different format than the Microsoft precompiled header files. Microsoft names their files .pch and Intel uses .pchi to avoid confusion and error. 

0 Kudos
Reply