Quantcast
Viewing all articles
Browse latest Browse all 415

Intel v12 pointer reference bug

I have come across a bug in the Intel v12 compiler (12.1.6 20120928), where the value connected to a pointer reference cannot be accessed when sent to a subprogram. I have a user defined type that functions as a linked list that contains an internal pointer to another object. When I reference an allocated instance of the type via the linked list, I can access the value, but if I send that same reference to a subroutine, I cannot access the value.

The attached program demonstrates the issue, along with my preferred work-around that uses an associate block when calling the routine. I have checked this program with v15 and v17 and it works as it should in both cases. In v12, it does not:

# Intel v12
$ ifort test3.f90 && ./a.out

 run update routine using linked list pointer
   1.000000
  0.0000000E+00 # THIS IS WRONG
 run update routine using associate block
   1.000000
   20.00000

# Intel v17
$ ifort test3.f90 && ./a.out

 run update routine using linked list pointer
   1.000000
   20.00000
 run update routine using associate block
   1.000000
   20.00000

Due to factors out of my control, I must use the older compiler for this project. Intel wasn't able to give me any information, because v12 is deprecated. Also, keep in mind that the example code is only to demonstrate the bug.

That being said, I am hoping someone might be familiar with this bug and know more about it. Not knowing what else this bug affects makes it more risky to develop a work-around that isn't actually going to solve the problem. Thanks.


Viewing all articles
Browse latest Browse all 415

Trending Articles