diff options
author | Gaius Mulley <gaiusmod2@gmail.com> | 2023-12-05 14:54:00 +0000 |
---|---|---|
committer | Gaius Mulley <gaiusmod2@gmail.com> | 2023-12-05 14:54:00 +0000 |
commit | 805be8fbeab351dc3109aaa17fcc8cc6f74c8caa (patch) | |
tree | 52b3cfc907f0571e393f4d3e07dd4635f9eddf5a /gcc | |
parent | 7e40497805c0831596334fe474112f991276e11b (diff) | |
download | gcc-805be8fbeab351dc3109aaa17fcc8cc6f74c8caa.zip gcc-805be8fbeab351dc3109aaa17fcc8cc6f74c8caa.tar.gz gcc-805be8fbeab351dc3109aaa17fcc8cc6f74c8caa.tar.bz2 |
PR modula2/112865 IM and RE fails to skip type equivalences
This patch skip type equivalences when checking IM and RE
ISO M2 standard functions for complex data type operands.
gcc/m2/ChangeLog:
PR modula2/112865
* gm2-compiler/M2Quads.mod (BuildReFunction): Use
GetDType to retrieve the type of the operand when
converting the complex type to its scalar equivalent.
(BuildImFunction): Use GetDType to retrieve the type of the
operand when converting the complex type to its scalar
equivalent.
Signed-off-by: Gaius Mulley <gaiusmod2@gmail.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/m2/gm2-compiler/M2Quads.mod | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/m2/gm2-compiler/M2Quads.mod b/gcc/m2/gm2-compiler/M2Quads.mod index 02a7db4..83c9b99 100644 --- a/gcc/m2/gm2-compiler/M2Quads.mod +++ b/gcc/m2/gm2-compiler/M2Quads.mod @@ -9845,7 +9845,7 @@ BEGIN IF IsVar(Var) OR IsConst(Var) THEN ReturnVar := MakeTemporary (combinedtok, AreConstant (IsConst (Var))) ; - PutVar (ReturnVar, ComplexToScalar (GetSType (Var))) ; + PutVar (ReturnVar, ComplexToScalar (GetDType (Var))) ; GenQuadO (combinedtok, StandardFunctionOp, ReturnVar, Re, Var, FALSE) ; PopN (NoOfParam+1) ; (* destroy arguments to this function *) PushTFtok (ReturnVar, GetSType (ReturnVar), combinedtok) @@ -9913,7 +9913,7 @@ BEGIN IF IsVar(Var) OR IsConst(Var) THEN ReturnVar := MakeTemporary (combinedtok, AreConstant (IsConst (Var))) ; - PutVar (ReturnVar, ComplexToScalar (GetSType (Var))) ; + PutVar (ReturnVar, ComplexToScalar (GetDType (Var))) ; GenQuadO (combinedtok, StandardFunctionOp, ReturnVar, Im, Var, FALSE) ; PopN (NoOfParam+1) ; (* destroy arguments to this function *) PushTFtok (ReturnVar, GetSType (ReturnVar), combinedtok) |