Received: from nldi16.nag.co.uk by nags2.nag.co.uk (4.1/UK-2.1)
	id AA18366; Sat, 16 Sep 95 16:35:52 BST
From: Peter Broadbery <peterb@uk.co.nag>
Date: Sat, 16 Sep 95 16:32:27 +0100
Message-Id: <1432.9509161532@nldi16.nag.co.uk>
Received: by nldi16.nag.co.uk (920330.SGI/NAg-1.0)
	id AA01432; Sat, 16 Sep 95 16:32:27 +0100
Subject: fixbug
By: pab
Fixed: bug1021.as
Apparently-To: ax-bugs@nag.co.uk

--* Received: from uk.ac.nsfnet-relay by nags2.nag.co.uk (4.1/UK-2.1)
--* 	id AA17439; Fri, 15 Sep 95 22:58:25 BST
--* Received: from watson.ibm.com by sun3.nsfnet-relay.ac.uk with Internet SMTP 
--*           id <sg.04931-0@sun3.nsfnet-relay.ac.uk>;
--*           Fri, 15 Sep 1995 22:54:25 +0100
--* Received: from WATSON by watson.ibm.com (IBM VM SMTP V2R3) with BSMTP id 4771;
--*           Fri, 15 Sep 95 17:52:47 EDT
--* Received: from YKTVMV by watson.vnet.ibm.com with "VAGENT.V1.02 on VAGENT2" 
--*           id 5930; Fri, 15 Sep 1995 17:52:46 EDT
--* Received: from asharp.watson.ibm.com 
--*           by yktvmv.watson.ibm.com (IBM VM SMTP V2Rx) with TCP;
--*           Fri, 15 Sep 95 17:52:46 EDT
--* Received: by asharp.watson.ibm.com (AIX 3.2/UCB 5.64/950830) id AA20001;
--*           Fri, 15 Sep 1995 17:52:26 -0400
--* Date: Fri, 15 Sep 1995 17:52:26 -0400
--* From: asbugs@com.ibm.watson (S Watt)
--* Message-Id: <9509152152.AA20001@asharp.watson.ibm.com>
--* To: ax-bugs@uk.co.nag
--* Subject: forwbug
--* Sender: asbugs@com.ibm.watson

--@ Bug Number:  bug1021.as 
--@ Fixed  by:  pab   
--@ Tested by:  none 
--@ Summary:    Duplicate of bug1020 (which is not fixed yet...) 


  Reporter:    adk@scri.fsu.edu
  Description: [1] A# program crashes if two variables have the same name.

------------------------------ bug-scope.as ---------------------------------
--* From postmaster@watson.vnet.ibm.com  Fri Sep 15 17:52:22 1995
--* Received: from yktvmv-ob.watson.ibm.com by asharp.watson.ibm.com (AIX 3.2/UCB 5.64/950830)
--*           id AA18179; Fri, 15 Sep 1995 17:52:22 -0400
--* Received: from watson.vnet.ibm.com by yktvmv.watson.ibm.com (IBM VM SMTP V2R3)
--*    with BSMTP id 4119; Fri, 15 Sep 95 17:52:41 EDT
--* Received: from YKTVMV by watson.vnet.ibm.com with "VAGENT.V1.0"
--*           id <A.ADK.NOTE.YKTVMV.4641.Sep.15.17:52:38.-0400>
--*           for asbugs@watson; Fri, 15 Sep 95 17:52:40 -0400
--* Received: from mailer.scri.fsu.edu by watson.ibm.com (IBM VM SMTP V2R3)
--*    with TCP; Fri, 15 Sep 95 17:52:38 EDT
--* Received: from ibm12.scri.fsu.edu (ibm12.scri.fsu.edu [144.174.131.12]) by mailer.scri.fsu.edu (8.6.12/8.6.12) with SMTP id RAA28567; Fri, 15 Sep 1995 17:52:29 -0400
--* From: Tony Kennedy <adk@scri.fsu.edu>
--* Received: by ibm12.scri.fsu.edu (5.67b) id AA26743; Fri, 15 Sep 1995 17:52:20 -0400
--* Date: Fri, 15 Sep 1995 17:52:20 -0400
--* Message-Id: <199509152152.AA26743@ibm12.scri.fsu.edu>
--* To: adk@mailer.scri.fsu.edu, asbugs@watson.ibm.com, infodesk@nag.co.uk
--* Subject: [1] A# program crashes if two variables have the same name.

-- Command line: axiomxl -V -Ginterp -DBUG bug-scope.as
-- Version: 1.1.3
-- Original bug file name: bug-scope.as

--+ axiomxl -V -Ginterp bug-scope.as
--+ AXIOM-XL version 1.1.3 for AIX RS/6000
--+                ld in sc sy li pa ma ab ck sb ti gf of pb pl pc po mi
--+  Time    4.6 s  0  2 .4  2 .2 .4 .2  0 .2  1 86  3  3  1  0  0  0 .2 %
--+
--+  Source  212 lines,  2759 lines per minute
--+  Lib    9956 bytes,  1617syme 6270foam 142fsyme 572name 77kind 488file 250lazy 365type 2inl 8twins 2ext 2doc 14id
--+  Store  2048 K pool
--+ sample@D = (((bar = 21))) <0>
--+ axiomxl -V -Ginterp -DBUG bug-scope.as
--+ AXIOM-XL version 1.1.3 for AIX RS/6000
--+                ld in sc sy li pa ma ab ck sb ti gf of pb pl pc po mi
--+  Time    4.4 s  0  1 .4  2 .2 .4 .2  0  0  1 87  3  2  2  0 .2  0 .4 %
--+
--+  Source  212 lines,  2839 lines per minute
--+  Lib    9973 bytes,  1617syme 6285foam 142fsyme 574name 77kind 488file 250lazy 365type 2inl 8twins 2ext 2doc 14id
--+  Store  2048 K pool
--+ sample@D = (((bar = Program fault (segmentation violation).#1 (Error) Program fault (segmentation violation).
--+ #2 (Warning) Removing file `bug-scope.ao'.
#include "axllib"
#pile

#if BUG
Y ==> X
#endif

M(a: SingleInteger): BasicType == SingleInteger

G(X: BasicType, dep: X): BasicType == add

  initializeDomain(Y: BasicType, bar: Y): SingleInteger ==
    print << "(((bar = " << bar << "))) " -- Dies here!
    42

  Rep == M initializeDomain(X, dep)
  import from Rep
  (a: %) = (b: %): Boolean == rep a = rep b
  (p: TextWriter) << (a: %): TextWriter == p << "<" << rep a << ">"
  sample: % == per sample
  hash(a: %): SingleInteger == hash rep a

test(): () ==
  import from SingleInteger
  D == G(SingleInteger, 21)
  import from D
  print << "sample@D = " << sample@D << newline

test()


