[all-commits] [llvm/llvm-project] 1d3bcf: [flang] Better error recovery for REAL(x, [KIND=]b...
Peter Klausler via All-commits
all-commits at lists.llvm.org
Thu Sep 12 09:11:20 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1d3bcf99bd0698fb5ebf5fccc24cebf2596dce0a
https://github.com/llvm/llvm-project/commit/1d3bcf99bd0698fb5ebf5fccc24cebf2596dce0a
Author: Peter Klausler <pklausler at nvidia.com>
Date: 2024-09-12 (Thu, 12 Sep 2024)
Changed paths:
M flang/lib/Evaluate/intrinsics.cpp
A flang/test/Semantics/kinds06.f90
Log Message:
-----------
[flang] Better error recovery for REAL(x, [KIND=]bad) (#108222)
There's two entries in the intrinsic table for REAL; the first handles
the REAL(z) case of a COMPLEX argument, and the second handles the data
type/kind conversion case.
In the case of REAL(x,bad) with a bad or unsupported kind of REAL,
neither table entry was matching. In the event of an unrecognized
intrinsic function, the compiler emits the first error message that
resulted, which was confusing here because it was a complaint about
having too many arguments.
Reversing the order of the intrinsic table entries would fix the error
message, but would also have broken REAL(z) with a complex argument,
since it would then be treated as REAL(z,KIND=KIND(0.)) rather than
REAL(z,KIND=KIND(z)).
The fix is to let the second entry "hit" with improved error recovery.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list