the following code is compiled with noprotect_constants-option (and without /warn:interfaces) but the debug version generates a runtime exception in the second(!) call to foo. The reason is, that the compiler does not generate a temporary variable for -1.0
call foo(-1.0D0) ! <---- error
end program Console
My compiler-version is (integrated with VS2008)
Intel(R) Visual Fortran Package ID: w_fcompxe_2011.1.127
Intel(R) Visual Fortran Composer XE 2011 Integration for Microsoft Visual Studio* 2008, 12.0.3470.2008, Copyright (C) 2002-2010 Intel Corporation
* Other names and brands may be claimed as the property of others.
Further inspections showed, that the compiler fails to generate the temporary variable if the argument is a compile-time evaluated expression (and negative floats seem to be handled as the expression "minus(absolute value)"). For expression of integers there is the same wrong behaviour except that negative constants are handled correctly.
IMO this is a serious bug that should be fixed immediately, as programmers rely on the noprotect_constants-option to produce safe code.