- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi!
Code generates an internal compiler error:
C code:
#include <stdlib.h>
#include <stdio.h>
void ifb_echo(void*);
void ifb_echo(void *this){
printf("pointer: %p\n", this);
return;
}
Fortran code:
program ifb_p
use, intrinsic :: iso_c_binding, only: c_null_ptr
implicit none
interface
subroutine ifb_echo_aux(this) bind(c, name="ifb_echo")
implicit none
type(*), intent(in) :: this
end subroutine ifb_echo_aux
end interface
call ifb_echo_aux(c_null_ptr)
stop
end program ifb_p
using:
ifort (IFORT) 19.0.1.144 20181018
icc (ICC) 19.0.1.144 20181018
Best regards,
José Rui
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can't reproduce an error using 19.0.5. What command line did you use?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Steve,
Yes, I forgot to check the compiler options... :-(
It seems to boil down to:
-assume noprotect_constants
Best regards,
José Rui
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes - I can see that one now. If you have a license with support, I'd recommend that you report this to Intel using the orange "Bug Report" button on the main forum page.
Why are you using that option, though? Do you know what it does?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was assuming that -assume=none was invoking more strict standard conformant behaviour...
Or at least there was a time it used to be so, or maybe I am just confused...
I assume I will have to read the documentation more carefully... ;-)
I have an hobbyist license I do not think it includes support.
Thank you very much.
Best regards,
José Rui
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
faustino de sousa, jose rui wrote:I was assuming that -assume=none was invoking more strict standard conformant behaviour.....
Try -standard-semantics:
https://software.intel.com/en-us/fortran-compiler-developer-guide-and-reference-standard-semantics
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-standard-semantics changes compiler defaults that don't align with F03 and later. It doesn't, on its own, make anything "more strict". There are many -assume options you need enabled in order to match standard semantics.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page