Index: src/ControlStruct/LabelFixer.cc
===================================================================
--- src/ControlStruct/LabelFixer.cc	(revision 0f8e4ac628ebde73ac11e8dfa6bd2e532f3627f6)
+++ src/ControlStruct/LabelFixer.cc	(revision 71a145de5bcbf8c7e9f1fd14beb7458d90bb060d)
@@ -95,15 +95,17 @@
 
 		for ( std::list< Label >::iterator i = llabel.begin(); i != llabel.end(); i++ ) {
-			if ( labelTable.find( *i ) == labelTable.end() ) {
+			Label & l = *i;
+			l.set_statement( definition ); // attach statement to the label to be used later
+			if ( labelTable.find( l ) == labelTable.end() ) {
 				// all labels on this statement need to use the same entry, so this should only be created once
 				// undefined and unused until now, add an entry
-				labelTable[ *i ] =  e;
-			} else if ( labelTable[ *i ]->defined() ) {
+				labelTable[ l ] =  e;
+			} else if ( labelTable[ l ]->defined() ) {
 				// defined twice, error
-				throw SemanticError( "Duplicate definition of label: " + (*i).get_name() );
+				throw SemanticError( "Duplicate definition of label: " + l.get_name() );
 			}	else {
 				// used previously, but undefined until now -> link with this entry
-				delete labelTable[ *i ];
-				labelTable[ *i ] = e;
+				delete labelTable[ l ];
+				labelTable[ l ] = e;
 			} // if
 		} // for
@@ -114,5 +116,5 @@
 	}
 
-	// A label was used, add it ot the table if it isn't already there
+	// A label was used, add it to the table if it isn't already there
 	template< typename UsageNode >
 	void LabelFixer::setLabelsUsg( Label orgValue, UsageNode *use ) {
Index: src/ControlStruct/MLEMutator.cc
===================================================================
--- src/ControlStruct/MLEMutator.cc	(revision 0f8e4ac628ebde73ac11e8dfa6bd2e532f3627f6)
+++ src/ControlStruct/MLEMutator.cc	(revision 71a145de5bcbf8c7e9f1fd14beb7458d90bb060d)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// MLEMutator.cc -- 
+// MLEMutator.cc --
 //
 // Author           : Rodolfo G. Esteves
@@ -14,5 +14,5 @@
 //
 
-// NOTE: There are two known subtle differences from the code that uC++ 
+// NOTE: There are two known subtle differences from the code that uC++
 // generates for the same input
 // -CFA puts the break label inside at the end of a switch, uC++ puts it after
@@ -34,7 +34,7 @@
 	}
 
-	// break labels have to come after the statement they break out of, 
+	// break labels have to come after the statement they break out of,
 	// so mutate a statement, then if they inform us through the breakLabel field
-	// tha they need a place to jump to on a break statement, add the break label 
+	// tha they need a place to jump to on a break statement, add the break label
 	// to the body of statements
 	void MLEMutator::fixBlock( std::list< Statement * > &kids ) {
@@ -44,10 +44,12 @@
 			if ( ! get_breakLabel().empty() ) {
 				std::list< Statement * >::iterator next = k+1;
+				Statement * stmt = 0;
 				if ( next == kids.end() ) {
 					std::list<Label> ls; ls.push_back( get_breakLabel() );
-					kids.push_back( new NullStmt( ls ) );
+					kids.push_back( stmt = new NullStmt( ls ) );
 				} else {
-					(*next)->get_labels().push_back( get_breakLabel() );
+					(stmt = *next)->get_labels().push_back( get_breakLabel() );
 				}
+				stmt->get_labels().front().set_statement( stmt );
 
 				set_breakLabel("");
@@ -81,5 +83,5 @@
 	template< typename LoopClass >
 	Statement *MLEMutator::handleLoopStmt( LoopClass *loopStmt ) {
-		// remember this as the most recent enclosing loop, then mutate 
+		// remember this as the most recent enclosing loop, then mutate
 		// the body of the loop -- this will determine whether brkLabel
 		// and contLabel are used with branch statements
@@ -111,8 +113,8 @@
 	template< typename SwitchClass >
 	Statement *MLEMutator::handleSwitchStmt( SwitchClass *switchStmt ) {
-		// generate a label for breaking out of a labeled switch 
+		// generate a label for breaking out of a labeled switch
 		Label brkLabel = generator->newLabel("switchBreak");
 		enclosingSwitches.push_back( Entry(switchStmt, brkLabel) );
-		mutateAll( switchStmt->get_branches(), *this ); 
+		mutateAll( switchStmt->get_branches(), *this );
 
 		Entry &e = enclosingSwitches.back();
@@ -121,6 +123,6 @@
 		// only generate break label if labeled break is used
 		if (e.isBreakUsed()) {
-			// for the purposes of keeping switch statements uniform (i.e. all statements that are 
-			// direct children of a switch should be CastStmts), append the exit label + break to the 
+			// for the purposes of keeping switch statements uniform (i.e. all statements that are
+			// direct children of a switch should be CastStmts), append the exit label + break to the
 			// last case statement; create a default case if there are no cases
 			std::list< Statement * > &branches = switchStmt->get_branches();
@@ -131,5 +133,7 @@
 			if ( CaseStmt * c = dynamic_cast< CaseStmt * >( branches.back() ) ) {
 				std::list<Label> temp; temp.push_back( brkLabel );
-				c->get_statements().push_back( new BranchStmt( temp, Label(""), BranchStmt::Break ) );
+				Statement * stmt = new BranchStmt( temp, Label(""), BranchStmt::Break );
+				stmt->get_labels().front().set_statement( stmt );
+				c->get_statements().push_back( stmt );
 			} else assert(0); // as of this point, all branches of a switch are still CaseStmts
 		}
@@ -206,11 +210,13 @@
 			// continue label goes in the body as the last statement
 			std::list< Label > labels; labels.push_back( e.useContExit() );
-			newBody->get_kids().push_back( new NullStmt( labels ) );			
+			Statement * stmt = new NullStmt( labels );
+			stmt->get_labels().front().set_statement( stmt );
+			newBody->get_kids().push_back( stmt );
 		}
 
 		if ( e.isBreakUsed() ) {
-			// break label goes after the loop -- it'll get set by the 
+			// break label goes after the loop -- it'll get set by the
 			// outer mutator if we do this
-			set_breakLabel( e.useBreakExit() );			
+			set_breakLabel( e.useBreakExit() );
 		}
 
@@ -231,5 +237,5 @@
 
 	Statement *MLEMutator::mutate( ChooseStmt *switchStmt ) {
-		return handleSwitchStmt( switchStmt );		
+		return handleSwitchStmt( switchStmt );
 	}
 
