Changeset f6cc2096
- Timestamp:
- Aug 11, 2017, 4:47:05 PM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- bd46af4
- Parents:
- c3b96677 (diff), 70284830 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src
- Files:
-
- 7 added
- 1 deleted
- 1 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
src/ControlStruct/MLEMutator.cc
rc3b96677 rf6cc2096 154 154 return switchStmt; 155 155 } 156 157 void addUnused( Statement * stmt, const Label & originalTarget ) { 158 // break/continue without a label doesn't need unused attribute 159 if ( originalTarget == "" ) return; 160 // add unused attribute to the originalTarget of a labelled break/continue 161 for ( Label & l : stmt->get_labels() ) { 162 // find the label to add unused attribute to 163 if ( l == originalTarget ) { 164 for ( Attribute * attr : l.get_attributes() ) { 165 // ensure attribute isn't added twice 166 if ( attr->get_name() == "unused" ) return; 167 } 168 l.get_attributes().push_back( new Attribute( "unused" ) ); 169 return; 170 } 171 } 172 assertf( false, "Could not find label '%s' on statement %s", originalTarget.get_name().c_str(), toString( stmt ).c_str() ); 173 } 174 156 175 157 176 Statement *MLEMutator::mutate( BranchStmt *branchStmt ) throw ( SemanticError ) { … … 204 223 } // switch 205 224 225 // add unused attribute to label to silence warnings 226 addUnused( targetEntry->get_controlStructure(), branchStmt->get_originalTarget() ); 227 206 228 // transform break/continue statements into goto to simplify later handling of branches 207 229 delete branchStmt; -
src/tests/.expect/32/math2.txt
rc3b96677 rf6cc2096 1 fmod:1 1 1 1 1 12 remainder:-1 -1 -13 remquo:7 0.0999999 7 0.1 7 0.09999999999999999994 div:7, 0.2 7, 0.2 7, 0.25 fma:-2 -2 -26 fdim:2 2 27 nan:nan nan nan8 exp:2.71828 2.71828182845905 2.71828182845904524 1.46869+2.28736i 1.46869393991589+2.28735528717884i 1.46869393991588516+2.28735528717884239i9 exp2:2 2 210 expm1:1.71828 1.71828182845905 1.7182818284590452411 pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614628i12 16 25613 912673 256 64 -64 0.015625 -0.015625 18.3791736799526 0.264715-1.1922i14 log:0 0 0 0.346574+0.785398i 0.346573590279973+0.785398163397448i 0.346573590279972655+0.78539816339744831i15 log2:3 3 316 log10:2 2 217 log1p:0.693147 0.693147180559945 0.69314718055994530918 ilogb:0 0 019 logb:3 3 320 sqrt:1 1 1 1.09868+0.45509i 1.09868411346781+0.455089860562227i 1.09868411346780997+0.455089860562227341i21 cbrt:3 3 322 hypot:1.41421 1.4142135623731 1.4142135623730950523 1 sin:0.841471 0.841470984807897 0.841470984807896507 1.29846+0.634964i 1.29845758141598+0.634963914784736i 1.29845758141597729+0.634963914784736108i 24 2 cos:0.540302 0.54030230586814 0.540302305868139717 0.83373-0.988898i 0.833730025131149-0.988897705762865i 0.833730025131149049-0.988897705762865096i … … 27 5 acos:0 0 0 0.904557-1.06128i 0.904556894302381-1.06127506190504i 0.904556894302381364-1.06127506190503565i 28 6 atan:0.785398 0.785398163397448 0.78539816339744831 1.01722+0.402359i 1.01722196789785+0.402359478108525i 1.01722196789785137+0.402359478108525094i 29 atan2:0.785398 0.785398163397448 0.78539816339744831 atan:0.785398 0.785398163397448 0.78539816339744831 sinh:1.1752 1.1752011936438 1.17520119364380146 0.634964+1.29846i 0.634963914784736+1.29845758141598i 0.634963914784736108+1.29845758141597729i 7 atan2:0.785398 0.785398163397448 0.78539816339744831 atan:0.785398 0.785398163397448 0.78539816339744831 8 sinh:1.1752 1.1752011936438 1.17520119364380146 0.634964+1.29846i 0.634963914784736+1.29845758141598i 0.634963914784736108+1.29845758141597729i 30 9 cosh:1.54308 1.54308063481524 1.54308063481524378 0.83373+0.988898i 0.833730025131149+0.988897705762865i 0.833730025131149049+0.988897705762865096i 31 10 tanh:0.761594 0.761594155955765 0.761594155955764888 1.08392+0.271753i 1.08392332733869+0.271752585319512i 1.08392332733869454+0.271752585319511717i … … 38 17 lgamma:1.79176 1 1.79175946922805 1 1.791759469228055 1 39 18 tgamma:6 6 6 40 floor:1 1 141 ceil:2 2 242 trunc:3 3 343 rint:2 2 244 rint:2 2 245 rint:2 2 246 lrint:2 2 247 llrint:2 2 248 nearbyint:4 4 449 round:2 2 250 round:2 2 251 round:2 2 252 lround:2 2 253 llround:2 2 254 copysign:-1 -1 -155 frexp:0.5 3 0.5 3 0.5 356 ldexp:8 8 857 modf:2 0.3 2 0.3 2 0.358 modf:2, 0.3 2, 0.3 2, 0.359 nextafter:2 2 260 nexttoward:2 2 261 scalbn:16 16 1662 scalbln:16 16 16 -
src/tests/.expect/64/math2.txt
rc3b96677 rf6cc2096 1 fmod:1 1 1 1 1 12 remainder:-1 -1 -13 remquo:7 0.0999999 7 0.1 7 0.09999999999999999994 div:7, 0.2 7, 0.2 7, 0.25 fma:-2 -2 -26 fdim:2 2 27 nan:nan nan nan8 exp:2.71828 2.71828182845905 2.71828182845904524 1.46869+2.28736i 1.46869393991589+2.28735528717884i 1.46869393991588516+2.28735528717884239i9 exp2:2 2 210 expm1:1.71828 1.71828182845905 1.7182818284590452411 pow:1 1 1 0.273957+0.583701i 0.273957253830121+0.583700758758615i 0.273957253830121071+0.583700758758614627i12 16 25613 912673 256 64 -64 0.015625 -0.015625 18.3791736799526 0.264715-1.1922i14 log:0 0 0 0.346574+0.785398i 0.346573590279973+0.785398163397448i 0.346573590279972655+0.78539816339744831i15 log2:3 3 316 log10:2 2 217 log1p:0.693147 0.693147180559945 0.69314718055994530918 ilogb:0 0 019 logb:3 3 320 sqrt:1 1 1 1.09868+0.45509i 1.09868411346781+0.455089860562227i 1.09868411346780997+0.455089860562227341i21 cbrt:3 3 322 hypot:1.41421 1.4142135623731 1.4142135623730950523 1 sin:0.841471 0.841470984807897 0.841470984807896507 1.29846+0.634964i 1.29845758141598+0.634963914784736i 1.29845758141597729+0.634963914784736108i 24 2 cos:0.540302 0.54030230586814 0.540302305868139717 0.83373-0.988898i 0.833730025131149-0.988897705762865i 0.833730025131149049-0.988897705762865096i … … 27 5 acos:0 0 0 0.904557-1.06128i 0.904556894302381-1.06127506190504i 0.904556894302381364-1.06127506190503565i 28 6 atan:0.785398 0.785398163397448 0.78539816339744831 1.01722+0.402359i 1.01722196789785+0.402359478108525i 1.01722196789785137+0.402359478108525094i 29 atan2:0.785398 0.785398163397448 0.78539816339744831 atan:0.785398 0.785398163397448 0.78539816339744831 sinh:1.1752 1.1752011936438 1.17520119364380146 0.634964+1.29846i 0.634963914784736+1.29845758141598i 0.634963914784736108+1.29845758141597729i 7 atan2:0.785398 0.785398163397448 0.78539816339744831 atan:0.785398 0.785398163397448 0.78539816339744831 8 sinh:1.1752 1.1752011936438 1.17520119364380146 0.634964+1.29846i 0.634963914784736+1.29845758141598i 0.634963914784736108+1.29845758141597729i 30 9 cosh:1.54308 1.54308063481524 1.54308063481524378 0.83373+0.988898i 0.833730025131149+0.988897705762865i 0.833730025131149049+0.988897705762865096i 31 10 tanh:0.761594 0.761594155955765 0.761594155955764888 1.08392+0.271753i 1.08392332733869+0.271752585319512i 1.08392332733869454+0.271752585319511717i … … 38 17 lgamma:1.79176 1 1.79175946922805 1 1.791759469228055 1 39 18 tgamma:6 6 6 40 floor:1 1 141 ceil:2 2 242 trunc:3 3 343 rint:2 2 244 rint:2 2 245 rint:2 2 246 lrint:2 2 247 llrint:2 2 248 nearbyint:4 4 449 round:2 2 250 round:2 2 251 round:2 2 252 lround:2 2 253 llround:2 2 254 copysign:-1 -1 -155 frexp:0.5 3 0.5 3 0.5 356 ldexp:8 8 857 modf:2 0.3 2 0.3 2 0.358 modf:2, 0.3 2, 0.3 2, 0.359 nextafter:2 2 260 nexttoward:2 2 261 scalbn:16 16 1662 scalbln:16 16 16
Note: See TracChangeset
for help on using the changeset viewer.