1; RUN: opt < %s -inline -prune-eh -disable-output 2; PR992 3target datalayout = "e-p:32:32" 4target triple = "i686-pc-linux-gnu" 5 %struct._IO_FILE = type { i32, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, %struct._IO_marker*, %struct._IO_FILE*, i32, i32, i32, i16, i8, [1 x i8], i8*, i64, i8*, i8*, i32, [52 x i8] } 6 %struct._IO_marker = type { %struct._IO_marker*, %struct._IO_FILE*, i32 } 7 %"struct.__cxxabiv1::__array_type_info" = type { %"struct.std::type_info" } 8 %"struct.__cxxabiv1::__si_class_type_info" = type { %"struct.__cxxabiv1::__array_type_info", %"struct.__cxxabiv1::__array_type_info"* } 9 %"struct.__gnu_cxx::_Rope_rep_alloc_base<char,std::allocator<char>, true>" = type { i32 } 10 %"struct.__gnu_cxx::__normal_iterator<char*,std::basic_string<char, std::char_traits<char>, std::allocator<char> > >" = type { i8* } 11 %"struct.__gnu_cxx::__normal_iterator<const wchar_t*,std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >" = type { i32* } 12 %"struct.__gnu_cxx::char_producer<char>" = type { i32 (...)** } 13 %"struct.__gnu_cxx::stdio_sync_filebuf<char,std::char_traits<char> >" = type { %"struct.std::basic_streambuf<char,std::char_traits<char> >", %struct._IO_FILE*, i32 } 14 %"struct.__gnu_cxx::stdio_sync_filebuf<wchar_t,std::char_traits<wchar_t> >" = type { %"struct.std::basic_streambuf<wchar_t,std::char_traits<wchar_t> >", %struct._IO_FILE*, i32 } 15 %struct.__locale_struct = type { [13 x %struct.locale_data*], i16*, i32*, i32*, [13 x i8*] } 16 %struct.__mbstate_t = type { i32, %"struct.__gnu_cxx::_Rope_rep_alloc_base<char,std::allocator<char>, true>" } 17 %struct.locale_data = type opaque 18 %"struct.std::__basic_file<char>" = type { %struct._IO_FILE*, i1 } 19 %"struct.std::__codecvt_abstract_base<char,char,__mbstate_t>" = type { %"struct.std::locale::facet" } 20 %"struct.std::basic_filebuf<char,std::char_traits<char> >" = type { %"struct.std::basic_streambuf<char,std::char_traits<char> >", i32, %"struct.std::__basic_file<char>", i32, %struct.__mbstate_t, %struct.__mbstate_t, i8*, i32, i1, i1, i1, i1, i8, i8*, i8*, i1, %"struct.std::codecvt<char,char,__mbstate_t>"*, i8*, i32, i8*, i8* } 21 %"struct.std::basic_filebuf<wchar_t,std::char_traits<wchar_t> >" = type { %"struct.std::basic_streambuf<wchar_t,std::char_traits<wchar_t> >", i32, %"struct.std::__basic_file<char>", i32, %struct.__mbstate_t, %struct.__mbstate_t, i32*, i32, i1, i1, i1, i1, i32, i32*, i32*, i1, %"struct.std::codecvt<char,char,__mbstate_t>"*, i8*, i32, i8*, i8* } 22 %"struct.std::basic_fstream<char,std::char_traits<char> >" = type { { %"struct.std::locale::facet", %"struct.__gnu_cxx::char_producer<char>" }, %"struct.std::basic_filebuf<char,std::char_traits<char> >", %"struct.std::basic_ios<char,std::char_traits<char> >" } 23 %"struct.std::basic_fstream<wchar_t,std::char_traits<wchar_t> >" = type { { %"struct.std::locale::facet", %"struct.__gnu_cxx::char_producer<char>" }, %"struct.std::basic_filebuf<wchar_t,std::char_traits<wchar_t> >", %"struct.std::basic_ios<wchar_t,std::char_traits<wchar_t> >" } 24 %"struct.std::basic_ios<char,std::char_traits<char> >" = type { %"struct.std::ios_base", %"struct.std::basic_ostream<char,std::char_traits<char> >"*, i8, i1, %"struct.std::basic_streambuf<char,std::char_traits<char> >"*, %"struct.std::ctype<char>"*, %"struct.std::__codecvt_abstract_base<char,char,__mbstate_t>"*, %"struct.std::__codecvt_abstract_base<char,char,__mbstate_t>"* } 25 %"struct.std::basic_ios<wchar_t,std::char_traits<wchar_t> >" = type { %"struct.std::ios_base", %"struct.std::basic_ostream<wchar_t,std::char_traits<wchar_t> >"*, i32, i1, %"struct.std::basic_streambuf<wchar_t,std::char_traits<wchar_t> >"*, %"struct.std::codecvt<char,char,__mbstate_t>"*, %"struct.std::__codecvt_abstract_base<char,char,__mbstate_t>"*, %"struct.std::__codecvt_abstract_base<char,char,__mbstate_t>"* } 26 %"struct.std::basic_iostream<wchar_t,std::char_traits<wchar_t> >" = type { %"struct.std::locale::facet", %"struct.__gnu_cxx::char_producer<char>", %"struct.std::basic_ios<wchar_t,std::char_traits<wchar_t> >" } 27 %"struct.std::basic_ostream<char,std::char_traits<char> >" = type { i32 (...)**, %"struct.std::basic_ios<char,std::char_traits<char> >" } 28 %"struct.std::basic_ostream<wchar_t,std::char_traits<wchar_t> >" = type { i32 (...)**, %"struct.std::basic_ios<wchar_t,std::char_traits<wchar_t> >" } 29 %"struct.std::basic_streambuf<char,std::char_traits<char> >" = type { i32 (...)**, i8*, i8*, i8*, i8*, i8*, i8*, %"struct.std::locale" } 30 %"struct.std::basic_streambuf<wchar_t,std::char_traits<wchar_t> >" = type { i32 (...)**, i32*, i32*, i32*, i32*, i32*, i32*, %"struct.std::locale" } 31 %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >" = type { %"struct.__gnu_cxx::__normal_iterator<char*,std::basic_string<char, std::char_traits<char>, std::allocator<char> > >" } 32 %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Rep" = type { %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Rep_base" } 33 %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >::_Rep_base" = type { i32, i32, i32 } 34 %"struct.std::basic_string<wchar_t,std::char_traits<wchar_t>,std::allocator<wchar_t> >" = type { %"struct.__gnu_cxx::__normal_iterator<const wchar_t*,std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >" } 35 %"struct.std::codecvt<char,char,__mbstate_t>" = type { %"struct.std::__codecvt_abstract_base<char,char,__mbstate_t>", %struct.__locale_struct* } 36 %"struct.std::collate<char>" = type { %"struct.std::locale::facet", %struct.__locale_struct* } 37 %"struct.std::collate_byname<char>" = type { %"struct.std::collate<char>" } 38 %"struct.std::ctype<char>" = type { %"struct.std::__codecvt_abstract_base<char,char,__mbstate_t>", %struct.__locale_struct*, i1, i32*, i32*, i16* } 39 %"struct.std::ctype_byname<char>" = type { %"struct.std::ctype<char>" } 40 %"struct.std::domain_error" = type { %"struct.std::logic_error" } 41 %"struct.std::ios_base" = type { i32 (...)**, i32, i32, i32, i32, i32, %"struct.std::ios_base::_Callback_list"*, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, %"struct.std::ios_base::_Words"*, %"struct.std::locale" } 42 %"struct.std::ios_base::_Callback_list" = type { %"struct.std::ios_base::_Callback_list"*, void (i32, %"struct.std::ios_base"*, i32)*, i32, i32 } 43 %"struct.std::ios_base::_Words" = type { i8*, i32 } 44 %"struct.std::istreambuf_iterator<char,std::char_traits<char> >" = type { %"struct.std::basic_streambuf<char,std::char_traits<char> >"*, i32 } 45 %"struct.std::istreambuf_iterator<wchar_t,std::char_traits<wchar_t> >" = type { %"struct.std::basic_streambuf<wchar_t,std::char_traits<wchar_t> >"*, i32 } 46 %"struct.std::locale" = type { %"struct.std::locale::_Impl"* } 47 %"struct.std::locale::_Impl" = type { i32, %"struct.std::locale::facet"**, i32, %"struct.std::locale::facet"**, i8** } 48 %"struct.std::locale::facet" = type { i32 (...)**, i32 } 49 %"struct.std::logic_error" = type { %"struct.__gnu_cxx::char_producer<char>", %"struct.std::basic_string<char,std::char_traits<char>,std::allocator<char> >" } 50 %"struct.std::type_info" = type { i32 (...)**, i8* } 51@.str_11 = external global [42 x i8] ; <[42 x i8]*> [#uses=0] 52@.str_9 = external global [24 x i8] ; <[24 x i8]*> [#uses=0] 53@.str_1 = external global [17 x i8] ; <[17 x i8]*> [#uses=0] 54 55define void @main() { 56entry: 57 tail call fastcc void @_ZNSolsEi( ) 58 ret void 59} 60 61define fastcc void @_ZNSolsEi() { 62entry: 63 %tmp.22 = icmp eq i32 0, 0 ; <i1> [#uses=1] 64 br i1 %tmp.22, label %else, label %then 65 66then: ; preds = %entry 67 ret void 68 69else: ; preds = %entry 70 tail call fastcc void @_ZNSolsEl( ) 71 ret void 72} 73 74define void @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_() { 75entry: 76 ret void 77} 78 79define fastcc void @_ZNSt9basic_iosIcSt11char_traitsIcEE8setstateESt12_Ios_Iostate() { 80entry: 81 tail call fastcc void @_ZSt19__throw_ios_failurePKc( ) 82 ret void 83} 84 85define fastcc void @_ZNSo3putEc() { 86entry: 87 ret void 88} 89 90define fastcc void @_ZNSolsEl() { 91entry: 92 %tmp.21.i = icmp eq %"struct.std::basic_ostream<char,std::char_traits<char> >"* null, null ; <i1> [#uses=1] 93 br i1 %tmp.21.i, label %endif.0.i, label %shortcirc_next.i 94 95shortcirc_next.i: ; preds = %entry 96 ret void 97 98endif.0.i: ; preds = %entry 99 call fastcc void @_ZNSt9basic_iosIcSt11char_traitsIcEE8setstateESt12_Ios_Iostate( ) 100 ret void 101} 102 103define fastcc void @_ZSt19__throw_ios_failurePKc() { 104entry: 105 call fastcc void @_ZNSsC1EPKcRKSaIcE( ) 106 ret void 107} 108 109define fastcc void @_ZNSt8ios_baseD2Ev() { 110entry: 111 unreachable 112} 113 114define void @_ZN9__gnu_cxx18stdio_sync_filebufIwSt11char_traitsIwEE5uflowEv() { 115entry: 116 unreachable 117} 118 119define void @_ZN9__gnu_cxx18stdio_sync_filebufIcSt11char_traitsIcEED1Ev() { 120entry: 121 unreachable 122} 123 124define void @_ZNSt15basic_streambufIcSt11char_traitsIcEE6setbufEPci() { 125entry: 126 ret void 127} 128 129define fastcc void @_ZSt9use_facetISt5ctypeIcEERKT_RKSt6locale() { 130entry: 131 ret void 132} 133 134declare fastcc void @_ZNSaIcED1Ev() 135 136define fastcc void @_ZSt19__throw_logic_errorPKc() { 137entry: 138 call fastcc void @_ZNSt11logic_errorC1ERKSs( ) 139 ret void 140} 141 142define fastcc void @_ZNSs4_Rep9_S_createEjRKSaIcE() { 143entry: 144 br i1 false, label %then.0, label %endif.0 145 146then.0: ; preds = %entry 147 call fastcc void @_ZSt20__throw_length_errorPKc( ) 148 ret void 149 150endif.0: ; preds = %entry 151 ret void 152} 153 154define fastcc void @_ZSt20__throw_length_errorPKc() { 155entry: 156 call fastcc void @_ZNSt12length_errorC1ERKSs( ) 157 ret void 158} 159 160define fastcc void @_ZNSs16_S_construct_auxIPKcEEPcT_S3_RKSaIcE12__false_type() { 161entry: 162 br i1 false, label %then.1.i, label %endif.1.i 163 164then.1.i: ; preds = %entry 165 call fastcc void @_ZSt19__throw_logic_errorPKc( ) 166 ret void 167 168endif.1.i: ; preds = %entry 169 call fastcc void @_ZNSs4_Rep9_S_createEjRKSaIcE( ) 170 unreachable 171} 172 173define fastcc void @_ZNSsC1ERKSs() { 174entry: 175 call fastcc void @_ZNSs4_Rep7_M_grabERKSaIcES2_( ) 176 invoke fastcc void @_ZNSaIcEC1ERKS_( ) 177 to label %invoke_cont.1 unwind label %invoke_catch.1 178 179invoke_catch.1: ; preds = %entry 180 %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 181 catch i8* null 182 call fastcc void @_ZNSaIcED1Ev( ) 183 resume { i8*, i32 } %exn 184 185invoke_cont.1: ; preds = %entry 186 call fastcc void @_ZNSaIcEC2ERKS_( ) 187 ret void 188} 189 190define fastcc void @_ZNSs7reserveEj() { 191entry: 192 ret void 193} 194 195define fastcc void @_ZNSaIcEC1ERKS_() { 196entry: 197 ret void 198} 199 200define fastcc void @_ZNSs4_Rep7_M_grabERKSaIcES2_() { 201entry: 202 br i1 false, label %else.i, label %cond_true 203 204cond_true: ; preds = %entry 205 ret void 206 207else.i: ; preds = %entry 208 tail call fastcc void @_ZNSs4_Rep9_S_createEjRKSaIcE( ) 209 ret void 210} 211 212define fastcc void @_ZNSsC1EPKcRKSaIcE() { 213entry: 214 tail call fastcc void @_ZNSs16_S_construct_auxIPKcEEPcT_S3_RKSaIcE12__false_type( ) 215 unreachable 216} 217 218define fastcc void @_ZNSaIcEC2ERKS_() { 219entry: 220 ret void 221} 222 223define void @_ZNSt7num_putIwSt19ostreambuf_iteratorIwSt11char_traitsIwEEED1Ev() { 224entry: 225 unreachable 226} 227 228define void @_ZNSt14collate_bynameIcED1Ev() { 229entry: 230 unreachable 231} 232 233define void @_ZNKSt7num_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEE6do_getES3_S3_RSt8ios_baseRSt12_Ios_IostateRy() { 234entry: 235 ret void 236} 237 238define void @_ZNSt23__codecvt_abstract_baseIcc11__mbstate_tED1Ev() { 239entry: 240 unreachable 241} 242 243define void @_ZNSt12ctype_bynameIcED0Ev() { 244entry: 245 unreachable 246} 247 248define fastcc void @_ZNSt8messagesIwEC1Ej() { 249entry: 250 ret void 251} 252 253define fastcc void @_ZSt14__convert_to_vIlEvPKcRT_RSt12_Ios_IostateRKP15__locale_structi() { 254entry: 255 ret void 256} 257 258define fastcc void @_ZNSt8time_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEEC1Ej() { 259entry: 260 ret void 261} 262 263define fastcc void @_ZNSt8time_getIcSt19istreambuf_iteratorIcSt11char_traitsIcEEEC1Ej() { 264entry: 265 ret void 266} 267 268define fastcc void @_ZNKSt7num_getIwSt19istreambuf_iteratorIwSt11char_traitsIwEEE16_M_extract_floatES3_S3_RSt8ios_baseRSt12_Ios_IostateRSs() { 269entry: 270 unreachable 271} 272 273define fastcc void @_ZNSbIwSt11char_traitsIwESaIwEE4swapERS2_() { 274entry: 275 ret void 276} 277 278define void @_ZNSt14basic_iostreamIwSt11char_traitsIwEED0Ev() { 279entry: 280 unreachable 281} 282 283define void @_ZNSt15basic_streambufIcSt11char_traitsIcEE9showmanycEv() { 284entry: 285 ret void 286} 287 288define void @_ZNSt9exceptionD0Ev() { 289entry: 290 unreachable 291} 292 293define fastcc void @_ZNSt11logic_errorC1ERKSs() { 294entry: 295 call fastcc void @_ZNSsC1ERKSs( ) 296 ret void 297} 298 299define fastcc void @_ZNSt11logic_errorD2Ev() { 300entry: 301 unreachable 302} 303 304define fastcc void @_ZNSt12length_errorC1ERKSs() { 305entry: 306 invoke fastcc void @_ZNSsC1ERKSs( ) 307 to label %_ZNSt11logic_errorC2ERKSs.exit unwind label %invoke_catch.i 308 309invoke_catch.i: ; preds = %entry 310 %exn = landingpad {i8*, i32} personality i32 (...)* @__gxx_personality_v0 311 catch i8* null 312 resume { i8*, i32 } %exn 313 314_ZNSt11logic_errorC2ERKSs.exit: ; preds = %entry 315 ret void 316} 317 318define void @_ZNK10__cxxabiv120__si_class_type_info20__do_find_public_srcEiPKvPKNS_17__class_type_infoES2_() { 319entry: 320 ret void 321} 322 323define fastcc void @_ZNSbIwSt11char_traitsIwESaIwEE16_S_construct_auxIPKwEEPwT_S7_RKS1_12__false_type() { 324entry: 325 ret void 326} 327 328define void @_ZTv0_n12_NSt13basic_fstreamIwSt11char_traitsIwEED1Ev() { 329entry: 330 ret void 331} 332 333define void @_ZNSt13basic_fstreamIcSt11char_traitsIcEED1Ev() { 334entry: 335 unreachable 336} 337 338define fastcc void @_ZNSt5ctypeIcEC1EPKtbj() { 339entry: 340 ret void 341} 342 343declare i32 @__gxx_personality_v0(...) 344