[clang] [flang] [flang] Add UNSIGNED (PR #113504)
Peter Klausler via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 25 08:44:15 PDT 2024
================
@@ -213,6 +213,22 @@ def fir_IntegerType : FIR_Type<"Integer", "int"> {
}];
}
+def fir_UnsignedType : FIR_Type<"Unsigned", "unsigned"> {
----------------
klausler wrote:
If I comment out the appearance of `fir_UnsignedType.predicate` in `AnyIntegerLike` with
```
def AnyIntegerLike : TypeConstraint<Or<[SignlessIntegerLike.predicate,
AnySignedInteger.predicate, AnyUnsignedInteger.predicate,
- fir_IntegerType.predicate, fir_UnsignedType.predicate]>, "any integer">;
+ fir_IntegerType.predicate /* pmk: , fir_UnsignedType.predicate */]>, "any integer">;
```
my operations test case then fails to compile with
```
error: loc("/home/pklausler/llvm-project/flang/test/Lower/unsigned-ops.f90":5:3): 'hlfir.assign' op operand #0 must be any Fortran value or variable type, but got 'ui32'
error: verification of lowering to FIR failed
```
https://github.com/llvm/llvm-project/pull/113504
More information about the cfe-commits
mailing list