internal compiler error when trying to use record variable declared using "absolute" keyword
Hello, List! Trying to build the program below using gpc 20060325 based on gcc 4.0.3 I've got "Internal compiler error". Sorry for a bit complicated test program but it's the simplest one I could produce to reproduce the bug. Error message: [igor@marnat2 internal_compiler_error]$ make gpc --automake test.pas <var_decl 0x401910d8 Eepromstor.155419 type <pointer_type 0x4018ec3c type <pointer_type 0x4018ea8c Eepromptr type <record_type 0x4018e510 Eepromtype> unsigned SI size <integer_cst 0x40139888 constant invariant 32> unit size <integer_cst 0x401398a0 constant invariant 4> align 32 symtab 0 alias set -1 main_variant <pointer_type 0x4018ea8c Eepromptr> pointer_to_this <pointer_type 0x4018ec3c>> unsigned SI size <integer_cst 0x40139888 32> unit size <integer_cst 0x401398a0 4> align 32 symtab 0 alias set -1 main_variant <pointer_type 0x4018ec3c>> used unsigned ignored SI file test.pas line 26 size <integer_cst 0x40139888 32> unit size <integer_cst 0x401398a0 4> align 32 context <function_decl 0x4018ee58 Eep> (reg/f:SI 0 ax [orig:63 Eepromstor.155419 ] [63]) chain <var_decl 0x40191144 D.606>> test.pas: In function `EAdvLineInfo': test.pas:31: internal compiler error: in expand_expr_real_1, at expr.c:6800 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.gnu-pascal.de/todo.html> for instructions. make: *** [all] Error 1 Offending program: program test; type LinesInfoPtr = ^LinesInfoType; LinesInfoType = array [0..99] of word; type EEPROMType = record LinesInfo: word; end; type StoragePtr = ^StorageType; StorageType = array [0..99] of byte; type EEPROMPtr = ^EEPROMType; var EEPROMStor: StoragePtr; EEPROMData: EEPROMPtr absolute EEPromStor; function EEP ( W: word): pointer; begin EEP := pointer (word (EEPromData) + W) end; function EAdvLineInfo (Line: ShortWord): word; begin EAdvLineInfo := LinesInfoPtr (EEP (EEPROMData^.LinesInfo))^ [Line]; end; begin writeln (integer (EAdvLineInfo (1))); end. ~ -- Best regards, Igor mailto:marny@rambler.ru
participants (2)
-
Igor Marnat -
Waldek Hebisch