[all-commits] [llvm/llvm-project] 080259: [Flang] Update the fix of PR 80738 to cover generi...

Daniel Chen via All-commits all-commits at lists.llvm.org
Thu Feb 8 07:39:02 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0802596df3d1ffd15f6b828a0f5c1e5b687a730f
      https://github.com/llvm/llvm-project/commit/0802596df3d1ffd15f6b828a0f5c1e5b687a730f
  Author: Daniel Chen <cdchen at ca.ibm.com>
  Date:   2024-02-08 (Thu, 08 Feb 2024)

  Changed paths:
    M flang/lib/Semantics/resolve-names.cpp

  Log Message:
  -----------
  [Flang] Update the fix of PR 80738 to cover generic interface inside modules (#81087)

The following test cases crashes. The problem is that the fix for PR
https://github.com/llvm/llvm-project/pull/80738 is not quite complete.
It should `GetUltimate()` of the `interface_` before check if it is
generic.


```
  MODULE M

    CONTAINS

    FUNCTION Int(Arg)
    INTEGER :: Int, Arg
      Int = Arg
    END FUNCTION

    FUNCTION Int8(Arg)
    INTEGER(8) :: Int8, Arg
      Int8 = 8_8
    END FUNCTION

  END MODULE

  MODULE M1
  USE M

    INTERFACE Int8
      MODULE PROCEDURE  Int
      MODULE PROCEDURE  Int8
    END INTERFACE

  END MODULE

  PROGRAM PtrAssignGen
  USE M
  USE M1
  IMPLICIT NONE

  INTERFACE Int
    MODULE PROCEDURE  Int
    MODULE PROCEDURE  Int8
  END INTERFACE

  PROCEDURE(Int8),   POINTER :: PtrInt8

  PtrInt8 => Int8
  IF ( PtrInt8(100_8) .NE. 8_8 ) ERROR STOP 12

  END
  ```




More information about the All-commits mailing list