Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

CFI_setpointer segmentation fault

faustino_de_sousa__j
656 Views

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
1 Solution
FortranFan
Honored Contributor II
656 Views

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

View solution in original post

0 Kudos
2 Replies
FortranFan
Honored Contributor II
657 Views

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

0 Kudos
MWind2
New Contributor III
656 Views

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
Reply