- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hi all,
sorry for the rather vague question but I could not reproduce my problem in a small code example (which worked perfectly ok), but maybe some of you encountered something similar and can provide an answer nonetheless.
In my code I have something similar to:
------
logical :: valid
call foo( valid )
if (valid ) then
! <- *always* breaks here, independent of 'valid'
endif
------
A breakpoint set inside the if-statement always breaks, independent of the value of 'valid'
('valid' is set in host-associated routine 'foo')
Any guesses why?
Cheers
-Ralf
p.s.Fortran Composer XE 2011, Win7 (same behaviour on win32 & x64).
コピーされたリンク
4 返答(返信)
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Hello Ralf,
If you can't reproduce it in a small example program, could you attach your original program?
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Ralf,
This may depend on the optimizations. The newer generation processors have a conditional move instruction. This instruction is used to avoid branches. If your code is something like
if(valid) then
a = b
endif
The code generated (pseudo code) would look like
move tempReg, b ! dest, src
test valid
conditional move on true a, tempReg
There is no branches in the above code.
When there are no branches then there is no way to conditionally break (since you cannot break in the middle of an instruction).
You can look at the dissassembly code to confirm if this is the case.
As a work around you can do something like
if(valid) then
if(expression) write(*,*) "expression known to be false"
a = b
endif
Where the expression cannot be predetermined by the compiler as to always being true or false.
The above will generate a branch which then will isolate the breakpoint to the (true) path.
Jim Dempsey
This may depend on the optimizations. The newer generation processors have a conditional move instruction. This instruction is used to avoid branches. If your code is something like
if(valid) then
a = b
endif
The code generated (pseudo code) would look like
move tempReg, b ! dest, src
test valid
conditional move on true a, tempReg
There is no branches in the above code.
When there are no branches then there is no way to conditionally break (since you cannot break in the middle of an instruction).
You can look at the dissassembly code to confirm if this is the case.
As a work around you can do something like
if(valid) then
if(expression) write(*,*) "expression known to be false"
a = b
endif
Where the expression cannot be predetermined by the compiler as to always being true or false.
The above will generate a branch which then will isolate the breakpoint to the (true) path.
Jim Dempsey
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Quoting Annalee (Intel)
Hello Ralf,
If you can't reproduce it in a small example program, could you attach your original program?
Thank you Annalee but I'd rather not - it is just an annoyance I can work around it.
Cheers
-Ralf
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Quoting jimdempseyatthecove
Ralf,
This may depend on the optimizations. The newer generation processors have a conditional move instruction. This instruction is used to avoid branches. If your code is something like
[snip]
There is no branches in the above code.
When there are no branches then there is no way to conditionally break (since you cannot break in the middle of an instruction).
You can look at the dissassembly code to confirm if this is the case.
As a work around you can do something like
if(valid) then
if(expression) write(*,*) "expression known to be false"
a = b
endif
Where the expression cannot be predetermined by the compiler as to always being true or false.
The above will generate a branch which then will isolate the breakpoint to the (true) path.
Jim Dempsey
This may depend on the optimizations. The newer generation processors have a conditional move instruction. This instruction is used to avoid branches. If your code is something like
[snip]
There is no branches in the above code.
When there are no branches then there is no way to conditionally break (since you cannot break in the middle of an instruction).
You can look at the dissassembly code to confirm if this is the case.
As a work around you can do something like
if(valid) then
if(expression) write(*,*) "expression known to be false"
a = b
endif
Where the expression cannot be predetermined by the compiler as to always being true or false.
The above will generate a branch which then will isolate the breakpoint to the (true) path.
Jim Dempsey
I'll try your workaround.
Cheers
-Ralf
