Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

CFI_setpointer segmentation fault

faustino_de_sousa__j
151 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
151 Views

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

View solution in original post

2 Replies
FortranFan
Honored Contributor II
152 Views

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

View solution in original post

MWind2
New Contributor I
151 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;

 

Reply