Compile failure when upgrading from 17.4 to 18.4

Recently updated to 18.4 from 17.4 and now some code will not compile. This code has been compiling ok since version 7.1. Any ideas on what happened between 17.4 and 18.4 that would cause this? It appears to be related to the ubound() portion of the code.

module cmap_control_class

  integer, private, parameter :: desc_size = 12

  character(len = desc_size), private  :: descriptions(0:3) = &
       & (/ 'Unknown', &
       &    'High   ',&
       &    'Medium ',&
       &    'Low    ' /)


contains

  subroutine errcheck_cmap_control(this)
    ! Passed parameters
    integer, intent(in) :: this

    ! Local variables

    ! the line below no longer compiles with 18.4 versus 17.4
    integer, parameter  :: size = desc_size * ubound(descriptions,1) + 20

    character(len = size) text

    print *,'hello'

  end subroutine errcheck_cmap_control

end module cmap_control_class

pgfortran -Mstandard -c cmap_control_class.f90
PGF90-S-0146-Expression must be character type (cmap_control_class.f90: 21)
PGF90-W-0170-PGI Fortran extension: conversion of CHARACTER constant to numeric (cmap_control_class.f90: 21)
0 inform, 1 warnings, 1 severes, 0 fatal for errcheck_cmap_control

Hi MikeS.,

Thanks for the report. This looks like a compiler regression (starting in 17.9) so I created a problem report (TPR#25599) and sent it to our engineers for further investigation.

-Mat

Hi Mike,

Looks like this issue was fixed in 18.5

  • Alex