--* From postmaster%watson.vnet.ibm.com@yktvmv.watson.ibm.com  Tue Dec 21 08:39:03 1993
--* Received: from yktvmv.watson.ibm.com by leonardo.watson.ibm.com (AIX 3.2/UCB 5.64/4.03)
--*           id AA27185; Tue, 21 Dec 1993 08:39:03 -0500
--* X-External-Networks: yes
--* Received: from watson.vnet.ibm.com by yktvmv.watson.ibm.com (IBM VM SMTP V2R3)
--*    with BSMTP id 4517; Tue, 21 Dec 93 08:45:22 EST
--* Received: from YKTVMV by watson.vnet.ibm.com with "VAGENT.V1.0"
--*           id <A.BRONSTEI.NOTE.YKTVMV.0425.Dec.21.08:45:21.-0500>
--*           for asbugs@watson; Tue, 21 Dec 93 08:45:22 -0500
--* Received: from bernina.ethz.ch by watson.ibm.com (IBM VM SMTP V2R3) with TCP;
--*    Tue, 21 Dec 93 08:45:20 EST
--* Received: from neptune by bernina.ethz.ch with SMTP inbound id <1624-0@bernina.ethz.ch>; Tue, 21 Dec 1993 14:45:04 +0100
--* From: Manuel Bronstein <bronstei@inf.ethz.ch>
--* Received: from rutishauser.inf.ethz.ch (rutishauser-gw.inf.ethz.ch) by neptune id AA15584; Tue, 21 Dec 93 14:45:00 +0100
--* Date: Tue, 21 Dec 93 14:44:58 +0100
--* Message-Id: <9312211344.AA16575@rutishauser.inf.ethz.ch>
--* Received: from vinci.inf.ethz.ch.rutishauser by rutishauser.inf.ethz.ch id AA16575; Tue, 21 Dec 93 14:44:58 +0100
--* To: asbugs@watson.ibm.com
--* Subject: [3] error() on a return type of (T,T) produces bad foam code [badfoam.as][33.2]

--@ Fixed  by:  SSD   Mon Nov 21 11:14:00 EST 1994 
--@ Tested by:  none 
--@ Summary:    Now generating correct foam for exits from multi-valued sequences. (See bug531.) 
#if 0
PI: -Fo 
foamTag: Values is unhandled.
"bug541.c", line 170.58: 1506-046 (S) Syntax error.
"bug541.c", line 171.14: 1506-045 (S) Undeclared identifier L1.
#endif

-- peano [/u/manuel/a#] 224> asharp -Fx badfoam.as
-- foamTag: Values is unhandled.
-- "badfoam.c", line 101.58: 1506-046 (S) Syntax error.
-- "badfoam.c", line 102.14: 1506-045 (S) Undeclared identifier L1.
-- xlc: 1501-228 input file badfoam.o not found

-- peano [/u/manuel/a#] 228> asharp -Qall badfoam.as
-- (Error) Program fault (segmentation violation).

---------------------------- badfoam.as -----------------------
#include "aslib.as"

macro Z == SingleInteger;

import from Z;

-- This produces foam code which can't generate good C.
-- The problem is with the error statement.
-- This is very likely related to bug 531 (error when optimizing)
foo(a:Z):(Z, Z) == {
	zero? a => error "foo: I hate 0 as argument";
	(a, a);
}

print(1)();
 
