[M3devel] FW: LONGINT subrange problems

Tony Hosking hosking at cs.purdue.edu
Sun Jan 9 01:29:10 CET 2011


Yes, I'll take a look.


On Jan 8, 2011, at 9:56 AM, Jay K wrote:

> Tony any chance you can look at this? Or advise me where to fix? Notice the mismatches go both ways. This is on Darwin/i386 for me. Probably occurs on all 32bit targets & no 64bit targets.
> 
> - Jay/phone
> 
> > From: jay.krell at cornell.edu
> > To: m3devel at elegosoft.com
> > Date: Sat, 8 Jan 2011 08:19:06 +0000
> > Subject: [M3devel] FW: LONGINT subrange problems
> > 
> > 
> > This is all based on Mika's work.
> > 
> > 
> > MODULE Main;
> > 
> > PROCEDURE F1(<*UNUSED*>x: LONGINT) = BEGIN END F1;
> > 
> > PROCEDURE F2() =
> > <*UNUSED*>VAR x: [0L..0L];
> > BEGIN
> > END F2;
> > 
> > PROCEDURE F3() =
> > VAR x: [0L..0L];
> > BEGIN
> >   F1(x);
> > END F3;
> > 
> > BEGIN
> >   F1(0L);
> >   F2();
> >   F3();
> > END Main.
> > 
> > 
> > (20)           declare_procedure name:Main__F1 n_params:1 lev:0 exported:false procedure:0x0 procedure:0x4
> > 
> > (22)             declare_procedure name:Main__F2 n_params:0 lev:0 exported:false procedure:0x0 procedure:0x5
> > 
> > (24)               declare_procedure name:Main__F3 n_params:0 lev:0 exported:false procedure:0x0 procedure:0x6
> > 
> > 
> > 
> > (33)                 begin_procedure procedure:0x5
> > (34)                   set_source_line 6
> > (35)                   load_integer type:int_64 0
> > (36)                   comment comment:********* M3CG_Check ERROR *********** bad stack:  expected [ Int32    ] got [ Int64    ]
> > (37)                   store var:0x5 offset:0 src_t:int_32 dst_t:word_8
> > (38)                   set_source_line 8
> > (39)                   exit_proc type:void
> > (40)                 end_procedure procedure:0x5
> > (41)                 comment comment:F3
> > (42)                 set_source_line 0xA(10)
> > 
> > (43)                 begin_procedure procedure:0x6
> > (44)                   set_source_line 0xB(11)
> > (45)                   load_integer type:int_64 0
> > (46)                   comment comment:********* M3CG_Check ERROR *********** bad stack:  expected [ Int32    ] got [ Int64    ]
> > (47)                   store var:0x6 offset:0 src_t:int_32 dst_t:word_8
> > (48)                   set_source_line 0xD(13)
> > 
> > (49)                   start_call_direct procedure:0x4 level:0
> > (50)                     load var:0x6 offset:0 src_t:word_8 dst_t:int_32
> > (51)                     comment comment:********* M3CG_Check ERROR *********** bad stack:  expected [ Int64    ] got [ Int32    ]
> > (52)                     pop_param type:int_64
> > (53)                   call_direct procedure:0x4
> > (54)                   set_source_line 0xE(14)
> > (55)                   exit_proc type:void
> > (56)                 end_procedure procedure:0x6
> > (57)                 comment comment:Main_M3
> > (58)                 comment comment:module main body Main_M3
> > (59)                 set_source_line 0x10(16)
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > ----------------------------------------
> > > Date: Sat, 8 Jan 2011 09:15:22 +0000
> > > To: m3commit at elegosoft.com
> > > From: jkrell at elego.de
> > > Subject: [M3commit] CVS Update: cm3
> > >
> > > CVSROOT: /usr/cvs
> > > Changes by: jkrell at birch. 11/01/08 09:15:21
> > >
> > > Modified files:
> > > cm3/m3-sys/m3tests/src/p2/p250/: Main.m3
> > >
> > > Log message:
> > > more LONGINT subrange problems, this now has 3 internal codegen errors,
> > > due to stack type and expected type mismatches
> > >
> > 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20110108/2f3d903c/attachment-0002.html>


More information about the M3devel mailing list