[PATCH,fortran] Relax restrictions on KIND in SELECT CASE constructs

Paul Brook paul@codesourcery.com
Mon Dec 27 14:28:00 GMT 2004


> 2004-12-17  Steven G. Kargl  <kargls@comcast.net>
>
>      * resolve.c (validate_case_label_expr): Fix handling of mismatched
> KINDs.

No.

program foo
  integer i
  select case (i)
  case (0_4)
  case (1_8)
  end select
end program

Gives:

      SELECT CASE __convert_i4_i8[[((i))]]
      CASE (0 0)
      CASE (1_8 1_8)
      END SELECT

Which is obviously wrong.

We should probably convert all cases to the type of the select expression. Out 
of range values should either error, or warn and remove that case.

Paul



More information about the Fortran mailing list