Index: src/ControlStruct/LabelFixer.cc
===================================================================
--- src/ControlStruct/LabelFixer.cc	(revision 0caaa6aab9ed29ccbf8b851f72668dd0922dfdc0)
+++ src/ControlStruct/LabelFixer.cc	(revision 23b6f4d7b77939970c646de6c3e77324af89e70c)
@@ -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 0caaa6aab9ed29ccbf8b851f72668dd0922dfdc0)
+++ src/ControlStruct/MLEMutator.cc	(revision 23b6f4d7b77939970c646de6c3e77324af89e70c)
@@ -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 );
 	}
 
Index: src/SynTree/Label.h
===================================================================
--- src/SynTree/Label.h	(revision 23b6f4d7b77939970c646de6c3e77324af89e70c)
+++ src/SynTree/Label.h	(revision 23b6f4d7b77939970c646de6c3e77324af89e70c)
@@ -0,0 +1,64 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// Label.h --
+//
+// Author           : Rob Schluntz
+// Created On       : Wed Jun 8 12:53:12 2016
+// Last Modified By : Rob Schluntz
+// Last Modified On : Wed Jun 8 12:53:28 2016
+// Update Count     : 1
+//
+
+#ifndef LABEL_H
+#define LABEL_H
+
+#include <string>
+#include <list>
+#include <iostream>
+#include "SynTree.h"
+
+// Label needs to know
+// * how deeply nested it is (scopeLevel)
+// * relative position in a scope compared with other labels (index?)
+// * either the original label it was generated from or the labels it generates (for labelled break/continue)
+
+class Label {
+  public:
+	Label( const std::string & name = "", Statement * labelled = 0 ) : name( name ), labelled( labelled ) {}
+	Label( const char * name, Statement * labelled = 0 ) : name( name ), labelled( labelled ) {}
+
+	const std::string & get_name() const { return name; }
+	void set_name( const std::string & newValue ) { name = newValue; }
+
+	Statement * get_statement() const { return labelled; }
+	void set_statement( Statement * newValue ) { labelled = newValue; }
+	std::list< Attribute * >& get_attributes() { return attributes; }
+
+	operator std::string() { return name; }
+	bool empty() { return name.empty(); }
+  private:
+	std::string name;
+	Statement * labelled;
+	std::list< Attribute * > attributes;
+};
+
+inline bool operator==( Label l1, Label l2 ) { return l1.get_name() == l2.get_name(); }
+inline bool operator!=( Label l1, Label l2 ) { return ! (l1 == l2); }
+inline bool operator<( Label l1, Label l2 ) { return l1.get_name() < l2.get_name(); }
+// inline Label operator+( Label l1, Label l2 ) { return l1.get_name() + l2.get_name(); }
+// inline Label operator+( Label l1, const char * str ) { return l1.get_name() + Label( str ); }
+inline std::ostream & operator<<( std::ostream & out, const Label & l ) { return out << l.get_name(); }
+
+static const std::list< Label > noLabels;
+
+#endif // LABEL_H
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
