[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference clt::dec_pascal_bugs

Title:DEC Pascal Bug Reports
Notice:New kit announcement in TURRIS::Pascal conference
Moderator:TLE::GARRISON
Created:Wed Sep 09 1992
Last Modified:Fri May 30 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:838
Total number of notes:3659

836.0. "accvio on ALPHA PASCAL V5.5 ECO 2" by ATZIS1::KARTNER_M (HOUSTON, we have a problem) Fri Apr 18 1997 07:59

    Hi!
    
    We have got compiler problems on an ALPHA (i don't think it's a
    compiler compatibility problem)
    
    Configuration:
    
    VMS Version: V 6.2-1H3
    Pascal Version: V 5.5 ECO 2 
    
    The following code compiles on a VAX without problems but accvios on
    the mentioned ALPHA:
    
    
    ------------------------------------------------------------------------------
    
    [INHERIT ('sys$share:starlet')]
    
    PROGRAM module_a(output);
    
    [EXTERNAL]
    PROCEDURE ExecuteWrite (%REF [ASYNCHRONOUS] PROCEDURE fp;
                            str: VARYING[v] OF CHAR); EXTERN;
    
    FUNCTION CLG$InternalWrite(str: VARYING[v] OF CHAR): INTEGER;
    
    BEGIN
    WRITELN(str);
    CLG$InternalWrite := SS$_NORMAL;
    END;
    VAR
      f_ptr : [STATIC, VOLATILE] ARRAY [0..4] OF INTEGER;
      ste   : VARYING[80] OF CHAR;
    
    
    BEGIN
    f_ptr[0]:=IADDRESS(CLG$InternalWrite);
    ste := 'This is a test message !';
    ExecuteWrite(%REF f_ptr[0],ste);
    END.
    
    
    ------------------------------------------------------------------------------
    
    [INHERIT ('sys$share:starlet')]
    
    MODULE module_b;
    
    [GLOBAL]
    EDURE ExecuteWrite (PROCEDURE UserWrite(str: VARYING[v] OF CHAR);
                            str: VARYING[v] OF CHAR);
    
    BEGIN
    UserWrite(str);
    END;
    END.
    
    
    ------------------------------------------------------------------------------
    
    PROC%SYSTEM-F-ACCVIO, access violation, reason mask=00, virtual
    address=00000000
    , PC
    =00000000, PS=0000001B
    %TRACE-F-TRACEBACK, symbolic stack dump follows
      image    module    routine             line      rel PC           abs
    PC
                                                0 0000000000000000
    0000000000000000
     MODULE_A  MODULE_B  EXECUTEWRITE          10 0000000000000108
    00000000000202F8
     MODULE_A  MODULE_A  MODULE_A              24 00000000000001C8
    00000000000201C8
                                                0 FFFFFFFF851EC170
    FFFFFFFF851EC170
     --------------------------------------
    
    Is this a known 5.5 BUG ?
    Will it be fixed in the upcomming ECO ? 
    							thanks
    							Michael
T.RTitleUserPersonal
Name
DateLines
836.1WIBBIN::NOYCEPulling weeds, pickin' stonesFri Apr 18 1997 12:416
Whne you play games like pretending that an integer is actually the address
of a procedure, you are getting into low-level programming that needs to
be aware of how parameters are passed in the system you're using.  On VAX,
procedure parameters are indeed passed by reference, as your code does.
But on Alpha, they are passed by value.  I suspect that if you change the
%ref to %val your code will work on Alpha.
836.2TLE::REAGANAll of this chaos makes perfect senseMon Apr 21 1997 13:324
    There is a section on this in the "Migrating from OpenVMS VAX to
    OpenVMS Alpha" in the DEC Pascal User Manual.
    
    				-John
836.3Thanks !!ATZIS1::KARTNER_MHOUSTON, we have a problemTue Apr 22 1997 11:495
    Hi!
    
    	Thanks for your replys
    
    							Michael