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

Bug: Cray Pointer to character (Intel Fortran 8)

nick2911
Beginner
1,347 Views
Intel Fortran Compiler 8
Using cray pointers gives a bug in the following:


character grp(1)
pointer (pgrp, grp)

pgrp = malloc(2)

call subroutine(grp)


BUT (with all other code identical)

call subroutine(grp(1))

works.

This bug only affects pointers to character variables, all others are OK.
0 Kudos
9 Replies
Steven_L_Intel1
Employee
1,347 Views
This is not a complete program, so I can't tell what you think is wrong. If I complete it in a plausible way, it seems to work fine for me. What bad behavior do you see?
0 Kudos
nick2911
Beginner
1,347 Views
Thanks for the reply. Complete (small) program:

program test

character grp(1)

pointer (pgrp, grp)


pgrp = malloc(2)

grp(1) = 'a'
grp(2) = 'b'
call test2(grp)

end

subroutine test2(grp)

character grp(*)

write(*,*) grp(2)

return
end

This fails to write grp(2) correctly. Replacing grp by grp(1) in subroutine call does work.
0 Kudos
Steven_L_Intel1
Employee
1,347 Views
Works for me. What compiler version are you using?
0 Kudos
nick2911
Beginner
1,347 Views
Version 8.0 (non-commercial version, downloaded 19/6/04).
Running on Fedora core 2 (IA32), kernel 2.6.6

Thanks for trying it!
0 Kudos
Steven_L_Intel1
Employee
1,347 Views

That doesn't tell me the actual version.

Do an

ifort -what

and tell me the result. My guess is that you downloaded the initial release from December and didn't get the current one. This is a flaw in the way we do the non-commercial and evaluation kits. You have to register with Premier Support and download from there.

There's a proposal to update the initial download kits on a quarterly basis. I hope it happens, as the current situation is frustrating for many.

0 Kudos
nick2911
Beginner
1,347 Views
Sorry! 'ifort -what' just gives 'no files specified ' etc..
ifort -V gives: Version 8.0 Build 20031016Z Package ID: l_fc_p_8.0.034
0 Kudos
Steven_L_Intel1
Employee
1,347 Views

Ok, thanks. -what should work, though.

You indeed have the original December release. Please register with Premier Support and download the current version. You will need two downloads - first, l_fc_pc_8.0.046 - uninstall ifort and install this one. Then there is a patch, l_fc_pc_8.0.046_pe047.1, which installs on top of that.

0 Kudos
nick2911
Beginner
1,347 Views
OK. Thanks very much indeed for your time.

Obviously, I appreciate that Intel have no obligation at all to make evaluation or free software available. However, given that it is there, some warning that it is not the latest version would be appreciated. I am evaluating this for purchase for a University department, and I have just wasted 2 work days.

To be fair, though, I can say that the support appears excellent!
0 Kudos
Steven_L_Intel1
Employee
1,347 Views
I share your view regarding not being informed of updated software. I expect this will change soon. Thanks for your comments.
0 Kudos
Reply