gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gm2] Re: gm2-20040213 internal error


From: Paul Whittington
Subject: [Gm2] Re: gm2-20040213 internal error
Date: Wed, 25 Feb 2004 12:17:52 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007

Ok I've been able to narrow it down to the declaration of a constant.

If you compile the program below you get

gm2 -c -Wmakeall0 -g -Wmake-I=. -Wmakeall -I.:/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/gm2/pim:/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/gm2/iso Bug000.mod ../../gcc-3.3.2+gm2-20040213/gcc/gm2/gm2-compiler/SymbolTable.mod:2803:*** internal error *** expecting ConstVar symbol
make: *** [NitroTest.o] Error 1

If you comment out the declaration of the EmptyHandle constant no problems.


MODULE Bug0001;

IMPORT SYSTEM;

TYPE
  AttrType        = CARDINAL;
  BufferType      = POINTER TO ARRAY [0..1000000000] OF CHAR;
  CriticalSection = SYSTEM.ADDRESS;
  FilePosition    = INTEGER;
  HandleType      = SYSTEM.ADDRESS;
  OpenType        = CARDINAL;

  FileState =
    (ok,
    nameError,    (* illegal syntax in file name as passed    *)
    noFile,       (* file with specified name not found       *)
    noMemory,     (* no memory for file buffers               *)
    existingFile, (* file already exists                      *)
    deviceError,  (* some hardware error during I/O           *)
    noMoreRoom,   (* no room on volume/medium/directory       *)
    accessError,  (* protect, read/write, binary/text error   *)
    notOpen,      (* operation on unopened file               *)
    endError,     (* read attempted after EOL or EOF          *)
    outsideFile,  (* position before BOF or after EOF         *)
    otherError,   (* error unanticipated by this definition   *)
inUse, (* file in use by another process - sharing violation *) insufficientResources, (* Insufficient system resources exist to complete request *)
    unknownError);

  ReadWriteMode  =
    (readOnly,
     readWrite,
     appendOnly);

  File = RECORD
    handle      : HandleType;
    attribute   : AttrType;
    openmode    : OpenType;
    curPos      : FilePosition;
    eofPos      : FilePosition;
    name        : ARRAY[1..256] OF CHAR;
    eofPosLong  : LONGINT;
    curPosLong  : LONGINT;
    LocalModify : CriticalSection;
    buf         : BufferType;
    buffer      : BufferType;
    bufSize     : CARDINAL;
    sectorSize  : CARDINAL;
    eof         : BOOLEAN;
    overlapped  : BOOLEAN;
    nonBuffered : BOOLEAN;
    pad1        : BOOLEAN;
    state       : FileState;
    WriteMode   : ReadWriteMode;
    pad2        : ARRAY [0..1] OF CHAR;
  END;

CONST
  EmptyHandle = File
  {
    NIL,        (* handle      : HandleType;            *)
    0,          (* attribute   : AttrType;              *)
    0,          (* openmode    : OpenType;              *)
    0,          (* curPos      : FilePosition;          *)
    0,          (* eofPos      : FilePosition;          *)
    "",         (* name        : ARRAY[1..256] OF CHAR; *)
    0,          (* eofPosLong  : LONGINT;               *)
    0,          (* curPosLong  : LONGINT;               *)
    NIL,        (* LocalModify : CriticalSection;       *)
    NIL,        (* buf         : BufferType;            *)
    NIL,        (* buffer      : BufferType;            *)
    0,          (* bufSize     : CARDINAL;              *)
    0,          (* sectorSize  : CARDINAL;              *)
    FALSE,      (* eof         : BOOLEAN;               *)
    FALSE,      (* overlapped  : BOOLEAN;               *)
    FALSE,      (* nonBuffered : BOOLEAN;               *)
    FALSE,      (* pad1        : BOOLEAN;               *)
    ok,         (* state       : FileState;             *)
    readWrite,  (* WriteMode   : ReadWriteMode;         *)
    ""          (* pad2        : ARRAY [0..1] OF CHAR;  *)
  };

BEGIN
END Bug0001.


--
Paul Whittington
Nitro Data Systems
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]