Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
7 Views

CFI_setpointer segmentation fault

Jump to solution

Hi all!

I am having a segmentation fault at CFI_setpointer with this code:

#include <stdlib.h>
#include <assert.h>

#include "ISO_Fortran_binding.h"

int main(int argc, char **argv){
  CFI_CDESC_T(0) yp;
  int stat;

  stat = CFI_establish((CFI_cdesc_t*)&yp, NULL, CFI_attribute_pointer, CFI_type_int, sizeof(CFI_type_int), 0, NULL);
  assert(stat== CFI_SUCCESS);
  stat = CFI_setpointer((CFI_cdesc_t*)&yp, NULL, NULL);
  assert(stat==CFI_SUCCESS);
  return EXIT_SUCCESS;
}

Needs -lifcore to compile.

Is there a way not to get warnings about C standard disconformities in ISO_Fortran_binding.h when compiling with -strict-ansi?

Thank you very much.

Best regards,

José Rui

0 Kudos

Accepted Solutions
Highlighted
Valued Contributor III
7 Views

Please file a support request

Jump to solution

Please file a support request incident with Intel if you can do so.

View solution in original post

0 Kudos
2 Replies
Highlighted
Valued Contributor III
8 Views

Please file a support request

Jump to solution

Please file a support request incident with Intel if you can do so.

View solution in original post

0 Kudos
Beginner
7 Views

I'm not set up for linux with

Jump to solution

I'm not set up for linux with Intel compilers, but when I tried to compile in Windows, I got a complaint about a zero length array for

CFI_CDESC_T(0) yp;

 

0 Kudos