Index: src/SynTree/AddressExpr.cc
===================================================================
--- src/SynTree/AddressExpr.cc	(revision 262f085f5bcbf8161e794c370badc1a66ccb3991)
+++ src/SynTree/AddressExpr.cc	(revision d36c1176a741ca7104ffda6249bb4bc9bddf09cb)
@@ -20,5 +20,10 @@
 AddressExpr::AddressExpr( Expression *arg, Expression *_aname ) : Expression( _aname ), arg( arg ) {
 	if ( arg->has_result() ) {
-		set_result( new PointerType( Type::Qualifiers(), arg->get_result()->clone() ) );
+		if ( ReferenceType * refType = dynamic_cast< ReferenceType * > ( arg->get_result() ) ) {
+			// xxx - very temporary, make &ref look like **
+			set_result( new PointerType( Type::Qualifiers( Type::Lvalue ), refType->get_base()->clone() ) );
+		} else {
+			set_result( new PointerType( Type::Qualifiers(), arg->get_result()->clone() ) );
+		}
 	}
 }
Index: src/SynTree/Mutator.cc
===================================================================
--- src/SynTree/Mutator.cc	(revision 262f085f5bcbf8161e794c370badc1a66ccb3991)
+++ src/SynTree/Mutator.cc	(revision d36c1176a741ca7104ffda6249bb4bc9bddf09cb)
@@ -462,4 +462,10 @@
 }
 
