| 1 |
/* PR tree-optimization/114405 */ |
| 2 |
/* { dg-do run { target bitint } } */ |
| 3 |
/* { dg-options "-std=c23" } */ |
| 4 |
/* { dg-skip-if "" { ! run_expensive_tests } { "*" } { "-O0" "-O2" } } */ |
| 5 |
/* { dg-skip-if "" { ! run_expensive_tests } { "-flto" } { "" } } */ |
| 6 |
|
| 7 |
#if __BITINT_MAXWIDTH__ >= 22658 |
| 8 |
struct S1 { unsigned _BitInt(22592) b : 22592; } s1; |
| 9 |
struct S2 { unsigned _BitInt(22656) b : 22656; } s2; |
| 10 |
struct S3 { unsigned _BitInt(22656) a : 1; unsigned _BitInt(22656) b : 22592; } s3; |
| 11 |
struct S4 { unsigned _BitInt(22720) a : 1; unsigned _BitInt(22720) b : 22656; } s4; |
| 12 |
struct S5 { unsigned _BitInt(22656) a : 63; unsigned _BitInt(22656) b : 22592; } s5; |
| 13 |
struct S6 { unsigned _BitInt(22720) a : 63; unsigned _BitInt(22720) b : 22656; } s6; |
| 14 |
struct S7 { unsigned _BitInt(22656) a : 63; unsigned _BitInt(22656) b : 22593; } s7; |
| 15 |
struct S8 { unsigned _BitInt(22720) a : 63; unsigned _BitInt(22720) b : 22657; } s8; |
| 16 |
struct S9 { unsigned _BitInt(22720) a : 63; unsigned _BitInt(22720) b : 22594; } s9; |
| 17 |
struct S10 { unsigned _BitInt(22784) a : 63; unsigned _BitInt(22784) b : 22658; } s10; |
| 18 |
|
| 19 |
void |
| 20 |
f1 () |
| 21 |
{ |
| 22 |
s1.b -= 1; |
| 23 |
} |
| 24 |
|
| 25 |
void |
| 26 |
f2 () |
| 27 |
{ |
| 28 |
s2.b -= 2; |
| 29 |
} |
| 30 |
|
| 31 |
void |
| 32 |
f3 () |
| 33 |
{ |
| 34 |
s3.b -= 3; |
| 35 |
} |
| 36 |
|
| 37 |
void |
| 38 |
f4 () |
| 39 |
{ |
| 40 |
s4.b -= 4; |
| 41 |
} |
| 42 |
|
| 43 |
void |
| 44 |
f5 () |
| 45 |
{ |
| 46 |
s5.b -= 5; |
| 47 |
} |
| 48 |
|
| 49 |
void |
| 50 |
f6 () |
| 51 |
{ |
| 52 |
s6.b -= 6; |
| 53 |
} |
| 54 |
|
| 55 |
void |
| 56 |
f7 () |
| 57 |
{ |
| 58 |
s7.b -= 7; |
| 59 |
} |
| 60 |
|
| 61 |
void |
| 62 |
f8 () |
| 63 |
{ |
| 64 |
s8.b -= 8; |
| 65 |
} |
| 66 |
|
| 67 |
void |
| 68 |
f9 () |
| 69 |
{ |
| 70 |
s9.b -= 9; |
| 71 |
} |
| 72 |
|
| 73 |
void |
| 74 |
f10 () |
| 75 |
{ |
| 76 |
s10.b -= 10; |
| 77 |
} |
| 78 |
#endif |
| 79 |
|
| 80 |
int |
| 81 |
main () |
| 82 |
{ |
| 83 |
#if __BITINT_MAXWIDTH__ >= 22658 |
| 84 |
unsigned _BitInt (22658) x = 35015800338050537498653008975574777488471087113295678194599504786371118710585944764484319821814068677490527864655685471191270812376315187006362917616576927111302865447983015739707543894301812327613134303841120826906790799707945571940353679717992456618228475528547510586897749233526180762796715338576474162208482247579501472751564244280666467759098306130591470559699084354910294882192723651841592393926757180305195950024774564220025030563292947354781759299194966498726876479688077238921483110994054027510847144042281753290386826921891349089652533212847637539203663944291864735754172352890834426862632126961163985046972025301399018684566740785996326722076659400941893788960122749623916485601415360002274675377030245228431275643589886668085292950399276178821803582907976934018711232293574702988204897189390955663390781810969523555013492735686957152905365370309275409263670885337914087790049584201395109754919697465084425517224980533087781850980467009812856730696074297910828639377203631339464675255240105642870755676377580847320171721410474552064279926175805508159289600278139657791849436955572980238115099785715087280249620991823931002767709388014969775014532212905291917079945444559149155885537869443203998149528921864913273054936504913012987390968722761436324692074211426577825330615158003561217398156744067970380132500886173138375004010286681801118436837157169356000174611385663795085963585748604221595275406157579119331428498714316454502878707144485541046851763795055069716380454650877888082099155307604956585565750095456844726339707735735457306818630192757960862820008907032696106990880643682877297054778560972681289475676822120960274032924190097299892650196374738015462740789768656492119706888461868600641030840748136350368218121335079547275823933746794720376649284092875982043181284314358557128707984260557357154662378677928178190735268683492714017854629967153014231157377885091064447831201063510650297385915804287319939506628451435721208364052433627434988729866237807202969467835254010038134458240638537208900261071474543301726397124628778009813885844516116875814757951712204725755866073002681855066543296947579858825103198060954359453660770400428464367183262945659741442129886496782750203291436130782872835833210931632788692244249384390726841766304668343729453316125242663035845457840953337688285031237708574070672758470607188306503291550138232031426679939617451739589817112669177611683906458764129736114273328542188257601463679042157104326452743228219904706515617554527404048486259443988771977512551077861016524071064966970245017842256022606252061533848052435944977075011683626924927864280265758204665377061594059017099850979465876532419313486240717486906824159353605563308622625101457788519462541166177560281487799503798108588440825426607303000287409968420712049604991695790921639810867480138128306445418986912743800521671354614532833872265863112799715535687739478987679787018336970919695660390682264636150577566966764721802539998608991596596546556960417641758069978309886615055065702687053645693124995478332454146800359894015089378783326036961147850317605896348313726625553781061923378718687650420049383163990299220462014901150975723976343990790739809356547239169873123203257078485635203722205187613294672585706712476042677590110639030069113837888415438005484344127768780921085274935619874173948989715840193896849220392368104518514031409179052524585070596066277001819910990553597508786540274520042981022543179426692284115768847300760319798602782719502711479977841874279930256816314452366331024645465785170800967984915770274302056373288589848483586271102816058353828602154848694512984885871790942162082427238005581376556754035790091155513425741055471166143834525319986952226318009226219401664653842860255680448070664407513672458449782074739011365473358229650988748472490629370744022391466625361113054412612574678134216032856556863642265414398411935273804108044993783269249262310916343278917698138611714061112393373897185388882146571186794769300914631780033370026907455350009100991398234230544005707225639911199001521060556494353269734418926976543883020167814965921931535096716826458262250189637748592376073865192810054352613051207327474619337934761146663426134935118503413825504082424332977262179190227449970171913254842194017309504632878985906186166214692140433429536009075713610528721894447986767468896884878765453610651622692341168938373665683970274583865449382798823150851403509730677053140708625595483245639618740574210653530198624859276131133783495033522802696413029101559426339050058584932631815922210413946199510350852865446812403106276713939581929546785460511137593419056060306250217029285811803013980616801841304694722011435758766177962049701664613512583182049260761144544863256467186213830060851829683883752577265078689385674617164146035435092588247318322733523567283845432256120837686647944780078580265417701923133121360511602219094764926277534354807040327859447719471002245844782328492039359603459083181436222097669007774554756731268016051487933312972616137658853650317461494196070488717404975633548685934461815467879673043738028501662385765726339447319024260930739951505693992826178343374149857545719100281434407604507469945111545032437656099424412573336369079168862003094855689600545933448699263081128774135084325432935970025160634165357145443378006220662160445647943128195352561425127099417647196668384335109349031134696463855906874865675419780741981139645587274839419864230821395469418683636935930834609291353227775312716176266653441965834697927579160177680186708970308315749650687662459599387055171808726719664673659254693742629742210875019198336374705508371903093542410995253013501601426016328214864707009534388699971539616972918925748729111792476147132099151408067415671771268758562336472333173561377424856607016076217345813200209837622293261269296049102357129259291847303310788402335473055104793925018108266365566334144957977011022080954274483513076181095572139673622797279076831219272711108256081425991375813518135442665798185129409104195642582574005698068543758814799878628816260575002894250723437469293380754329373751478069967151946701724550270952583590048204731437620446357611597703063140065615278014456977266371201795995646459704425842307781189527028486070466105764495249910844961272734411722090576328496690678921549811732110098855139371357058264972132635004768261508328436120677484741464226299067993312922923316398805257936717699519222213192533192746600829048907097046462066206043987729487350920474035219484795840791105847762753227958460953129122508970162044661061074090561192446511631511339514682638233698374095743691902757648070625949939841339410289027899541368321851192767145693326883564251857041615916159616490433637711319076039315762942426225728417924096927156791836747462094823404471357021596544260573448601630171546391583358297381573516226814145190492133449221202013592319137021uwb; |
| 85 |
unsigned _BitInt (22658) y = ~x, a; |
| 86 |
a = x >> (22658 - 22592); |
| 87 |
s1.b = a; |
| 88 |
f1 (); |
| 89 |
if (s1.b != a - 1) |
| 90 |
__builtin_abort (); |
| 91 |
a = y >> (22658 - 22592); |
| 92 |
s1.b = a; |
| 93 |
f1 (); |
| 94 |
if (s1.b != a - 1) |
| 95 |
__builtin_abort (); |
| 96 |
a = x >> (22658 - 22656); |
| 97 |
s2.b = a; |
| 98 |
f2 (); |
| 99 |
if (s2.b != a - 2) |
| 100 |
__builtin_abort (); |
| 101 |
a = y >> (22658 - 22656); |
| 102 |
s2.b = a; |
| 103 |
f2 (); |
| 104 |
if (s2.b != a - 2) |
| 105 |
__builtin_abort (); |
| 106 |
a = x >> (22658 - 22592); |
| 107 |
s3.b = a; |
| 108 |
f3 (); |
| 109 |
if (s3.b != a - 3) |
| 110 |
__builtin_abort (); |
| 111 |
a = y >> (22658 - 22592); |
| 112 |
s3.b = a; |
| 113 |
f3 (); |
| 114 |
if (s3.b != a - 3) |
| 115 |
__builtin_abort (); |
| 116 |
a = x >> (22658 - 22656); |
| 117 |
s4.b = a; |
| 118 |
f4 (); |
| 119 |
if (s4.b != a - 4) |
| 120 |
__builtin_abort (); |
| 121 |
a = y >> (22658 - 22656); |
| 122 |
s4.b = a; |
| 123 |
f4 (); |
| 124 |
if (s4.b != a - 4) |
| 125 |
__builtin_abort (); |
| 126 |
a = x >> (22658 - 22592); |
| 127 |
s5.b = a; |
| 128 |
f5 (); |
| 129 |
if (s5.b != a - 5) |
| 130 |
__builtin_abort (); |
| 131 |
a = y >> (22658 - 22592); |
| 132 |
s5.b = a; |
| 133 |
f5 (); |
| 134 |
if (s5.b != a - 5) |
| 135 |
__builtin_abort (); |
| 136 |
a = x >> (22658 - 22656); |
| 137 |
s6.b = a; |
| 138 |
f6 (); |
| 139 |
if (s6.b != a - 6) |
| 140 |
__builtin_abort (); |
| 141 |
a = y >> (22658 - 22656); |
| 142 |
s6.b = a; |
| 143 |
f6 (); |
| 144 |
if (s6.b != a - 6) |
| 145 |
__builtin_abort (); |
| 146 |
a = x >> (22658 - 22593); |
| 147 |
s7.b = a; |
| 148 |
f7 (); |
| 149 |
if (s7.b != a - 7) |
| 150 |
__builtin_abort (); |
| 151 |
a = y >> (22658 - 22593); |
| 152 |
s7.b = a; |
| 153 |
f7 (); |
| 154 |
if (s7.b != a - 7) |
| 155 |
__builtin_abort (); |
| 156 |
a = x >> (22658 - 22657); |
| 157 |
s8.b = a; |
| 158 |
f8 (); |
| 159 |
if (s8.b != a - 8) |
| 160 |
__builtin_abort (); |
| 161 |
a = y >> (22658 - 22657); |
| 162 |
s8.b = a; |
| 163 |
f8 (); |
| 164 |
if (s8.b != a - 8) |
| 165 |
__builtin_abort (); |
| 166 |
a = x >> (22658 - 22594); |
| 167 |
s9.b = a; |
| 168 |
f9 (); |
| 169 |
if (s9.b != a - 9) |
| 170 |
__builtin_abort (); |
| 171 |
a = y >> (22658 - 22594); |
| 172 |
s9.b = a; |
| 173 |
f9 (); |
| 174 |
if (s9.b != a - 9) |
| 175 |
__builtin_abort (); |
| 176 |
a = x >> (22658 - 22658); |
| 177 |
s10.b = a; |
| 178 |
f10 (); |
| 179 |
if (s10.b != a - 10) |
| 180 |
__builtin_abort (); |
| 181 |
a = y >> (22658 - 22658); |
| 182 |
s10.b = a; |
| 183 |
f10 (); |
| 184 |
if (s10.b != a - 10) |
| 185 |
__builtin_abort (); |
| 186 |
#endif |
| 187 |
} |