1*deef35fdSEric Schrock /* 2*deef35fdSEric Schrock * CDDL HEADER START 3*deef35fdSEric Schrock * 4*deef35fdSEric Schrock * The contents of this file are subject to the terms of the 5*deef35fdSEric Schrock * Common Development and Distribution License (the "License"). 6*deef35fdSEric Schrock * You may not use this file except in compliance with the License. 7*deef35fdSEric Schrock * 8*deef35fdSEric Schrock * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*deef35fdSEric Schrock * or http://www.opensolaris.org/os/licensing. 10*deef35fdSEric Schrock * See the License for the specific language governing permissions 11*deef35fdSEric Schrock * and limitations under the License. 12*deef35fdSEric Schrock * 13*deef35fdSEric Schrock * When distributing Covered Code, include this CDDL HEADER in each 14*deef35fdSEric Schrock * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*deef35fdSEric Schrock * If applicable, add the following below this CDDL HEADER, with the 16*deef35fdSEric Schrock * fields enclosed by brackets "[]" replaced with your own identifying 17*deef35fdSEric Schrock * information: Portions Copyright [yyyy] [name of copyright owner] 18*deef35fdSEric Schrock * 19*deef35fdSEric Schrock * CDDL HEADER END 20*deef35fdSEric Schrock */ 21*deef35fdSEric Schrock 22*deef35fdSEric Schrock /* 23*deef35fdSEric Schrock * Copyright (c) 2011 by Delphix. All rights reserved. 24*deef35fdSEric Schrock */ 25*deef35fdSEric Schrock 26*deef35fdSEric Schrock #pragma D option quiet 27*deef35fdSEric Schrock 28*deef35fdSEric Schrock typedef struct forward forward_t; 29*deef35fdSEric Schrock 30*deef35fdSEric Schrock typedef struct foo { 31*deef35fdSEric Schrock int a; 32*deef35fdSEric Schrock void *b; 33*deef35fdSEric Schrock struct { 34*deef35fdSEric Schrock uint64_t alpha; 35*deef35fdSEric Schrock uint64_t beta; 36*deef35fdSEric Schrock } c; 37*deef35fdSEric Schrock ushort_t d; 38*deef35fdSEric Schrock int e; 39*deef35fdSEric Schrock forward_t *f; 40*deef35fdSEric Schrock void (*g)(); 41*deef35fdSEric Schrock } foo_t; 42*deef35fdSEric Schrock 43*deef35fdSEric Schrock BEGIN 44*deef35fdSEric Schrock { 45*deef35fdSEric Schrock this->s = (foo_t *)alloca(sizeof (foo_t)); 46*deef35fdSEric Schrock 47*deef35fdSEric Schrock this->s->a = 1; 48*deef35fdSEric Schrock this->s->b = (void *)2; 49*deef35fdSEric Schrock this->s->c.alpha = 3; 50*deef35fdSEric Schrock this->s->c.beta = 4; 51*deef35fdSEric Schrock this->s->d = 5; 52*deef35fdSEric Schrock this->s->e = 6; 53*deef35fdSEric Schrock this->s->f = (void *)7; 54*deef35fdSEric Schrock this->s->g = (void *)8; 55*deef35fdSEric Schrock 56*deef35fdSEric Schrock print(*this->s); 57*deef35fdSEric Schrock 58*deef35fdSEric Schrock exit(0); 59*deef35fdSEric Schrock } 60