Index: src/CodeGen/CodeGenerator.cc
===================================================================
--- src/CodeGen/CodeGenerator.cc	(revision eab39cd564d14ce04f69d69d6601d9e1588e282f)
+++ src/CodeGen/CodeGenerator.cc	(revision f326f991b29be15df1c48ee29bf3e49f7a7ba81a)
@@ -10,5 +10,5 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Rob Schluntz
-// Last Modified On : Mon Apr 04 17:08:06 2016
+// Last Modified On : Mon Apr 11 15:30:52 2016
 // Update Count     : 255
 //
@@ -67,5 +67,6 @@
 	string mangleName( DeclarationWithType *decl ) {
 		if ( decl->get_mangleName() != "" ) {
-			return decl->get_mangleName();
+			// need to incorporate scope level in order to differentiate names for destructors
+			return decl->get_scopedMangleName();
 		} else {
 			return decl->get_name();
Index: src/CodeGen/FixNames.cc
===================================================================
--- src/CodeGen/FixNames.cc	(revision eab39cd564d14ce04f69d69d6601d9e1588e282f)
+++ src/CodeGen/FixNames.cc	(revision f326f991b29be15df1c48ee29bf3e49f7a7ba81a)
@@ -5,10 +5,10 @@
 // file "LICENCE" distributed with Cforall.
 //
-// FixNames.cc -- 
+// FixNames.cc --
 //
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Mon May 18 23:36:42 2015
+// Last Modified By : Rob Schluntz
+// Last Modified On : Mon Apr 11 15:38:10 2016
 // Update Count     : 1
 //
@@ -26,4 +26,11 @@
 		virtual void visit( ObjectDecl *objectDecl );
 		virtual void visit( FunctionDecl *functionDecl );
+
+		virtual void visit( CompoundStmt *compoundStmt );
+
+	  private:
+		int scopeLevel = 1;
+
+		void fixDWT( DeclarationWithType *dwt );
 	};
 
@@ -33,8 +40,9 @@
 	}
 
-	void fixDWT( DeclarationWithType *dwt ) {
+	void FixNames::fixDWT( DeclarationWithType *dwt ) {
 		if ( dwt->get_name() != "" ) {
 			if ( LinkageSpec::isDecoratable( dwt->get_linkage() ) ) {
 				dwt->set_mangleName( SymTab::Mangler::mangle( dwt ) );
+				dwt->set_scopeLevel( scopeLevel );
 			} // if
 		} // if
@@ -50,4 +58,10 @@
 		fixDWT( functionDecl );
 	}
+
+	void FixNames::visit( CompoundStmt *compoundStmt ) {
+		scopeLevel++;
+		Visitor::visit( compoundStmt );
+		scopeLevel--;
+	}
 } // namespace CodeGen
 
Index: src/SynTree/Declaration.h
===================================================================
--- src/SynTree/Declaration.h	(revision eab39cd564d14ce04f69d69d6601d9e1588e282f)
+++ src/SynTree/Declaration.h	(revision f326f991b29be15df1c48ee29bf3e49f7a7ba81a)
@@ -10,5 +10,5 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Rob Schluntz
-// Last Modified On : Mon Apr 04 17:14:00 2016
+// Last Modified On : Mon Apr 11 16:55:12 2016
 // Update Count     : 36
 //
@@ -22,4 +22,5 @@
 #include "Parser/LinkageSpec.h"
 #include "Parser/ParseNode.h"
+#include <string>
 
 class Declaration {
@@ -67,4 +68,9 @@
 	void set_mangleName( std::string newValue ) { mangleName = newValue; }
 
+	std::string get_scopedMangleName() const { return mangleName + "_" + std::to_string(scopeLevel); }
+
+	int get_scopeLevel() const { return scopeLevel; }
+	void set_scopeLevel( int newValue ) { scopeLevel = newValue; }
+
 	virtual DeclarationWithType *clone() const = 0;
 	virtual DeclarationWithType *acceptMutator( Mutator &m ) = 0;
@@ -75,4 +81,7 @@
 	// this represents the type with all types and typedefs expanded it is generated by SymTab::Validate::Pass2
 	std::string mangleName;
+	// need to remember the scope level at which the variable was declared, so that
+	// shadowed identifiers can be accessed
+	int scopeLevel = 0;
 };
 
Index: src/SynTree/DeclarationWithType.cc
===================================================================
--- src/SynTree/DeclarationWithType.cc	(revision eab39cd564d14ce04f69d69d6601d9e1588e282f)
+++ src/SynTree/DeclarationWithType.cc	(revision f326f991b29be15df1c48ee29bf3e49f7a7ba81a)
@@ -5,10 +5,10 @@
 // file "LICENCE" distributed with Cforall.
 //
-// DeclarationWithType.cc -- 
+// DeclarationWithType.cc --
 //
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Jun 13 08:08:07 2015
+// Last Modified By : Rob Schluntz
+// Last Modified On : Mon Apr 11 15:35:27 2016
 // Update Count     : 3
 //
@@ -23,5 +23,5 @@
 
 DeclarationWithType::DeclarationWithType( const DeclarationWithType &other )
-		: Declaration( other ), mangleName( other.mangleName ) {
+		: Declaration( other ), mangleName( other.mangleName ), scopeLevel( other.scopeLevel ) {
 }
 
Index: src/libcfa/Makefile.am
===================================================================
--- src/libcfa/Makefile.am	(revision eab39cd564d14ce04f69d69d6601d9e1588e282f)
+++ src/libcfa/Makefile.am	(revision f326f991b29be15df1c48ee29bf3e49f7a7ba81a)
@@ -67,3 +67,4 @@
 include_HEADERS = ${cheaders:=.h} ${libs} ${cfaheaders}
 
+CLEANFILES = libcfa-prelude.c
 MAINTAINERCLEANFILES += ${includedir}/*
Index: src/libcfa/Makefile.in
===================================================================
--- src/libcfa/Makefile.in	(revision eab39cd564d14ce04f69d69d6601d9e1588e282f)
+++ src/libcfa/Makefile.in	(revision f326f991b29be15df1c48ee29bf3e49f7a7ba81a)
@@ -218,4 +218,5 @@
 cfaheaders = limits
 include_HEADERS = ${cheaders:=.h} ${libs} ${cfaheaders}
+CLEANFILES = libcfa-prelude.c
 all: all-am
 
@@ -453,4 +454,5 @@
 
 clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
 
 distclean-generic:
