117683Spst/* 239291Sfenner * CDDL HEADER START 317683Spst * 417683Spst * The contents of this file are subject to the terms of the 517683Spst * Common Development and Distribution License (the "License"). 617683Spst * You may not use this file except in compliance with the License. 717683Spst * 817683Spst * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 917683Spst * or http://www.opensolaris.org/os/licensing. 1017683Spst * See the License for the specific language governing permissions 1117683Spst * and limitations under the License. 1217683Spst * 1317683Spst * When distributing Covered Code, include this CDDL HEADER in each 1417683Spst * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1517683Spst * If applicable, add the following below this CDDL HEADER, with the 1617683Spst * fields enclosed by brackets "[]" replaced with your own identifying 1717683Spst * information: Portions Copyright [yyyy] [name of copyright owner] 1817683Spst * 1917683Spst * CDDL HEADER END 2017683Spst */ 2117683Spst 22127664Sbms/* 23214518Srpaulo * Copyright (c) 2011 by Delphix. All rights reserved. 2417683Spst */ 2517683Spst 2675107Sfenner#pragma D option quiet 2775107Sfenner 2875107Sfennertypedef struct bar { 2975107Sfenner int alpha; 3017683Spst} bar_t; 3117683Spst 3217683Spsttypedef struct foo { 3317683Spst int a[3]; 3417683Spst char b[30]; 3517683Spst bar_t c[2]; 3617683Spst char d[3]; 3717683Spst} foo_t; 3817683Spst 3917683SpstBEGIN 4017683Spst{ 4117683Spst this->f = (foo_t *)alloca(sizeof (foo_t)); 4217683Spst 4317683Spst this->f->a[0] = 1; 4417683Spst this->f->a[1] = 2; 4517683Spst this->f->a[2] = 3; 4617683Spst this->f->b[0] = 'a'; 4717683Spst this->f->b[1] = 'b'; 4817683Spst this->f->b[2] = 0; 4917683Spst this->f->c[0].alpha = 5; 5017683Spst this->f->c[1].alpha = 6; 5117683Spst this->f->c[2].alpha = 7; 5217683Spst this->f->d[0] = 4; 5317683Spst this->f->d[1] = 0; 5417683Spst this->f->d[2] = 0; 5517683Spst 5617683Spst print(this->f->a); 5717683Spst print(this->f->b); 5817683Spst print(this->f->c); 5917683Spst print(*this->f); 6017683Spst 61127664Sbms exit(0); 62127664Sbms} 6317683Spst