/Qsave-temps on Windows not Working
Describe the bug At the moment of putting the option /Qsave-temps it producses an error
To Reproduce Please describe the steps to reproduce the behavior:
- Include code snippet as short as possible
- Specify the command which should be used to compile the program
- Specify the comment which should be used to launch the program
- Indicate what is wrong and what was expected
Environment (please complete the following information):
- OS: Windows 11 (Build 22631.2861)
- Target device and vendor: Intel CPU
- DPC++ version: Intel(R) oneAPI DPC++/C++ Compiler for applications running on Intel(R) 64, Version 2024.0.0 Build 20231017
icx -fsycl /Qsave-temps ..\hello.cpp -o hello.exe *> error.log
Hi! There have been no updates for at least the last 60 days, though the ticket has assignee(s).
@mdtoguchi, could I ask you to take one of the following actions? :)
- Please provide an update if you have any (or just a small comment if you don't have any yet).
- OR mark this issue with the 'confirmed' label if you have confirmed the problem/request and our team should work on it.
- OR close the issue if it has been resolved.
- OR take any other suitable action.
Thanks!
Checked with the latest compiler, and the issue is still actual.
@dm-vodopyanov, can you provide details of your reproducer, I'm trying latest internal build for icx (20240710) and am unable to reproduce.
@mdtoguchi I used the internal build of icx 20240709, the command was the same:
icx -fsycl /Qsave-temps hello.cpp -o hello.exe
As no reproducer is attached, I reproduced that on https://github.com/intel/llvm/blob/sycl/sycl/doc/GetStartedGuide.md#run-simple-dpc-application
@dm-vodopyanov, using the example, we need exception handling enabled - please try with adding /EHsc to the command line.
@mdtoguchi
icx -fsycl /EHsc /Qsave-temps hello.cpp -o hello.exe --- passes
icx -fsycl /Qsave-temps hello.cpp -o hello.exe --- fails
icx -fsycl hello.cpp -o hello.exe --- passes
Should we/can we improve some diagnostic or logic in driver, because it looks like that currently /Qsave-temps can only be used with /EHsc option, and it is not clear from the output
In regards to /EHsc, the driver doesn't have any information from the source files to determine if any diagnostic should be emitted or not. FWIW, this behavior is not restricted to -fsycl as vanilla C++ code with EH will also demonstrate the issue. Maybe the FE diagnostics can be improved for Windows?
As /Qsave-temps works appropriately (with the /EHsc requirement for enabling exception handling) I'm closing this issue. If there is a desire to try and improve information given by the compiler with issues pertaining to exception handling when using /Qsave-temps that can be looked at separately.