llvm icon indicating copy to clipboard operation
llvm copied to clipboard

/Qsave-temps on Windows not Working

Open orion160 opened this issue 2 years ago • 1 comments

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:

  1. Include code snippet as short as possible
  2. Specify the command which should be used to compile the program
  3. Specify the comment which should be used to launch the program
  4. 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

error.log

orion160 avatar Dec 16 '23 19:12 orion160

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!

KornevNikita avatar May 17 '24 11:05 KornevNikita

Checked with the latest compiler, and the issue is still actual.

dm-vodopyanov avatar Jul 10 '24 15:07 dm-vodopyanov

@dm-vodopyanov, can you provide details of your reproducer, I'm trying latest internal build for icx (20240710) and am unable to reproduce.

mdtoguchi avatar Jul 10 '24 15:07 mdtoguchi

@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 avatar Jul 10 '24 15:07 dm-vodopyanov

@dm-vodopyanov, using the example, we need exception handling enabled - please try with adding /EHsc to the command line.

mdtoguchi avatar Jul 10 '24 16:07 mdtoguchi

@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

dm-vodopyanov avatar Jul 12 '24 11:07 dm-vodopyanov

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?

mdtoguchi avatar Jul 16 '24 23:07 mdtoguchi

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.

mdtoguchi avatar Jul 29 '24 20:07 mdtoguchi