Problem with CLASS statement using ifort

Problem with CLASS statement using ifort


I have a problem when testing an example program that use CLASS statement.

I am testing FORTRAN 2003 features and i have noted that this my example program does not work correctly.

I compile in this way the three attached files:

ifort -c prova.f90

ifort -c prova_sub.f90

ifort -c test_prova.f90

ifort test_prova.o prova.o prova_sub.o

and when run my executable i obtain this output:

9 16
9 16
-454078208 -454078208

I do not understand line 3.

Could someone help me to find error(s) or give me an explanation of this behaviour?

Downloadapplication/octet-stream test_prova.f90531 bytes
Downloadapplication/octet-stream prova.f90332 bytes
Downloadapplication/octet-stream prova_sub.f90585 bytes
3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

This is a bug in the current 11.1 compiler. There are some bugs like this related to Fortran 2003 that are to be fixed in the next major version of the compiler. This particular bug has a fix in the works, as shown below by the output of an engineering build of the compiler:

rwgreen@spdr65:~/quad/rwgreen/forums/71315> ifort -c prova.f90
rwgreen@spdr65:~/quad/rwgreen/forums/71315> ifort -c prova_sub.f90
rwgreen@spdr65:~/quad/rwgreen/forums/71315> ifort -c test_prova.f90
rwgreen@spdr65:~/quad/rwgreen/forums/71315> ifort test_prova.o prova.o prova_sub.o
rwgreen@spdr65:~/quad/rwgreen/forums/71315> ./a.out
9 16
9 16
9 16

I will check to see when this fix is due to be put into the compiler. It may not be until the next major version which is still many months away from release.



thanks Ron. I will wait for the next major release.

Best regards


Leave a Comment

Please sign in to add a comment. Not a member? Join today