+Type *Mutator::mutate( ReferenceType *refType ) {
+	mutateAll( refType->get_forall(), *this );
+	refType->set_base( maybeMutate( refType->get_base(), *this ) );
+	return refType;
+}
+
 Type *Mutator::mutate( FunctionType *functionType ) {
 	mutateAll( functionType->get_forall(), *this );
Index: src/SynTree/Mutator.h
===================================================================
--- src/SynTree/Mutator.h	(revision 262f085f5bcbf8161e794c370badc1a66ccb3991)
+++ src/SynTree/Mutator.h	(revision d36c1176a741ca7104ffda6249bb4bc9bddf09cb)
@@ -91,4 +91,5 @@
 	virtual Type* mutate( PointerType *pointerType );
 	virtual Type* mutate( ArrayType *arrayType );
+	virtual Type* mutate( ReferenceType *refType );
 	virtual Type* mutate( FunctionType *functionType );
 	virtual Type* mutate( StructInstType *aggregateUseType );
Index: src/SynTree/ReferenceType.cc
===================================================================
--- src/SynTree/ReferenceType.cc	(revision d36c1176a741ca7104ffda6249bb4bc9bddf09cb)
+++ src/SynTree/ReferenceType.cc	(revision d36c1176a741ca7104ffda6249bb4bc9bddf09cb)
@@ -0,0 +1,44 @@
+//
+// 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.
+//
+// PointerType.cc --
+//
+// Author           : Rob Schluntz
+// Created On       : Fri May 12 18:12:15 2017
+// Last Modified By : Rob Schluntz
+// Last Modified On : Fri May 12 18:12:15 2017
+// Update Count     : 1
+//
+
+#include "Type.h"
+#include "Expression.h"
+#include "Common/utility.h"
+
+ReferenceType::ReferenceType( const Type::Qualifiers &tq, Type *base, const std::list< Attribute * > & attributes )
+  : Type( tq, attributes ), base( base ) {
+}
+
+ReferenceType::ReferenceType( const ReferenceType &other )
+  : Type( other ), base( maybeClone( other.base ) ) {
+}
+
+ReferenceType::~ReferenceType() {
+  delete base;
+}
+
+void ReferenceType::print( std::ostream &os, int indent ) const {
+  Type::print( os, indent );
+  os << "reference to ";
+  if ( base ) {
+    base->print( os, indent );
+  } // if
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/SynTree/SynTree.h
===================================================================
--- src/SynTree/SynTree.h	(revision 262f085f5bcbf8161e794c370badc1a66ccb3991)
+++ src/SynTree/SynTree.h	(revision d36c1176a741ca7104ffda6249bb4bc9bddf09cb)
@@ -99,4 +99,5 @@
 class PointerType;
 class ArrayType;
+class ReferenceType;
 class FunctionType;
 class ReferenceToType;
Index: src/SynTree/Type.h
===================================================================
--- src/SynTree/Type.h	(revision 262f085f5bcbf8161e794c370badc1a66ccb3991)
+++ src/SynTree/Type.h	(revision d36c1176a741ca7104ffda6249bb4bc9bddf09cb)
@@ -249,4 +249,6 @@
 	bool is_array() const { return isStatic || isVarLen || dimension; }
 
+	virtual bool isComplete() const { return ! isVarLen; }
+
 	virtual PointerType *clone() const { return new PointerType( *this ); }
 	virtual void accept( Visitor & v ) { v.visit( this ); }
@@ -290,4 +292,22 @@
 };
 
+class ReferenceType : public Type {
+public:
+	ReferenceType( const Type::Qualifiers & tq, Type *base, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
+	ReferenceType( const ReferenceType & );
+	virtual ~ReferenceType();
+
+	Type *get_base() { return base; }
+	void set_base( Type *newValue ) { base = newValue; }
+
+	virtual ReferenceType *clone() const { return new ReferenceType( *this ); }
+	virtual void accept( Visitor & v ) { v.visit( this ); }
+	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const;
+private:
+	Type *base;
+	unsigned int level = 0;
+};
+
 class FunctionType : public Type {
   public:
Index: src/SynTree/Visitor.cc
===================================================================
--- src/SynTree/Visitor.cc	(revision 262f085f5bcbf8161e794c370badc1a66ccb3991)
+++ src/SynTree/Visitor.cc	(revision d36c1176a741ca7104ffda6249bb4bc9bddf09cb)
@@ -354,4 +354,5 @@
 void Visitor::visit( PointerType *pointerType ) {
 	acceptAll( pointerType->get_forall(), *this );
+	// xxx - should PointerType visit/mutate dimension?
 	maybeAccept( pointerType->get_base(), *this );
 }
@@ -361,4 +362,9 @@
 	maybeAccept( arrayType->get_dimension(), *this );
 	maybeAccept( arrayType->get_base(), *this );
+}
+
+void Visitor::visit( ReferenceType *refType ) {
+	acceptAll( refType->get_forall(), *this );
+	maybeAccept( refType->get_base(), *this );
 }
 
Index: src/SynTree/Visitor.h
===================================================================
--- src/SynTree/Visitor.h	(revision 262f085f5bcbf8161e794c370badc1a66ccb3991)
+++ src/SynTree/Visitor.h	(revision d36c1176a741ca7104ffda6249bb4bc9bddf09cb)
@@ -94,4 +94,5 @@
 	virtual void visit( PointerType *pointerType );
 	virtual void visit( ArrayType *arrayType );
+	virtual void visit( ReferenceType *refType );
 	virtual void visit( FunctionType *functionType );
 	virtual void visit( StructInstType *aggregateUseType );
@@ -163,5 +164,5 @@
 			} // if
 		} catch( SemanticError &e ) {
-			e.set_location( (*i)->location );			
+			e.set_location( (*i)->location );
 			errors.append( e );
 		} // try
Index: src/SynTree/module.mk
===================================================================
--- src/SynTree/module.mk	(revision 262f085f5bcbf8161e794c370badc1a66ccb3991)
+++ src/SynTree/module.mk	(revision d36c1176a741ca7104ffda6249bb4bc9bddf09cb)
@@ -20,4 +20,5 @@
        SynTree/PointerType.cc \
        SynTree/ArrayType.cc \
+       SynTree/ReferenceType.cc \
        SynTree/FunctionType.cc \
        SynTree/ReferenceToType.cc \
