Remove outermost loop parameter.
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.c-torture / execute / 20030714-1.c
blob719baede26f5f70bffa1d87ce4be87e4f0934378
1 /* derived from PR optimization/11440 */
3 extern void abort (void);
4 extern void exit (int);
6 typedef _Bool bool;
7 const bool false = 0;
8 const bool true = 1;
10 enum EPosition
12 STATIC, RELATIVE, ABSOLUTE, FIXED
14 typedef enum EPosition EPosition;
16 enum EFloat
18 FNONE = 0, FLEFT, FRIGHT
20 typedef enum EFloat EFloat;
22 struct RenderBox
24 int unused[6];
25 short m_verticalPosition;
27 bool m_layouted : 1;
28 bool m_unused : 1;
29 bool m_minMaxKnown : 1;
30 bool m_floating : 1;
32 bool m_positioned : 1;
33 bool m_overhangingContents : 1;
34 bool m_relPositioned : 1;
35 bool m_paintSpecial : 1;
37 bool m_isAnonymous : 1;
38 bool m_recalcMinMax : 1;
39 bool m_isText : 1;
40 bool m_inline : 1;
42 bool m_replaced : 1;
43 bool m_mouseInside : 1;
44 bool m_hasFirstLine : 1;
45 bool m_isSelectionBorder : 1;
47 bool (*isTableCell) (struct RenderBox *this);
50 typedef struct RenderBox RenderBox;
52 struct RenderStyle
54 struct NonInheritedFlags
56 union
58 struct
60 unsigned int _display : 4;
61 unsigned int _bg_repeat : 2;
62 bool _bg_attachment : 1;
63 unsigned int _overflow : 4 ;
64 unsigned int _vertical_align : 4;
65 unsigned int _clear : 2;
66 EPosition _position : 2;
67 EFloat _floating : 2;
68 unsigned int _table_layout : 1;
69 bool _flowAroundFloats :1;
71 unsigned int _styleType : 3;
72 bool _hasHover : 1;
73 bool _hasActive : 1;
74 bool _clipSpecified : 1;
75 unsigned int _unicodeBidi : 2;
76 int _unused : 1;
77 } f;
78 int _niflags;
80 } noninherited_flags;
83 typedef struct RenderStyle RenderStyle;
85 extern void RenderObject_setStyle(RenderBox *this, RenderStyle *_style);
86 extern void removeFromSpecialObjects(RenderBox *this);
90 void RenderBox_setStyle(RenderBox *thisin, RenderStyle *_style)
92 RenderBox *this = thisin;
93 bool oldpos, tmp;
94 EPosition tmppo;
96 tmp = this->m_positioned;
98 oldpos = tmp;
100 RenderObject_setStyle(this, _style);
102 tmppo = _style->noninherited_flags.f._position;
104 switch(tmppo)
106 case ABSOLUTE:
107 case FIXED:
109 bool ltrue = true;
110 this->m_positioned = ltrue;
111 break;
114 default:
116 EFloat tmpf;
117 EPosition tmpp;
118 if (oldpos)
120 bool ltrue = true;
121 this->m_positioned = ltrue;
122 removeFromSpecialObjects(this);
125 bool lfalse = false;
126 this->m_positioned = lfalse;
129 tmpf = _style->noninherited_flags.f._floating;
131 if(!this->isTableCell (this) && !(tmpf == FNONE))
133 bool ltrue = true;
134 this->m_floating = ltrue;
136 else
138 tmpp = _style->noninherited_flags.f._position;
139 if (tmpp == RELATIVE)
141 bool ltrue = true;
142 this->m_relPositioned = ltrue;
152 RenderBox g_this;
153 RenderStyle g__style;
155 void RenderObject_setStyle(RenderBox *this, RenderStyle *_style)
157 (void) this;
158 (void) _style;
161 void removeFromSpecialObjects(RenderBox *this)
163 (void) this;
166 bool RenderBox_isTableCell (RenderBox *this)
168 (void) this;
169 return false;
172 int main (void)
175 g_this.m_relPositioned = false;
176 g_this.m_positioned = false;
177 g_this.m_floating = false;
178 g_this.isTableCell = RenderBox_isTableCell;
180 g__style.noninherited_flags.f._position = FIXED;
181 g__style.noninherited_flags.f._floating = FNONE;
183 RenderBox_setStyle (&g_this, &g__style);
185 if (g_this.m_positioned != true)
186 abort ();
187 if (g_this.m_relPositioned != false)
188 abort ();
189 if (g_this.m_floating != false)
190 abort ();
192 exit (0);