[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gm2] Compiler crash getting maximal exponent of LONGREAL
From: |
Michael Riedl |
Subject: |
[Gm2] Compiler crash getting maximal exponent of LONGREAL |
Date: |
Mon, 30 Nov 2015 11:55:37 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
Hallo Gaius,
the following short sample
MODULE MaxExp;
(* Get maximal decimal exponent of a LONGREAL *)
IMPORT LongMath;
IMPORT STextIO;
IMPORT SWholeIO;
VAR nexp : CARDINAL;
BEGIN
(* Compiler crash *)
nexp := TRUNC(LongMath.ln(MAX(LONGREAL)) / LongMath.ln(10.0));
STextIO.WriteLn; STextIO.WriteLn;
STextIO.WriteString("hugest exponent of LONGREAL is = ");
SWholeIO.WriteCard(nexp,5);
STextIO.WriteLn; STextIO.WriteLn;
END MaxExp.
causes gm2 to crash with:
gm2 -c -fiso -flibs=iso -I /opt/gm2/lib/gcc/i586-linux-gnu/4.7.4/m2/iso
-I /opt/gm2/lib/gcc/i586-linux-gnu/4.7.4/m2/pim -L /opt/gm2/libs MaxExp.mod
cc1gm2: internal compiler error: tree check: expected integer_cst, have
fix_trunc_expr in tree_int_cst_lt, at tree.c:6485
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [MaxExp.o] Error 1
You can use "VAL(CARDINAL, ... );" instead of TRUNC( ... );" with the
same result.
Gruß
Michael
- [Gm2] Compiler crash getting maximal exponent of LONGREAL,
Michael Riedl <=