- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi,
I made a console application which print something and then exit, after printing instead of exit immediately, like the same application compiled with other compilers it delays the exit, what would be the reason for that?
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Ok I found the issue:
Basically before the loop that follows, I have:
v85 = v5 + 1;
v87 = 1;
for ( j = v87; j <= v83; ++j ) //V87 TRAIN FROM, V83 PREDICT TO
{
*(int *)(handle + sizeof(int) * j) = *(int *)(byte_4BC818 + sizeof(int) * j);
}
so I had to move the line v85 = v5 + 1; after the scanf that counts how many values are in the data file, v5 is the counter.
コピーされたリンク
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Why is it related to Intel DPC++/C++ compiler?
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi,
The issue seems related to optimization, when turned off, works fine, when turn on, sometime got output and sometime no output but always delay in exit.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
A reproducer and exact commands used need to be provided for understanding your issue.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
These are the commands:
icx /QxHOST /Ot /Qansi-alias -Qipo VRA.c -o VRASPEED
icx /QxHOST /O1 /Qansi-alias VRA.c -o VRASIZE
icx /QxHOST /O2 /Qansi-alias -Qipo VRA.c -o VRASPEED1
icx /QxHOST /O3 /Qansi-alias -Qipo VRA.c -o VRAMAXSPEED
icx /QxHOST /Os /Qansi-alias VRA.c -o VRASIZE2
icx /QxHOST /Ot /Qiiansi-alias -Qipo VRA.c -o VRASPEED2
icx /QxHOST /Od /Qansi-alias -Qipo VRA.c -o VRADISABLE ; THIS IS THE ONLY ONE THAT WORKS FINE.
and also tried:
icx /QxHOST /Ot /Qansi-alias -Qipo VRA.c -o VRASPEED -fprofile-instr-generate
VRASPEED 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /Ot /Qansi-alias -Qipo VRA.c -o VRASPEED -fprofile-instr-use=code.profdata
icx /QxHOST /O1 /Qansi-alias VRA.c -o VRASIZE -fprofile-instr-generate
VRASIZE 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /O1 /Qansi-alias VRA.c -o VRASIZE -fprofile-instr-use=code.profdata
icx /QxHOST /O2 /Qansi-alias -Qipo VRA.c -o VRASPEED1 -fprofile-instr-generate
VRASPEED1 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /O2 /Qansi-alias -Qipo VRA.c -o VRASPEED1 -fprofile-instr-use=code.profdata
icx /QxHOST /O3 /Qansi-alias -Qipo VRA.c -o VRAMAXSPEED -fprofile-instr-generate
VRAMAXSPEED 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /O3 /Qansi-alias -Qipo VRA.c -o VRAMAXSPEED -fprofile-instr-use=code.profdata
icx /QxHOST /Os /Qansi-alias VRA.c -o VRASIZE2 -fprofile-instr-generate
VRASIZE2 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /Os /Qansi-alias VRA.c -o VRASIZE2 -fprofile-instr-use=code.profdata
icx /QxHOST /Ot /Qiiansi-alias -Qipo VRA.c -o VRASPEED2 -fprofile-instr-generate
VRASPEED2 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /Ot /Qansi-alias -Qipo VRA.c -o VRASPEED2 -fprofile-instr-use=code.profdata
icx /QxHOST /Od /Qansi-alias -Qipo VRA.c -o VRADISABLE -fprofile-instr-generate
VRADISABLE 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /Od /Qansi-alias -Qipo VRA.c -o VRADISABLE -fprofile-instr-use=code.profdata
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
icx /QxHOST /Ot /Qansi-alias -Qipo VRA.c -o VRASPEED
icx /QxHOST /O1 /Qansi-alias VRA.c -o VRASIZE
icx /QxHOST /O2 /Qansi-alias -Qipo VRA.c -o VRASPEED1
icx /QxHOST /O3 /Qansi-alias -Qipo VRA.c -o VRAMAXSPEED
icx /QxHOST /Os /Qansi-alias VRA.c -o VRASIZE2
icx /QxHOST /Ot /Qiiansi-alias -Qipo VRA.c -o VRASPEED2
icx /QxHOST /Od /Qansi-alias -Qipo VRA.c -o VRADISABLE
icx /QxHOST /Ot /Qansi-alias -Qipo VRA.c -o VRASPEED -fprofile-instr-generate
VRASPEED 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /Ot /Qansi-alias -Qipo VRA.c -o VRASPEED -fprofile-instr-use=code.profdata
icx /QxHOST /O1 /Qansi-alias VRA.c -o VRASIZE -fprofile-instr-generate
VRASIZE 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /O1 /Qansi-alias VRA.c -o VRASIZE -fprofile-instr-use=code.profdata
icx /QxHOST /O2 /Qansi-alias -Qipo VRA.c -o VRASPEED1 -fprofile-instr-generate
VRASPEED1 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /O2 /Qansi-alias -Qipo VRA.c -o VRASPEED1 -fprofile-instr-use=code.profdata
icx /QxHOST /O3 /Qansi-alias -Qipo VRA.c -o VRAMAXSPEED -fprofile-instr-generate
VRAMAXSPEED 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /O3 /Qansi-alias -Qipo VRA.c -o VRAMAXSPEED -fprofile-instr-use=code.profdata
icx /QxHOST /Os /Qansi-alias VRA.c -o VRASIZE2 -fprofile-instr-generate
VRASIZE2 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /Os /Qansi-alias VRA.c -o VRASIZE2 -fprofile-instr-use=code.profdata
icx /QxHOST /Ot /Qiiansi-alias -Qipo VRA.c -o VRASPEED2 -fprofile-instr-generate
VRASPEED2 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /Ot /Qansi-alias -Qipo VRA.c -o VRASPEED2 -fprofile-instr-use=code.profdata
icx /QxHOST /Od /Qansi-alias -Qipo VRA.c -o VRADISABLE -fprofile-instr-generate
VRADISABLE 1.txt 3 2
llvm-profdata merge -output=code.profdata default.profraw
icx /QxHOST /Od /Qansi-alias -Qipo VRA.c -o VRADISABLE -fprofile-instr-use=code.profdata
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
icx /QxHOST /Ot /Qansi-alias -Qipo VRA.c -o VRASPEED
icx /QxHOST /O1 /Qansi-alias VRA.c -o VRASIZE
icx /QxHOST /O2 /Qansi-alias -Qipo VRA.c -o VRASPEED1
icx /QxHOST /O3 /Qansi-alias -Qipo VRA.c -o VRAMAXSPEED
icx /QxHOST /Os /Qansi-alias VRA.c -o VRASIZE2
icx /QxHOST /Ot /Qiiansi-alias -Qipo VRA.c -o VRASPEED2
icx /QxHOST /Od /Qansi-alias -Qipo VRA.c -o VRADISABLE
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
We need to have your VRA.c source file to duplicate your observation and investigate it.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
to run as vra.exe 1.txt 3 2
Also please note that it works only if optimizations are disabled.
On same other compilers it works even with optimizations.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Ok I found the issue:
Basically before the loop that follows, I have:
v85 = v5 + 1;
v87 = 1;
for ( j = v87; j <= v83; ++j ) //V87 TRAIN FROM, V83 PREDICT TO
{
*(int *)(handle + sizeof(int) * j) = *(int *)(byte_4BC818 + sizeof(int) * j);
}
so I had to move the line v85 = v5 + 1; after the scanf that counts how many values are in the data file, v5 is the counter.
