llvm / llvm-project / flang / eda5f3e1c500d89c4a053b151d7073412c3d02f2 / . / test / Semantics / if_stmt03.f90

! RUN: %S/test_errors.sh %s %t %flang_fc1 | |

! Check that non-logical expressions are not allowed. | |

! Check that non-scalar expressions are not allowed. | |

! TODO: Insure all non-logicals are prohibited. | |

LOGICAL, DIMENSION (2) :: B | |

!ERROR: Must have LOGICAL type, but is REAL(4) | |

IF (A) A = LOG (A) | |

!ERROR: Must be a scalar value, but is a rank-1 array | |

IF (B) A = LOG (A) | |

END |