-create_pch bug/feature ?

-create_pch bug/feature ?

Hi!

We have recently switched from ICC8.1 to ICC9.1 on Linux. We observed that the new version of the compiler does not overwrite the PCHI file if it is recreated.

The test is attached.

For example:

$ icpc -V
Intel C++ Compiler for 32-bit applications, Version 9.1 Build 20060323Z Package ID: l_cc_p_9.1.038
Copyright (C) 1985-2006 Intel Corporation. All rights reserved.

$ icpc -c -create-pch cool.pchi cool.cpp
"cool.cpp": creating precompiled header file "cool.pchi"

$ icpc -c -create-pch cool.pchi cool.cpp
"cool.cpp": creating precompiled header file "cool$0.pchi"

$ icpc -c -create-pch cool.pchi cool.cpp
"cool.cpp": creating precompiled header file "cool$1.pchi"

$ icpc -c -create-pch cool.pchi cool.cpp
"cool.cpp": creating precompiled header file "cool$2.pchi"

$ icpc -c -create-pch cool.pchi cool.cpp
"cool.cpp": creating precompiled header file "cool.pchi"

And so on... it loops forever in this fashion.
So why it is doing this? Why not overwriting the file?

We have tested it, with the same results on:
SuSe 9.3
Ubuntu 6.06 (Drapper Drake)

Please find the attached test case and just do "make" 3-4 times in a row.

regards,
Alexandru Ciobanu

2 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

We deliberately generate mutiple pch files. Having multiple PCH files allows better PCH use when there are multiple compiles for a file with different option.

For example if we:

icc -create_pch foo.pch t.c

icc -create_pch foo.pch -fpic -DPIC t.c

# another file

icc -use_pch foo.pch tt.c

If there was only one PCH file created it would be the -fpic compiled version and could not be used in the tt.c compile.

Melden Sie sich an, um einen Kommentar zu hinterlassen.