Index: src/SynTree/AddressExpr.cc
===================================================================
--- src/SynTree/AddressExpr.cc	(revision a12d5aaf574b9eda122e096ee19ea16b8f778731)
+++ src/SynTree/AddressExpr.cc	(revision b1e63ac54a1b3b3705d130858c9772e8b84c867f)
@@ -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 a12d5aaf574b9eda122e096ee19ea16b8f778731)
+++ src/SynTree/Mutator.cc	(revision b1e63ac54a1b3b3705d130858c9772e8b84c867f)
@@ -473,4 +473,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 a12d5aaf574b9eda122e096ee19ea16b8f778731)
+++ src/SynTree/Mutator.h	(revision b1e63ac54a1b3b3705d130858c9772e8b84c867f)
@@ -92,4 +92,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 b1e63ac54a1b3b3705d130858c9772e8b84c867f)
+++ src/SynTree/ReferenceType.cc	(revision b1e63ac54a1b3b3705d130858c9772e8b84c867f)
@@ -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 a12d5aaf574b9eda122e096ee19ea16b8f778731)
+++ src/SynTree/SynTree.h	(revision b1e63ac54a1b3b3705d130858c9772e8b84c867f)
@@ -101,4 +101,5 @@
 class PointerType;
 class ArrayType;
+class ReferenceType;
 class FunctionType;
 class ReferenceToType;
Index: src/SynTree/Type.h
===================================================================
--- src/SynTree/Type.h	(revision a12d5aaf574b9eda122e096ee19ea16b8f778731)
+++ src/SynTree/Type.h	(revision b1e63ac54a1b3b3705d130858c9772e8b84c867f)
@@ -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,21 @@
 };
 
+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;
+};
+
 class FunctionType : public Type {
   public:
Index: src/SynTree/Visitor.cc
===================================================================
--- src/SynTree/Visitor.cc	(revision a12d5aaf574b9eda122e096ee19ea16b8f778731)
+++ src/SynTree/Visitor.cc	(revision b1e63ac54a1b3b3705d130858c9772e8b84c867f)
@@ -363,4 +363,5 @@
 void Visitor::visit( PointerType *pointerType ) {
 	acceptAll( pointerType->get_forall(), *this );
+	// xxx - should PointerType visit/mutate dimension?
 	maybeAccept( pointerType->get_base(), *this );
 }
@@ -370,4 +371,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 a12d5aaf574b9eda122e096ee19ea16b8f778731)
+++ src/SynTree/Visitor.h	(revision b1e63ac54a1b3b3705d130858c9772e8b84c867f)
@@ -95,4 +95,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 );
Index: src/SynTree/module.mk
===================================================================
--- src/SynTree/module.mk	(revision a12d5aaf574b9eda122e096ee19ea16b8f778731)
+++ src/SynTree/module.mk	(revision b1e63ac54a1b3b3705d130858c9772e8b84c867f)
@@ -20,4 +20,5 @@
        SynTree/PointerType.cc \
        SynTree/ArrayType.cc \
+       SynTree/ReferenceType.cc \
        SynTree/FunctionType.cc \
        SynTree/ReferenceToType.cc \
