Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29300 Discussions

Array Initialization Error when mixing different integer types.

Michael_B_10
Beginner
1,103 Views

Code:

PROGRAM main

  USE ISO_C_BINDING
 
  IMPLICIT NONE
  INTEGER, PARAMETER :: DIM0 = 7
  INTEGER, PARAMETER :: DIM1 = 4
  INTEGER, PARAMETER :: num_flags = 4
  INTEGER(kind=8), PARAMETER :: DIM0a = 7
  INTEGER(kind=8), PARAMETER :: DIM1a = 4
 
  INTEGER, DIMENSION(1:3) :: dim_qf_data =(/DIM0,4,num_flags/)
  INTEGER(kind=8), DIMENSION(1:2) :: dims = (/DIM0a,DIM1a/) ! #1
  INTEGER(kind=8), DIMENSION(1:2) :: dims = (/DIM0,DIM1/) ! #2

  print*,dim_qf_data
   print*,dims
END PROGRAM main

When I use #1 it prints correctly:

7,4,4

7,4

 

But when I use #2 it prints dim_qf_data's second array value wrong:

7,0,4

7,4

 

For Intel 14.0 it was correct for both. It also works correctly on Mac and Linux with Intel 15.0 (and 14.0).

 

Computer system env. attached.
 

 

 

 

 

0 Kudos
5 Replies
Steven_L_Intel1
Employee
1,103 Views

That's just weird.  Thanks, we'll look into it.

0 Kudos
Steven_L_Intel1
Employee
1,103 Views

Escalated as issue DPD200366575. I will let you know of any progress. Thanks again.

0 Kudos
Steven_L_Intel1
Employee
1,103 Views

This has been fixed in our sources - I have asked that the fix be included in 15.0 Update 3 - it probably will.

0 Kudos
Steven_L_Intel1
Employee
1,103 Views

The fix is now scheduled for Update 3 (May.)

0 Kudos
Michael_B_10
Beginner
1,103 Views

Thanks for fixing this so fast and keeping me updated.

0 Kudos
Reply