comp.lang.ada
 help / color / mirror / Atom feed
* Meridian Ada Compiler, Code Generator Errors
@ 1990-10-10 23:25 Peter N. Pham
  0 siblings, 0 replies; only message in thread
From: Peter N. Pham @ 1990-10-10 23:25 UTC (permalink / raw)



Can anyone look at the Ada code below and tell me why the Meridian
AdaVantage Compiler generates these errors :

( Text generated by Meridian AdaVantage Compiler when I compile
  the code below)
Meridian AdaVantage(tm) Compiler [v4.0 Jun 13, 1990] Target 80x86
Subprogram body conversion_test added to library.
43 lines compiled.
No errors detected.
Meridian 80x86 Code Generator [v4.0 Jun 15, 1990] Target 80x86 object
Generating code for conversi
"testconv.ada", line 40: <<error>> ** bad case in gencode:  39 **
"testconv.ada", line 40: <<error>> ** bad case in gencode:  39 **
"testconv.ada", line 42: <<error>>  bad mode in object.memory_byte


( Code starts here )
with UNCHECKED_CONVERSION;
procedure CONVERSION_TEST is

  type BYTE is range 0..255;
  for BYTE'size use 8;

  type WORD is range 0..16#FFFF#;
  for WORD'size use 16;

  type BYTE_ARR2 is array (0..1) of BYTE;

  type AA is
  record
    BYTE1:BYTE;
    BYTE2:BYTE;
    BYTE3:BYTE;
    BYTE4:BYTE;
  end record;
  pragma PACK(AA);

  WORD1 : WORD;
  A     : AA;

  function CONVERT_BYTES is new UNCHECKED_CONVERSION(WORD,BYTE_ARR2);


  procedure CONVERT ( WORD0 : in  WORD;
    BYTE0 : out BYTE;
    BYTE1 : out BYTE) is
    BYTES : BYTE_ARR2;
  begin
    BYTES := CONVERT_BYTES(WORD0);
    BYTE0 := BYTES(0);
    BYTE1 := BYTES(1);
  end CONVERT;


begin

  CONVERT(WORD1, A.BYTE2, A.BYTE3);

end CONVERSION_TEST;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1990-10-10 23:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1990-10-10 23:25 Meridian Ada Compiler, Code Generator Errors Peter N. Pham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox