Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision 4a79e3c9566a982b72e797c1c5a1603469357927)
+++ src/GenPoly/Box.cc	(revision 32805dbb99ed120ef9921a7fe6fa64ce4be94a49)
@@ -423,18 +423,19 @@
 			std::set< std::string > seenTypes; //< names for generic types we've seen
 			for ( ; fnParm != funcType->get_parameters().end() && fnArg != appExpr->get_args().end(); ++fnParm, ++fnArg ) {
-				Type *parmType = (*fnParm)->get_type();
-				if ( ! dynamic_cast< TypeInstType* >( parmType ) && isPolyType( parmType, exprTyVars ) ) {
-					std::string sizeName = sizeofName( parmType );
+				Type *polyBase = hasPolyBase( (*fnParm)->get_type(), exprTyVars );
+				if ( polyBase && ! dynamic_cast< TypeInstType* >( polyBase ) ) {
+					std::string sizeName = sizeofName( polyBase );
 					if ( seenTypes.count( sizeName ) ) continue;
 
-					assert( ! (*fnArg)->get_results().empty() );
-					Type *argType = (*fnArg)->get_results().front();
-					arg = appExpr->get_args().insert( arg, new SizeofExpr( argType->clone() ) );
+					VariableExpr *fnArgBase = getBaseVar( *fnArg );
+					assert( fnArgBase && ! fnArgBase->get_results().empty() );
+					Type *argBaseType = fnArgBase->get_results().front();
+					arg = appExpr->get_args().insert( arg, new SizeofExpr( argBaseType->clone() ) );
 					arg++;
-					arg = appExpr->get_args().insert( arg, new AlignofExpr( argType->clone() ) );
+					arg = appExpr->get_args().insert( arg, new AlignofExpr( argBaseType->clone() ) );
 					arg++;
-					if ( dynamic_cast< StructInstType* >( parmType ) ) {
-						if ( StructInstType *argStructType = dynamic_cast< StructInstType* >( argType ) ) {
-							arg = appExpr->get_args().insert( arg, makeOffsetArray( argStructType ) );
+					if ( dynamic_cast< StructInstType* >( polyBase ) ) {
+						if ( StructInstType *argBaseStructType = dynamic_cast< StructInstType* >( argBaseType ) ) {
+							arg = appExpr->get_args().insert( arg, makeOffsetArray( argBaseStructType ) );
 							arg++;
 						} else {
@@ -1177,7 +1178,7 @@
 			std::set< std::string > seenTypes; // sizeofName for generic types we've seen
 			for ( std::list< DeclarationWithType* >::const_iterator fnParm = last; fnParm != funcType->get_parameters().end(); ++fnParm ) {
-				Type *parmType = (*fnParm)->get_type();
-				if ( ! dynamic_cast< TypeInstType* >( parmType ) && isPolyType( parmType, scopeTyVars ) ) {
-					std::string sizeName = sizeofName( parmType );
+				Type *polyBase = hasPolyBase( (*fnParm)->get_type(), scopeTyVars );
+				if ( polyBase && ! dynamic_cast< TypeInstType* >( polyBase ) ) {
+					std::string sizeName = sizeofName( polyBase );
 					if ( seenTypes.count( sizeName ) ) continue;
 
@@ -1189,11 +1190,11 @@
 
 					alignParm = newObj.clone();
-					alignParm->set_name( alignofName( parmType ) );
+					alignParm->set_name( alignofName( polyBase ) );
 					last = funcType->get_parameters().insert( last, alignParm );
 					++last;
 
-					if ( dynamic_cast< StructInstType* >( parmType ) ) {
+					if ( dynamic_cast< StructInstType* >( polyBase ) ) {
 						offsetParm = newPtr.clone();
-						offsetParm->set_name( offsetofName( parmType ) );
+						offsetParm->set_name( offsetofName( polyBase ) );
 						last = funcType->get_parameters().insert( last, offsetParm );
 						++last;
Index: src/GenPoly/GenPoly.cc
===================================================================
--- src/GenPoly/GenPoly.cc	(revision 4a79e3c9566a982b72e797c1c5a1603469357927)
+++ src/GenPoly/GenPoly.cc	(revision 32805dbb99ed120ef9921a7fe6fa64ce4be94a49)
@@ -168,4 +168,6 @@
 			// found the variable directly
 			return varExpr;
+		} else if ( AddressExpr *addressExpr = dynamic_cast< AddressExpr* >( expr ) ) {
+			return getBaseVar( addressExpr->get_arg() );
 		} else if ( UntypedExpr *untypedExpr = dynamic_cast< UntypedExpr* >( expr ) ) {
 			// look for compiler-inserted dereference operator
