13401Smcimadamore/* PR optimization/10467  */
23401Smcimadamore/* { dg-do compile { target arm*-*-* xscale*-*-* strongarm*-*-* } } */
33401Smcimadamore/* { dg-options "-O2 -mthumb" } */
43401Smcimadamore
53401Smcimadamoretypedef enum {Ident_1} Enumeration;
63401Smcimadamore
73401Smcimadamoretypedef struct record
83401Smcimadamore{
93401Smcimadamore    struct record *Ptr_Comp;
103401Smcimadamore    Enumeration Discr;
113401Smcimadamore    union {
123401Smcimadamore	struct {
133401Smcimadamore	    Enumeration Enum_Comp;
143401Smcimadamore	    int Int_Comp;
153401Smcimadamore	    char Str_Comp [31];
163401Smcimadamore        } var_1;
173401Smcimadamore    } variant;
183401Smcimadamore} *Rec_Pointer;
193401Smcimadamore
203401SmcimadamoreRec_Pointer Ptr_Glob;
213401Smcimadamore
223401SmcimadamoreProc_1 (Ptr_Val_Par)
233401Smcimadamore    Rec_Pointer Ptr_Val_Par;
243401Smcimadamore{
253401Smcimadamore    Rec_Pointer Next_Record = Ptr_Val_Par->Ptr_Comp;
263401Smcimadamore
273401Smcimadamore    *Ptr_Val_Par->Ptr_Comp = *Ptr_Glob;
283401Smcimadamore
293401Smcimadamore    if (Next_Record->Discr == Ident_1)
303401Smcimadamore    {
313401Smcimadamore	Proc_7 (Next_Record->variant.var_1.Int_Comp, 10,
323401Smcimadamore		&Next_Record->variant.var_1.Int_Comp);
333401Smcimadamore    }
343401Smcimadamore}
353401Smcimadamore
363401Smcimadamore