return 0;
}
-// { dg-output "default std::handle_contract_violation called: .*.C 11 Base::b .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 12 Base::b .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 13 Base::b .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 26 Child::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 27 Child::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 28 Child::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 37 VChild::b .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 38 VChild::b .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 39 VChild::b .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 49 TChild<Base>::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 50 TChild<Base>::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 51 TChild<Base>::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 67 PubChild::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 68 PubChild::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 69 PubChild::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 79 TPubChild<PubBase>::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 80 TPubChild<PubBase>::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 81 TPubChild<PubBase>::fun .*(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function Base::b at .*.C:11: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function Base::b at .*.C:12: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function Base::b at .*.C:13: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function Child::fun at .*.C:26: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function Child::fun at .*.C:27: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function Child::fun at .*.C:28: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function VChild::b at .*.C:37: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function VChild::b at .*.C:38: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function VChild::b at .*.C:39: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function TChild<Base>::fun at .*.C:49: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function TChild<Base>::fun at .*.C:50: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function TChild<Base>::fun at .*.C:51: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function PubChild::fun at .*.C:67: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function PubChild::fun at .*.C:68: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function PubChild::fun at .*.C:69: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function TPubChild<PubBase>::fun at .*.C:79: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function TPubChild<PubBase>::fun at .*.C:80: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function TPubChild<PubBase>::fun at .*.C:81: .*(\n|\r\n|\r)" }
return fun(x);
}
-// { dg-output "-1: test x>0(\n|\r\n|\r)*" }
+// { dg-output "-1: test x>0(\n|\r\n|\r)" }
return 0;
}
-// { dg-output "default std::handle_contract_violation called: .*main false default default 1.*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*main false default default 1.*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*main false audit default 1.*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*main false default new_role 1.*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*main false default new_role 1.*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*main false audit new_role 1.*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*main false 1.*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*main false default default 1.*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*main false audit default 1.*(\n|\r\n|\r)*" }
-
+// { dg-output {contract violation in function main at .*:14: false(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function main at .*:15: false(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function main at .*:16: false(\n|\r\n|\r)} }
+// { dg-output {\[level:audit, continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function main at .*:17: false(\n|\r\n|\r)} }
+// { dg-output {\[role:new_role, continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function main at .*:18: false(\n|\r\n|\r)} }
+// { dg-output {\[role:new_role, continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function main at .*:19: false(\n|\r\n|\r)} }
+// { dg-output {\[level:audit, role:new_role, continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function main at .*:20: false(\n|\r\n|\r)} }
+// { dg-output {\[level:, role:, continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function main at .*:21: false(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function main at .*:22: false(\n|\r\n|\r)} }
+// { dg-output {\[level:audit, continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function fun at .*:7: r > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
return 0;
}
-// { dg-output "default std::handle_contract_violation called: .*.C 14 ffun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 15 ffun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 38 ftfun<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 39 ftfun<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 46 explicitfn .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 48 explicitfn .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 38 ftfun<double> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 39 ftfun<double> .*(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function ffun at .*.C:14: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ffun at .*.C:15: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ftfun<int> at .*.C:38: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ftfun<int> at .*.C:39: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function explicitfn at .*.C:46: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function explicitfn at .*.C:48: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ftfun<double> at .*.C:38: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ftfun<double> at .*.C:39: .*(\n|\r\n|\r)" }
};
// test0
-// { dg-output "default std::handle_contract_violation called: .*.C 11 S::S .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 11 S::S .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 20 SInline::SInline .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 20 SInline::SInline .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 26 SDelegate0::SDelegate0 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 26 SDelegate0::SDelegate0 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 34 SDelegate1::SDelegate1 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 34 SDelegate1::SDelegate1 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 41 SDelegate2::SDelegate2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 40 SDelegate2::SDelegate2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 40 SDelegate2::SDelegate2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 41 SDelegate2::SDelegate2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 48 SDelegate3::SDelegate3 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 47 SDelegate3::SDelegate3 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 47 SDelegate3::SDelegate3 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 48 SDelegate3::SDelegate3 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 55 S1<int>::S1 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 55 S1<int>::S1 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 55 S1<double>::S1 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 55 S1<double>::S1 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 61 S2::S2<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 61 S2::S2<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 61 S2::S2<double> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 61 S2::S2<double> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 68 S3<int>::S3<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 68 S3<int>::S3<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 68 S3<int>::S3<double> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 68 S3<int>::S3<double> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 68 S3<double>::S3<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 68 S3<double>::S3<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 68 S3<double>::S3<double> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 68 S3<double>::S3<double> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 49 SDelegate3::~SDelegate3 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 49 SDelegate3::~SDelegate3 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 42 SDelegate2::~SDelegate2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 42 SDelegate2::~SDelegate2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 35 SDelegate1::~SDelegate1 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 35 SDelegate1::~SDelegate1 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 28 SDelegate0::~SDelegate0 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 28 SDelegate0::~SDelegate0 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 21 SInline::~SInline .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 21 SInline::~SInline .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 12 S::~S .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 12 S::~S .*(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function S::S at .*.C:11 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S::S at .*.C:11 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SInline::SInline at .*.C:20 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SInline::SInline at .*.C:20 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SDelegate0::SDelegate0 at .*.C:26 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SDelegate0::SDelegate0 at .*.C:26 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SDelegate1::SDelegate1 at .*.C:34 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SDelegate1::SDelegate1 at .*.C:34 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SDelegate2::SDelegate2 at .*.C:41 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SDelegate2::SDelegate2 at .*.C:40 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SDelegate2::SDelegate2 at .*.C:40 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SDelegate2::SDelegate2 at .*.C:41 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SDelegate3::SDelegate3 at .*.C:48 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SDelegate3::SDelegate3 at .*.C:47 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SDelegate3::SDelegate3 at .*.C:47 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SDelegate3::SDelegate3 at .*.C:48 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S1<int>::S1 at .*.C:55 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S1<int>::S1 at .*.C:55 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S1<double>::S1 at .*.C:55 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S1<double>::S1 at .*.C:55 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S2::S2<int> at .*.C:61 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S2::S2<int> at .*.C:61 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S2::S2<double> at .*.C:61 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S2::S2<double> at .*.C:61 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S3<int>::S3<int> at .*.C:68 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S3<int>::S3<int> at .*.C:68 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S3<int>::S3<double> at .*.C:68 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S3<int>::S3<double> at .*.C:68 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S3<double>::S3<int> at .*.C:68 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S3<double>::S3<int> at .*.C:68 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S3<double>::S3<double> at .*.C:68 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S3<double>::S3<double> at .*.C:68 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SDelegate3::~SDelegate3 at .*.C:49 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SDelegate3::~SDelegate3 at .*.C:49 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SDelegate2::~SDelegate2 at .*.C:42 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SDelegate2::~SDelegate2 at .*.C:42 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SDelegate1::~SDelegate1 at .*.C:35 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SDelegate1::~SDelegate1 at .*.C:35 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SDelegate0::~SDelegate0 at .*.C:28 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SDelegate0::~SDelegate0 at .*.C:28 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SInline::~SInline at .*.C:21 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function SInline::~SInline at .*.C:21 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S::~S at .*.C:12 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S::~S at .*.C:12 .*(\n|\r\n|\r)" }
// test1
-// { dg-output "default std::handle_contract_violation called: .*.C 73 G0::G0 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 80 G1::G1 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 81 G1::~G1 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 74 G0::~G0 .*(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function G0::G0 at .*.C:73 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function G1::G1 at .*.C:80 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function G1::~G1 at .*.C:81 .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function G0::~G0 at .*.C:74 .*(\n|\r\n|\r)" }
return 0;
}
-// { dg-output "default std::handle_contract_violation called: .*.C 5 g0 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 5 g0 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 12 g1 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 23 g3 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 30 g4 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 37 g5 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 46 g6<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 46 g6<double> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 55 g7<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 55 g7<double> .*(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function g0 at .*.C:5: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function g0 at .*.C:5: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function g1 at .*.C:12: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function g3 at .*.C:23: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function g4 at .*.C:30: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function g5 at .*.C:37: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function g6<int> at .*.C:46: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function g6<double> at .*.C:46: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function g7<int> at .*.C:55: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function g7<double> at .*.C:55: .*(\n|\r\n|\r)" }
return 0;
}
-// { dg-output "default std::handle_contract_violation called: .*.C 6 fn0 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 19 fn2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 9 X::fns0 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 10 X::fns1 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 21 X::fns2 .*(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function fn0 at .*.C:6: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function fn2 at .*.C:19: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function X::fns0 at .*.C:9: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function X::fns1 at .*.C:10: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function X::fns2 at .*.C:21: .*(\n|\r\n|\r)" }
]];
}
-// { dg-output "default std::handle_contract_violation called: .*.C 8 main x < 10 && y > 123.*(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function main at .*.C:8: x < 10 && y > 123.*(\n|\r\n|\r)" }
// { dg-do run }
// { dg-options "-std=c++2a -fcontracts" }
// { dg-shouldfail "assert violation" }
-// { dg-output "default std::handle_contract_violation called" }
+// { dg-output "contract violation in function f1" }
int f1(int n)
[[post r: r > n]]
return 0;
}
-// { dg-output "=================================(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 7 M::f<int> .*(\n|\r\n|\r)*" }
-// { dg-output "m.f<int>.-10.: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 7 M::f<double> .*(\n|\r\n|\r)*" }
-// { dg-output "m.f<double>.-11.5.: 11(\n|\r\n|\r)*" }
-// { dg-output "m.f<int>.10.: -10(\n|\r\n|\r)*" }
-// { dg-output "m.f<double>.11.5.: -11(\n|\r\n|\r)*" }
-// { dg-output "=================================(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 10 M::g<int> .*(\n|\r\n|\r)*" }
-// { dg-output "m.g<int>.-10.: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 10 M::g<double> .*(\n|\r\n|\r)*" }
-// { dg-output "m.g<double>.-11.5.: 11(\n|\r\n|\r)*" }
-// { dg-output "m.g<int>.10.: -10(\n|\r\n|\r)*" }
-// { dg-output "m.g<double>.11.5.: -11(\n|\r\n|\r)*" }
-// { dg-output "=================================(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 16 M::f_arg<int> .*(\n|\r\n|\r)*" }
-// { dg-output "m.f_arg.-10.: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 16 M::f_arg<double> .*(\n|\r\n|\r)*" }
-// { dg-output "m.f_arg.-11.5.: 11(\n|\r\n|\r)*" }
-// { dg-output "m.f_arg.10.: -10(\n|\r\n|\r)*" }
-// { dg-output "m.f_arg.11.5.: -11(\n|\r\n|\r)*" }
-// { dg-output "=================================(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 19 M::g_arg<int> .*(\n|\r\n|\r)*" }
-// { dg-output "m.g_arg.-10.: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 19 M::g_arg<double> .*(\n|\r\n|\r)*" }
-// { dg-output "m.g_arg.-11.5.: 11(\n|\r\n|\r)*" }
-// { dg-output "m.g_arg.10.: -10(\n|\r\n|\r)*" }
-// { dg-output "m.g_arg.11.5.: -11(\n|\r\n|\r)*" }
-// { dg-output "=================================(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 25 M::f_ret<int> .*(\n|\r\n|\r)*" }
-// { dg-output "m.f_ret<int>.-10.: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 25 M::f_ret<double> .*(\n|\r\n|\r)*" }
-// { dg-output "m.f_ret<double>.-11.5.: 16.500000(\n|\r\n|\r)*" }
-// { dg-output "m.f_ret<int>.10.: -10(\n|\r\n|\r)*" }
-// { dg-output "m.f_ret<double>.11.5.: -16.500000(\n|\r\n|\r)*" }
-// { dg-output "=================================(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 28 M::g_ret<int> .*(\n|\r\n|\r)*" }
-// { dg-output "m.g_ret<int>.-10.: 15(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 28 M::g_ret<double> .*(\n|\r\n|\r)*" }
-// { dg-output "m.g_ret<double>.-11.5.: 16.500000(\n|\r\n|\r)*" }
-// { dg-output "m.g_ret<int>.10.: -15(\n|\r\n|\r)*" }
-// { dg-output "m.g_ret<double>.11.5.: -16.500000(\n|\r\n|\r)*" }
-// { dg-output "=================================(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 59 S<int>::g<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 59 S<int>::g<double> .*(\n|\r\n|\r)*" }
-// { dg-output "=================================(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 59 S<double>::g<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 59 S<double>::g<double> .*(\n|\r\n|\r)*" }
+// { dg-output {=================================(\n|\r\n|\r)} }
+// { dg-output {contract violation in function M::f<int> at .*:7: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {m.f<int>\(-10\): 10(\n|\r\n|\r)} }
+// { dg-output {contract violation in function M::f<double> at .*:7: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {m.f<double>\(-11.5\): 11(\n|\r\n|\r)} }
+// { dg-output {m.f<int>\(10\): -10(\n|\r\n|\r)} }
+// { dg-output {m.f<double>\(11.5\): -11(\n|\r\n|\r)} }
+// { dg-output {=================================(\n|\r\n|\r)} }
+// { dg-output {contract violation in function M::g<int> at .*:10: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {m.g<int>\(-10\): 10(\n|\r\n|\r)} }
+// { dg-output {contract violation in function M::g<double> at .*:10: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {m.g<double>\(-11.5\): 11(\n|\r\n|\r)} }
+// { dg-output {m.g<int>\(10\): -10(\n|\r\n|\r)} }
+// { dg-output {m.g<double>\(11.5\): -11(\n|\r\n|\r)} }
+// { dg-output {=================================(\n|\r\n|\r)} }
+// { dg-output {contract violation in function M::f_arg<int> at .*:16: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {m.f_arg\(-10\): 10(\n|\r\n|\r)} }
+// { dg-output {contract violation in function M::f_arg<double> at .*:16: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {m.f_arg\(-11.5\): 11(\n|\r\n|\r)} }
+// { dg-output {m.f_arg\(10\): -10(\n|\r\n|\r)} }
+// { dg-output {m.f_arg\(11.5\): -11(\n|\r\n|\r)} }
+// { dg-output {=================================(\n|\r\n|\r)} }
+// { dg-output {contract violation in function M::g_arg<int> at .*:19: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {m.g_arg\(-10\): 10(\n|\r\n|\r)} }
+// { dg-output {contract violation in function M::g_arg<double> at .*:19: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {m.g_arg\(-11.5\): 11(\n|\r\n|\r)} }
+// { dg-output {m.g_arg\(10\): -10(\n|\r\n|\r)} }
+// { dg-output {m.g_arg\(11.5\): -11(\n|\r\n|\r)} }
+// { dg-output {=================================(\n|\r\n|\r)} }
+// { dg-output {contract violation in function M::f_ret<int> at .*:25: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {m.f_ret<int>\(-10\): 10(\n|\r\n|\r)} }
+// { dg-output {contract violation in function M::f_ret<double> at .*:25: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {m.f_ret<double>\(-11.5\): 16.500000(\n|\r\n|\r)} }
+// { dg-output {m.f_ret<int>\(10\): -10(\n|\r\n|\r)} }
+// { dg-output {m.f_ret<double>\(11.5\): -16.500000(\n|\r\n|\r)} }
+// { dg-output {=================================(\n|\r\n|\r)} }
+// { dg-output {contract violation in function M::g_ret<int> at .*:28: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {m.g_ret<int>\(-10\): 15(\n|\r\n|\r)} }
+// { dg-output {contract violation in function M::g_ret<double> at .*:28: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {m.g_ret<double>\(-11.5\): 16.500000(\n|\r\n|\r)} }
+// { dg-output {m.g_ret<int>\(10\): -15(\n|\r\n|\r)} }
+// { dg-output {m.g_ret<double>\(11.5\): -16.500000(\n|\r\n|\r)} }
+// { dg-output {=================================(\n|\r\n|\r)} }
+// { dg-output {contract violation in function S<int>::f<int> at .*:56: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function S<int>::f<double> at .*:56: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {=================================(\n|\r\n|\r)} }
+// { dg-output {contract violation in function S<int>::g<int> at .*:59: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function S<int>::g<double> at .*:59: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {=================================(\n|\r\n|\r)} }
+// { dg-output {contract violation in function S<double>::f<int> at .*:56: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function S<double>::f<double> at .*:56: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {=================================(\n|\r\n|\r)} }
+// { dg-output {contract violation in function S<double>::g<int> at .*:59: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function S<double>::g<double> at .*:59: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
}
}
-// { dg-output "default std::handle_contract_violation called: .*.C 12 nullary::fun .*(\n|\r\n|\r)*" }
-// { dg-output "fun::x: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 18 nullary::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 19 nullary::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "fun2::x: 10 fun2::y: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 146 nullary::funend .*(\n|\r\n|\r)*" }
-// { dg-output "funend::x: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 39 nonvoid::vfun .*(\n|\r\n|\r)*" }
-// { dg-output "vfun::x: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 45 nonvoid::fun .*(\n|\r\n|\r)*" }
-// { dg-output "fun::x: 10(\n|\r\n|\r)*" }
-// { dg-output "main::f: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 52 nonvoid::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 53 nonvoid::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "fun2::x: 10 fun2::y: 10.500000(\n|\r\n|\r)*" }
-// { dg-output "main::d: 10.500000(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 155 nonvoid::funend .*(\n|\r\n|\r)*" }
-// { dg-output "funend::x: 10(\n|\r\n|\r)*" }
-// { dg-output "main::s.z: 1(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 74 nonnullary::vfun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 75 nonnullary::vfun .*(\n|\r\n|\r)*" }
-// { dg-output "vfun::x: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 81 nonnullary::fun .*(\n|\r\n|\r)*" }
-// { dg-output "fun::x: 10(\n|\r\n|\r)*" }
-// { dg-output "main::f: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 88 nonnullary::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 89 nonnullary::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 90 nonnullary::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 91 nonnullary::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "fun2::x: 10 fun2::y: 10.500000(\n|\r\n|\r)*" }
-// { dg-output "main::d: 10.500000(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 167 nonnullary::funend .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 168 nonnullary::funend .*(\n|\r\n|\r)*" }
-// { dg-output "funend::x: 10(\n|\r\n|\r)*" }
-// { dg-output "main::s.z: 1(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function nullary::fun at .*.C:12: .*(\n|\r\n|\r)" }
+// { dg-output "fun::x: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nullary::fun2 at .*.C:18: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nullary::fun2 at .*.C:19: .*(\n|\r\n|\r)" }
+// { dg-output "fun2::x: 10 fun2::y: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nullary::funend at .*.C:146: .*(\n|\r\n|\r)" }
+// { dg-output "funend::x: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nonvoid::vfun at .*.C:39: .*(\n|\r\n|\r)" }
+// { dg-output "vfun::x: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nonvoid::fun at .*.C:45: .*(\n|\r\n|\r)" }
+// { dg-output "fun::x: 10(\n|\r\n|\r)" }
+// { dg-output "main::f: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nonvoid::fun2 at .*.C:52: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nonvoid::fun2 at .*.C:53: .*(\n|\r\n|\r)" }
+// { dg-output "fun2::x: 10 fun2::y: 10.500000(\n|\r\n|\r)" }
+// { dg-output "main::d: 10.500000(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nonvoid::funend at .*.C:155: .*(\n|\r\n|\r)" }
+// { dg-output "funend::x: 10(\n|\r\n|\r)" }
+// { dg-output "main::s.z: 1(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nonnullary::vfun at .*.C:74: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nonnullary::vfun at .*.C:75: .*(\n|\r\n|\r)" }
+// { dg-output "vfun::x: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nonnullary::fun at .*.C:81: .*(\n|\r\n|\r)" }
+// { dg-output "fun::x: 10(\n|\r\n|\r)" }
+// { dg-output "main::f: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nonnullary::fun2 at .*.C:88: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nonnullary::fun2 at .*.C:89: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nonnullary::fun2 at .*.C:90: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nonnullary::fun2 at .*.C:91: .*(\n|\r\n|\r)" }
+// { dg-output "fun2::x: 10 fun2::y: 10.500000(\n|\r\n|\r)" }
+// { dg-output "main::d: 10.500000(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nonnullary::funend at .*.C:167: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nonnullary::funend at .*.C:168: .*(\n|\r\n|\r)" }
+// { dg-output "funend::x: 10(\n|\r\n|\r)" }
+// { dg-output "main::s.z: 1(\n|\r\n|\r)" }
return 0;
}
-// { dg-output "default std::handle_contract_violation called: .*.C 6 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 9 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 7 .*(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function f at .*\\.C:6: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function f at .*\\.C:9: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function f at .*\\.C:7: .*(\n|\r\n|\r)" }
return s;
}
-// { dg-output "default std::handle_contract_violation called: .*.C 37 member::T1::vfun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 38 member::T1::vfun .*(\n|\r\n|\r)*" }
-// { dg-output "vfun::x: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 45 member::T1::fun .*(\n|\r\n|\r)*" }
-// { dg-output "fun::x: 10(\n|\r\n|\r)*" }
-// { dg-output "main::f: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 52 member::T1::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 53 member::T1::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 54 member::T1::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 55 member::T1::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "fun2::x: 10 fun2::y: 10.500000(\n|\r\n|\r)*" }
-// { dg-output "main::d: 10.500000(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 397 member::T1::funend .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 398 member::T1::funend .*(\n|\r\n|\r)*" }
-// { dg-output "funend::x: 10(\n|\r\n|\r)*" }
-// { dg-output "main::s.z: 1(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 85 special::T1::T1 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 86 special::T1::T1 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 99 special::T1::operator- .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 100 special::T1::operator- .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 92 special::T1::operator. .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 93 special::T1::operator. .*(\n|\r\n|\r)*" }
-// { dg-output "==========(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 113 special::T2::T2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 114 special::T2::T2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 127 special::T2::operator- .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 128 special::T2::operator- .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 120 special::T2::operator. .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 121 special::T2::operator. .*(\n|\r\n|\r)*" }
-// { dg-output "==========(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 144 special::TC::TC .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 145 special::TC::TC .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 85 special::T1::T1 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 86 special::T1::T1 .*(\n|\r\n|\r)*" }
-// { dg-output "==========(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 156 special::TC::TC .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 144 special::TC::TC .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 145 special::TC::TC .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 85 special::T1::T1 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 86 special::T1::T1 .*(\n|\r\n|\r)*" }
-// { dg-output "==========(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 151 special::TC::~TC .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 106 special::T1::~T1 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 151 special::TC::~TC .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 106 special::T1::~T1 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 134 special::T2::~T2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 106 special::T1::~T1 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 196 virt::T1::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 197 virt::T1::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 198 virt::T1::fun .*(\n|\r\n|\r)*" }
-// { dg-output "T1::fun::m: -10, T1::fun::n: -20, T1::v: -10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 196 virt::T1::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 197 virt::T1::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 198 virt::T1::fun .*(\n|\r\n|\r)*" }
-// { dg-output "T1::fun::m: -10, T1::fun::n: -20, T1::v: -10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 211 virt::T3::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 212 virt::T3::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 213 virt::T3::fun .*(\n|\r\n|\r)*" }
-// { dg-output "T3::fun::m: -10, T3::fun::n: -20, T3::v: -10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 247 virt::T3b::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 248 virt::T3b::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 249 virt::T3b::fun .*(\n|\r\n|\r)*" }
-// { dg-output "T3b::fun::m: -10, T3b::fun::n: -20, T3b::v: -10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 288 virt::T3c::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 289 virt::T3c::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 290 virt::T3c::fun .*(\n|\r\n|\r)*" }
-// { dg-output "T3c::fun::m: -10, T3c::fun::n: -20, T3c::v: -10(\n|\r\n|\r)*" }
-// { dg-output "=================(\n|\r\n|\r)*" }
-// { dg-output "T1:(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 196 virt::T1::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 197 virt::T1::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 198 virt::T1::fun .*(\n|\r\n|\r)*" }
-// { dg-output "T1::fun::m: -1, T1::fun::n: -2, T1::v: -10(\n|\r\n|\r)*" }
-// { dg-output "=================(\n|\r\n|\r)*" }
-// { dg-output "T2:(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 196 virt::T1::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 197 virt::T1::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 198 virt::T1::fun .*(\n|\r\n|\r)*" }
-// { dg-output "T1::fun::m: -1, T1::fun::n: -2, T1::v: -10(\n|\r\n|\r)*" }
-// { dg-output "=================(\n|\r\n|\r)*" }
-// { dg-output "T3:(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 211 virt::T3::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 212 virt::T3::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 213 virt::T3::fun .*(\n|\r\n|\r)*" }
-// { dg-output "T3::fun::m: -1, T3::fun::n: -2, T3::v: -10(\n|\r\n|\r)*" }
-// { dg-output "=================(\n|\r\n|\r)*" }
-// { dg-output "T3b:(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 247 virt::T3b::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 248 virt::T3b::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 249 virt::T3b::fun .*(\n|\r\n|\r)*" }
-// { dg-output "T3b::fun::m: -1, T3b::fun::n: -2, T3b::v: -10(\n|\r\n|\r)*" }
-// { dg-output "=================(\n|\r\n|\r)*" }
-// { dg-output "T3c:(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 288 virt::T3c::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 289 virt::T3c::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 290 virt::T3c::fun .*(\n|\r\n|\r)*" }
-// { dg-output "T3c::fun::m: -1, T3c::fun::n: -2, T3c::v: -10(\n|\r\n|\r)*" }
-// { dg-output "=============(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 256 virt::T3b::p .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 257 virt::T3b::p .*(\n|\r\n|\r)*" }
-// { dg-output "T3b::p: a: -3, v: -10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 264 virt::T3b::u .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 265 virt::T3b::u .*(\n|\r\n|\r)*" }
-// { dg-output "T3b::u: a: -3, z: -10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 272 virt::T3b::n .*(\n|\r\n|\r)*" }
-// { dg-output "T3b::n: a: -3(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 279 virt::T3b::Sn .*(\n|\r\n|\r)*" }
-// { dg-output "T3b::Sn: a: -3(\n|\r\n|\r)*" }
-// { dg-output "=============(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 297 virt::T3c::p .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 298 virt::T3c::p .*(\n|\r\n|\r)*" }
-// { dg-output "T3c::p: a: -3, v: -10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 305 virt::T3c::u .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 306 virt::T3c::u .*(\n|\r\n|\r)*" }
-// { dg-output "T3c::u: a: -3, z: -10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 313 virt::T3c::n .*(\n|\r\n|\r)*" }
-// { dg-output "T3c::n: a: -3(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 320 virt::T3c::Sn .*(\n|\r\n|\r)*" }
-// { dg-output "T3c::Sn: a: -3(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function member::T1::vfun at .*.C:37: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function member::T1::vfun at .*.C:38: .*(\n|\r\n|\r)" }
+// { dg-output "vfun::x: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function member::T1::fun at .*.C:45: .*(\n|\r\n|\r)" }
+// { dg-output "fun::x: 10(\n|\r\n|\r)" }
+// { dg-output "main::f: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function member::T1::fun2 at .*.C:52: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function member::T1::fun2 at .*.C:53: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function member::T1::fun2 at .*.C:54: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function member::T1::fun2 at .*.C:55: .*(\n|\r\n|\r)" }
+// { dg-output "fun2::x: 10 fun2::y: 10.500000(\n|\r\n|\r)" }
+// { dg-output "main::d: 10.500000(\n|\r\n|\r)" }
+// { dg-output "contract violation in function member::T1::funend at .*.C:397: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function member::T1::funend at .*.C:398: .*(\n|\r\n|\r)" }
+// { dg-output "funend::x: 10(\n|\r\n|\r)" }
+// { dg-output "main::s.z: 1(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::T1::T1 at .*.C:85: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::T1::T1 at .*.C:86: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::T1::operator- at .*.C:99: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::T1::operator- at .*.C:100: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::T1::operator. at .*.C:92: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::T1::operator. at .*.C:93: .*(\n|\r\n|\r)" }
+// { dg-output "==========(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::T2::T2 at .*.C:113: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::T2::T2 at .*.C:114: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::T2::operator- at .*.C:127: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::T2::operator- at .*.C:128: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::T2::operator. at .*.C:120: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::T2::operator. at .*.C:121: .*(\n|\r\n|\r)" }
+// { dg-output "==========(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::TC::TC at .*.C:144: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::TC::TC at .*.C:145: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::T1::T1 at .*.C:85: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::T1::T1 at .*.C:86: .*(\n|\r\n|\r)" }
+// { dg-output "==========(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::TC::TC at .*.C:156: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::TC::TC at .*.C:144: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::TC::TC at .*.C:145: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::T1::T1 at .*.C:85: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::T1::T1 at .*.C:86: .*(\n|\r\n|\r)" }
+// { dg-output "==========(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::TC::~TC at .*.C:151: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::T1::~T1 at .*.C:106: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::TC::~TC at .*.C:151: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::T1::~T1 at .*.C:106: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::T2::~T2 at .*.C:134: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function special::T1::~T1 at .*.C:106: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T1::fun at .*.C:196: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T1::fun at .*.C:197: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T1::fun at .*.C:198: .*(\n|\r\n|\r)" }
+// { dg-output "T1::fun::m: -10, T1::fun::n: -20, T1::v: -10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T1::fun at .*.C:196: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T1::fun at .*.C:197: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T1::fun at .*.C:198: .*(\n|\r\n|\r)" }
+// { dg-output "T1::fun::m: -10, T1::fun::n: -20, T1::v: -10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3::fun at .*.C:211: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3::fun at .*.C:212: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3::fun at .*.C:213: .*(\n|\r\n|\r)" }
+// { dg-output "T3::fun::m: -10, T3::fun::n: -20, T3::v: -10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3b::fun at .*.C:247: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3b::fun at .*.C:248: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3b::fun at .*.C:249: .*(\n|\r\n|\r)" }
+// { dg-output "T3b::fun::m: -10, T3b::fun::n: -20, T3b::v: -10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3c::fun at .*.C:288: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3c::fun at .*.C:289: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3c::fun at .*.C:290: .*(\n|\r\n|\r)" }
+// { dg-output "T3c::fun::m: -10, T3c::fun::n: -20, T3c::v: -10(\n|\r\n|\r)" }
+// { dg-output "=================(\n|\r\n|\r)" }
+// { dg-output "T1:(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T1::fun at .*.C:196: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T1::fun at .*.C:197: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T1::fun at .*.C:198: .*(\n|\r\n|\r)" }
+// { dg-output "T1::fun::m: -1, T1::fun::n: -2, T1::v: -10(\n|\r\n|\r)" }
+// { dg-output "=================(\n|\r\n|\r)" }
+// { dg-output "T2:(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T1::fun at .*.C:196: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T1::fun at .*.C:197: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T1::fun at .*.C:198: .*(\n|\r\n|\r)" }
+// { dg-output "T1::fun::m: -1, T1::fun::n: -2, T1::v: -10(\n|\r\n|\r)" }
+// { dg-output "=================(\n|\r\n|\r)" }
+// { dg-output "T3:(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3::fun at .*.C:211: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3::fun at .*.C:212: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3::fun at .*.C:213: .*(\n|\r\n|\r)" }
+// { dg-output "T3::fun::m: -1, T3::fun::n: -2, T3::v: -10(\n|\r\n|\r)" }
+// { dg-output "=================(\n|\r\n|\r)" }
+// { dg-output "T3b:(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3b::fun at .*.C:247: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3b::fun at .*.C:248: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3b::fun at .*.C:249: .*(\n|\r\n|\r)" }
+// { dg-output "T3b::fun::m: -1, T3b::fun::n: -2, T3b::v: -10(\n|\r\n|\r)" }
+// { dg-output "=================(\n|\r\n|\r)" }
+// { dg-output "T3c:(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3c::fun at .*.C:288: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3c::fun at .*.C:289: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3c::fun at .*.C:290: .*(\n|\r\n|\r)" }
+// { dg-output "T3c::fun::m: -1, T3c::fun::n: -2, T3c::v: -10(\n|\r\n|\r)" }
+// { dg-output "=============(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3b::p at .*.C:256: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3b::p at .*.C:257: .*(\n|\r\n|\r)" }
+// { dg-output "T3b::p: a: -3, v: -10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3b::u at .*.C:264: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3b::u at .*.C:265: .*(\n|\r\n|\r)" }
+// { dg-output "T3b::u: a: -3, z: -10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3b::n at .*.C:272: .*(\n|\r\n|\r)" }
+// { dg-output "T3b::n: a: -3(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3b::Sn at .*.C:279: .*(\n|\r\n|\r)" }
+// { dg-output "T3b::Sn: a: -3(\n|\r\n|\r)" }
+// { dg-output "=============(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3c::p at .*.C:297: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3c::p at .*.C:298: .*(\n|\r\n|\r)" }
+// { dg-output "T3c::p: a: -3, v: -10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3c::u at .*.C:305: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3c::u at .*.C:306: .*(\n|\r\n|\r)" }
+// { dg-output "T3c::u: a: -3, z: -10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3c::n at .*.C:313: .*(\n|\r\n|\r)" }
+// { dg-output "T3c::n: a: -3(\n|\r\n|\r)" }
+// { dg-output "contract violation in function virt::T3c::Sn at .*.C:320: .*(\n|\r\n|\r)" }
+// { dg-output "T3c::Sn: a: -3(\n|\r\n|\r)" }
return 0;
}
-// { dg-output "default std::handle_contract_violation called: .*.C 7 Base::f .*(\n|\r\n|\r)*" }
-// { dg-output "Base: 0(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 7 Base::f .*(\n|\r\n|\r)*" }
-// { dg-output "Child0: 0(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 7 Child1::f .*(\n|\r\n|\r)*" }
-// { dg-output "Child1: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 7 Child2::f .*(\n|\r\n|\r)*" }
-// { dg-output "Child2: 20(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 7 Child3::f .*(\n|\r\n|\r)*" }
-// { dg-output "Child3: 30(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 7 Child4::f .*(\n|\r\n|\r)*" }
-// { dg-output "Child4: 40(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function Base::f at .*.C:7: .*(\n|\r\n|\r)" }
+// { dg-output "Base: 0(\n|\r\n|\r)" }
+// { dg-output "contract violation in function Base::f at .*.C:7: .*(\n|\r\n|\r)" }
+// { dg-output "Child0: 0(\n|\r\n|\r)" }
+// { dg-output "contract violation in function Child1::f at .*.C:7: .*(\n|\r\n|\r)" }
+// { dg-output "Child1: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function Child2::f at .*.C:7: .*(\n|\r\n|\r)" }
+// { dg-output "Child2: 20(\n|\r\n|\r)" }
+// { dg-output "contract violation in function Child3::f at .*.C:7: .*(\n|\r\n|\r)" }
+// { dg-output "Child3: 30(\n|\r\n|\r)" }
+// { dg-output "contract violation in function Child4::f at .*.C:7: .*(\n|\r\n|\r)" }
+// { dg-output "Child4: 40(\n|\r\n|\r)" }
return 0;
}
-// { dg-output "default std::handle_contract_violation called: .*.C 8 body<int> .*(\n|\r\n|\r)*" }
-// { dg-output "-2(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 8 body<double> .*(\n|\r\n|\r)*" }
-// { dg-output "-5(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 16 none<int> .*(\n|\r\n|\r)*" }
-// { dg-output "1(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 16 none<double> .*(\n|\r\n|\r)*" }
-// { dg-output "2(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 23 arg0<int> .*(\n|\r\n|\r)*" }
-// { dg-output "-9(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 23 arg0<double> .*(\n|\r\n|\r)*" }
-// { dg-output "-7(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 30 arg1<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 31 arg1<int> .*(\n|\r\n|\r)*" }
-// { dg-output "-3(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 30 arg1<double> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 31 arg1<double> .*(\n|\r\n|\r)*" }
-// { dg-output "-11(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 38 ret<int> .*(\n|\r\n|\r)*" }
-// { dg-output "3(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 38 ret<double> .*(\n|\r\n|\r)*" }
-// { dg-output "4(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function body<int> at .*.C:8: .*(\n|\r\n|\r)" }
+// { dg-output "-2(\n|\r\n|\r)" }
+// { dg-output "contract violation in function body<double> at .*.C:8: .*(\n|\r\n|\r)" }
+// { dg-output "-5(\n|\r\n|\r)" }
+// { dg-output "contract violation in function none<int> at .*.C:16: .*(\n|\r\n|\r)" }
+// { dg-output "1(\n|\r\n|\r)" }
+// { dg-output "contract violation in function none<double> at .*.C:16: .*(\n|\r\n|\r)" }
+// { dg-output "2(\n|\r\n|\r)" }
+// { dg-output "contract violation in function arg0<int> at .*.C:23: .*(\n|\r\n|\r)" }
+// { dg-output "-9(\n|\r\n|\r)" }
+// { dg-output "contract violation in function arg0<double> at .*.C:23: .*(\n|\r\n|\r)" }
+// { dg-output "-7(\n|\r\n|\r)" }
+// { dg-output "contract violation in function arg1<int> at .*.C:30: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function arg1<int> at .*.C:31: .*(\n|\r\n|\r)" }
+// { dg-output "-3(\n|\r\n|\r)" }
+// { dg-output "contract violation in function arg1<double> at .*.C:30: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function arg1<double> at .*.C:31: .*(\n|\r\n|\r)" }
+// { dg-output "-11(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ret<int> at .*.C:38: .*(\n|\r\n|\r)" }
+// { dg-output "3(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ret<double> at .*.C:38: .*(\n|\r\n|\r)" }
+// { dg-output "4(\n|\r\n|\r)" }
return 0;
}
-// { dg-output "default std::handle_contract_violation called: .*.C 13 ns0::f<int> .*(\n|\r\n|\r)*" }
-// { dg-output "1(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 28 ns0::ns1::f<int> .*(\n|\r\n|\r)*" }
-// { dg-output "2(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 46 ns0::ns1::f2<int> .*(\n|\r\n|\r)*" }
-// { dg-output "3(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 53 ns0::ns1::ns2::f<int> .*(\n|\r\n|\r)*" }
-// { dg-output "4(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 76 ns0::S<int>::f .*(\n|\r\n|\r)*" }
-// { dg-output "5(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 82 ns0::ns1::S2<int>::f .*(\n|\r\n|\r)*" }
-// { dg-output "6(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 13 ns0::f<double> .*(\n|\r\n|\r)*" }
-// { dg-output "7(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 28 ns0::ns1::f<double> .*(\n|\r\n|\r)*" }
-// { dg-output "8(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 46 ns0::ns1::f2<double> .*(\n|\r\n|\r)*" }
-// { dg-output "9(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 53 ns0::ns1::ns2::f<double> .*(\n|\r\n|\r)*" }
-// { dg-output "10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 76 ns0::S<double>::f .*(\n|\r\n|\r)*" }
-// { dg-output "11(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 82 ns0::ns1::S2<double>::f .*(\n|\r\n|\r)*" }
-// { dg-output "12(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function ns0::f<int> at .*.C:13: .*(\n|\r\n|\r)" }
+// { dg-output "1(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ns0::ns1::f<int> at .*.C:28: .*(\n|\r\n|\r)" }
+// { dg-output "2(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ns0::ns1::f2<int> at .*.C:46: .*(\n|\r\n|\r)" }
+// { dg-output "3(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ns0::ns1::ns2::f<int> at .*.C:53: .*(\n|\r\n|\r)" }
+// { dg-output "4(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ns0::S<int>::f at .*.C:76: .*(\n|\r\n|\r)" }
+// { dg-output "5(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ns0::ns1::S2<int>::f at .*.C:82: .*(\n|\r\n|\r)" }
+// { dg-output "6(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ns0::f<double> at .*.C:13: .*(\n|\r\n|\r)" }
+// { dg-output "7(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ns0::ns1::f<double> at .*.C:28: .*(\n|\r\n|\r)" }
+// { dg-output "8(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ns0::ns1::f2<double> at .*.C:46: .*(\n|\r\n|\r)" }
+// { dg-output "9(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ns0::ns1::ns2::f<double> at .*.C:53: .*(\n|\r\n|\r)" }
+// { dg-output "10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ns0::S<double>::f at .*.C:76: .*(\n|\r\n|\r)" }
+// { dg-output "11(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ns0::ns1::S2<double>::f at .*.C:82: .*(\n|\r\n|\r)" }
+// { dg-output "12(\n|\r\n|\r)" }
return 0;
}
-// { dg-output "default std::handle_contract_violation called: .*.C 14 S<int>::f .*(\n|\r\n|\r)*" }
-// { dg-output "s_int.f.-10.: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 10 S<int>::g .*(\n|\r\n|\r)*" }
-// { dg-output "s_int.g.-10.: 10(\n|\r\n|\r)*" }
-// { dg-output "s_int.f.10.: -10(\n|\r\n|\r)*" }
-// { dg-output "s_int.g.10.: -10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 14 S<double>::f .*(\n|\r\n|\r)*" }
-// { dg-output "s_double.f.-10.5.: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 10 S<double>::g .*(\n|\r\n|\r)*" }
-// { dg-output "s_double.g.-10.5.: 10(\n|\r\n|\r)*" }
-// { dg-output "s_double.f.10.5.: -10(\n|\r\n|\r)*" }
-// { dg-output "s_double.g.10.5.: -10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 33 S_arg<int>::f .*(\n|\r\n|\r)*" }
-// { dg-output "s_arg_int.f.-10.: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 29 S_arg<int>::g .*(\n|\r\n|\r)*" }
-// { dg-output "s_arg_int.g.-10.: 10(\n|\r\n|\r)*" }
-// { dg-output "s_arg_int.f.10.: -10(\n|\r\n|\r)*" }
-// { dg-output "s_arg_int.g.10.: -10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 33 S_arg<double>::f .*(\n|\r\n|\r)*" }
-// { dg-output "s_arg_double.f.-10.: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 29 S_arg<double>::g .*(\n|\r\n|\r)*" }
-// { dg-output "s_arg_double.g.-10.: 10(\n|\r\n|\r)*" }
-// { dg-output "s_arg_double.f.10.: -10(\n|\r\n|\r)*" }
-// { dg-output "s_arg_double.g.10.: -10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 52 S_ret<int>::f .*(\n|\r\n|\r)*" }
-// { dg-output "s_ret_int.f.-10.: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 48 S_ret<int>::g .*(\n|\r\n|\r)*" }
-// { dg-output "s_ret_int.g.-10.: 10(\n|\r\n|\r)*" }
-// { dg-output "s_ret_int.f.10.: -10(\n|\r\n|\r)*" }
-// { dg-output "s_ret_int.g.10.: -10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 52 S_ret<double>::f .*(\n|\r\n|\r)*" }
-// { dg-output "s_ret_double.f.-10.: 10.000000(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 48 S_ret<double>::g .*(\n|\r\n|\r)*" }
-// { dg-output "s_ret_double.g.-10.: 10.000000(\n|\r\n|\r)*" }
-// { dg-output "s_ret_double.f.10.: -10.000000(\n|\r\n|\r)*" }
-// { dg-output "s_ret_double.g.10.: -10.000000(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function S<int>::f at .*.C:14: .*(\n|\r\n|\r)" }
+// { dg-output "s_int.f.-10.: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S<int>::g at .*.C:10: .*(\n|\r\n|\r)" }
+// { dg-output "s_int.g.-10.: 10(\n|\r\n|\r)" }
+// { dg-output "s_int.f.10.: -10(\n|\r\n|\r)" }
+// { dg-output "s_int.g.10.: -10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S<double>::f at .*.C:14: .*(\n|\r\n|\r)" }
+// { dg-output "s_double.f.-10.5.: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S<double>::g at .*.C:10: .*(\n|\r\n|\r)" }
+// { dg-output "s_double.g.-10.5.: 10(\n|\r\n|\r)" }
+// { dg-output "s_double.f.10.5.: -10(\n|\r\n|\r)" }
+// { dg-output "s_double.g.10.5.: -10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S_arg<int>::f at .*.C:33: .*(\n|\r\n|\r)" }
+// { dg-output "s_arg_int.f.-10.: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S_arg<int>::g at .*.C:29: .*(\n|\r\n|\r)" }
+// { dg-output "s_arg_int.g.-10.: 10(\n|\r\n|\r)" }
+// { dg-output "s_arg_int.f.10.: -10(\n|\r\n|\r)" }
+// { dg-output "s_arg_int.g.10.: -10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S_arg<double>::f at .*.C:33: .*(\n|\r\n|\r)" }
+// { dg-output "s_arg_double.f.-10.: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S_arg<double>::g at .*.C:29: .*(\n|\r\n|\r)" }
+// { dg-output "s_arg_double.g.-10.: 10(\n|\r\n|\r)" }
+// { dg-output "s_arg_double.f.10.: -10(\n|\r\n|\r)" }
+// { dg-output "s_arg_double.g.10.: -10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S_ret<int>::f at .*.C:52: .*(\n|\r\n|\r)" }
+// { dg-output "s_ret_int.f.-10.: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S_ret<int>::g at .*.C:48: .*(\n|\r\n|\r)" }
+// { dg-output "s_ret_int.g.-10.: 10(\n|\r\n|\r)" }
+// { dg-output "s_ret_int.f.10.: -10(\n|\r\n|\r)" }
+// { dg-output "s_ret_int.g.10.: -10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S_ret<double>::f at .*.C:52: .*(\n|\r\n|\r)" }
+// { dg-output "s_ret_double.f.-10.: 10.000000(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S_ret<double>::g at .*.C:48: .*(\n|\r\n|\r)" }
+// { dg-output "s_ret_double.g.-10.: 10.000000(\n|\r\n|\r)" }
+// { dg-output "s_ret_double.f.10.: -10.000000(\n|\r\n|\r)" }
+// { dg-output "s_ret_double.g.10.: -10.000000(\n|\r\n|\r)" }
}
}
-// { dg-output "default std::handle_contract_violation called: .*.C 25 defining::T1::vfun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 26 defining::T1::vfun .*(\n|\r\n|\r)*" }
-// { dg-output "vfun::x: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 32 defining::T1::fun .*(\n|\r\n|\r)*" }
-// { dg-output "fun::x: 10(\n|\r\n|\r)*" }
-// { dg-output "main::f: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 39 defining::T1::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 40 defining::T1::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 41 defining::T1::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 42 defining::T1::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "fun2::x: 10 fun2::y: 10.500000(\n|\r\n|\r)*" }
-// { dg-output "main::d: 10.500000(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 138 defining::T1::funend .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 139 defining::T1::funend .*(\n|\r\n|\r)*" }
-// { dg-output "funend::x: 10(\n|\r\n|\r)*" }
-// { dg-output "main::s.z: 1(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 68 nondefining::T1::vfun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 69 nondefining::T1::vfun .*(\n|\r\n|\r)*" }
-// { dg-output "vfun::x: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 71 nondefining::T1::fun .*(\n|\r\n|\r)*" }
-// { dg-output "fun::x: 10(\n|\r\n|\r)*" }
-// { dg-output "main::f: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 73 nondefining::T1::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 74 nondefining::T1::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 75 nondefining::T1::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 76 nondefining::T1::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "fun2::x: 10 fun2::y: 10.500000(\n|\r\n|\r)*" }
-// { dg-output "main::d: 10.500000(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 151 nondefining::T1::funend .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 152 nondefining::T1::funend .*(\n|\r\n|\r)*" }
-// { dg-output "funend::x: 10(\n|\r\n|\r)*" }
-// { dg-output "main::s.z: 1(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function defining::T1::vfun at .*.C:25: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function defining::T1::vfun at .*.C:26: .*(\n|\r\n|\r)" }
+// { dg-output "vfun::x: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function defining::T1::fun at .*.C:32: .*(\n|\r\n|\r)" }
+// { dg-output "fun::x: 10(\n|\r\n|\r)" }
+// { dg-output "main::f: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function defining::T1::fun2 at .*.C:39: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function defining::T1::fun2 at .*.C:40: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function defining::T1::fun2 at .*.C:41: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function defining::T1::fun2 at .*.C:42: .*(\n|\r\n|\r)" }
+// { dg-output "fun2::x: 10 fun2::y: 10.500000(\n|\r\n|\r)" }
+// { dg-output "main::d: 10.500000(\n|\r\n|\r)" }
+// { dg-output "contract violation in function defining::T1::funend at .*.C:138: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function defining::T1::funend at .*.C:139: .*(\n|\r\n|\r)" }
+// { dg-output "funend::x: 10(\n|\r\n|\r)" }
+// { dg-output "main::s.z: 1(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nondefining::T1::vfun at .*.C:68: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nondefining::T1::vfun at .*.C:69: .*(\n|\r\n|\r)" }
+// { dg-output "vfun::x: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nondefining::T1::fun at .*.C:71: .*(\n|\r\n|\r)" }
+// { dg-output "fun::x: 10(\n|\r\n|\r)" }
+// { dg-output "main::f: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nondefining::T1::fun2 at .*.C:73: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nondefining::T1::fun2 at .*.C:74: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nondefining::T1::fun2 at .*.C:75: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nondefining::T1::fun2 at .*.C:76: .*(\n|\r\n|\r)" }
+// { dg-output "fun2::x: 10 fun2::y: 10.500000(\n|\r\n|\r)" }
+// { dg-output "main::d: 10.500000(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nondefining::T1::funend at .*.C:151: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nondefining::T1::funend at .*.C:152: .*(\n|\r\n|\r)" }
+// { dg-output "funend::x: 10(\n|\r\n|\r)" }
+// { dg-output "main::s.z: 1(\n|\r\n|\r)" }
printf("=====\n");
}
-// { dg-output "default std::handle_contract_violation called: .*.C 10 f .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 11 f .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 12 f .*(\n|\r\n|\r)*" }
-// { dg-output "f: a: 1, b: 1, c: 1(\n|\r\n|\r)*" }
-// { dg-output "=====(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 10 f .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 11 f .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 12 f .*(\n|\r\n|\r)*" }
-// { dg-output "f: a: 1, b: 1, c: 10(\n|\r\n|\r)*" }
-// { dg-output "=====(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 10 f .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 11 f .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 12 f .*(\n|\r\n|\r)*" }
-// { dg-output "f: a: 1, b: 11, c: 10(\n|\r\n|\r)*" }
-// { dg-output "=====(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 10 f .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 11 f .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 12 f .*(\n|\r\n|\r)*" }
-// { dg-output "f: a: 12, b: 11, c: 10(\n|\r\n|\r)*" }
-// { dg-output "=====(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function f at .*.C:10: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function f at .*.C:11: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function f at .*.C:12: .*(\n|\r\n|\r)" }
+// { dg-output "f: a: 1, b: 1, c: 1(\n|\r\n|\r)" }
+// { dg-output "=====(\n|\r\n|\r)" }
+// { dg-output "contract violation in function f at .*.C:10: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function f at .*.C:11: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function f at .*.C:12: .*(\n|\r\n|\r)" }
+// { dg-output "f: a: 1, b: 1, c: 10(\n|\r\n|\r)" }
+// { dg-output "=====(\n|\r\n|\r)" }
+// { dg-output "contract violation in function f at .*.C:10: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function f at .*.C:11: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function f at .*.C:12: .*(\n|\r\n|\r)" }
+// { dg-output "f: a: 1, b: 11, c: 10(\n|\r\n|\r)" }
+// { dg-output "=====(\n|\r\n|\r)" }
+// { dg-output "contract violation in function f at .*.C:10: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function f at .*.C:11: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function f at .*.C:12: .*(\n|\r\n|\r)" }
+// { dg-output "f: a: 12, b: 11, c: 10(\n|\r\n|\r)" }
+// { dg-output "=====(\n|\r\n|\r)" }
}
}
-// { dg-output "default std::handle_contract_violation called: .*.C 25 defining::T1::vfun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 26 defining::T1::vfun .*(\n|\r\n|\r)*" }
-// { dg-output "vfun::x: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 32 defining::T1::fun .*(\n|\r\n|\r)*" }
-// { dg-output "fun::x: 10(\n|\r\n|\r)*" }
-// { dg-output "main::f: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 39 defining::T1::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 40 defining::T1::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 41 defining::T1::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 42 defining::T1::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "fun2::x: 10 fun2::y: 10.500000(\n|\r\n|\r)*" }
-// { dg-output "main::d: 10.500000(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 138 defining::T1::funend .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 139 defining::T1::funend .*(\n|\r\n|\r)*" }
-// { dg-output "funend::x: 10(\n|\r\n|\r)*" }
-// { dg-output "main::s.z: 1(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 68 nondefining::T1::vfun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 69 nondefining::T1::vfun .*(\n|\r\n|\r)*" }
-// { dg-output "vfun::x: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 71 nondefining::T1::fun .*(\n|\r\n|\r)*" }
-// { dg-output "fun::x: 10(\n|\r\n|\r)*" }
-// { dg-output "main::f: 10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 73 nondefining::T1::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 74 nondefining::T1::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 75 nondefining::T1::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 76 nondefining::T1::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "fun2::x: 10 fun2::y: 10.500000(\n|\r\n|\r)*" }
-// { dg-output "main::d: 10.500000(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 151 nondefining::T1::funend .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 152 nondefining::T1::funend .*(\n|\r\n|\r)*" }
-// { dg-output "funend::x: 10(\n|\r\n|\r)*" }
-// { dg-output "main::s.z: 1(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function defining::T1::vfun at .*.C:25: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function defining::T1::vfun at .*.C:26: .*(\n|\r\n|\r)" }
+// { dg-output "vfun::x: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function defining::T1::fun at .*.C:32: .*(\n|\r\n|\r)" }
+// { dg-output "fun::x: 10(\n|\r\n|\r)" }
+// { dg-output "main::f: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function defining::T1::fun2 at .*.C:39: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function defining::T1::fun2 at .*.C:40: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function defining::T1::fun2 at .*.C:41: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function defining::T1::fun2 at .*.C:42: .*(\n|\r\n|\r)" }
+// { dg-output "fun2::x: 10 fun2::y: 10.500000(\n|\r\n|\r)" }
+// { dg-output "main::d: 10.500000(\n|\r\n|\r)" }
+// { dg-output "contract violation in function defining::T1::funend at .*.C:138: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function defining::T1::funend at .*.C:139: .*(\n|\r\n|\r)" }
+// { dg-output "funend::x: 10(\n|\r\n|\r)" }
+// { dg-output "main::s.z: 1(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nondefining::T1::vfun at .*.C:68: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nondefining::T1::vfun at .*.C:69: .*(\n|\r\n|\r)" }
+// { dg-output "vfun::x: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nondefining::T1::fun at .*.C:71: .*(\n|\r\n|\r)" }
+// { dg-output "fun::x: 10(\n|\r\n|\r)" }
+// { dg-output "main::f: 10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nondefining::T1::fun2 at .*.C:73: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nondefining::T1::fun2 at .*.C:74: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nondefining::T1::fun2 at .*.C:75: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nondefining::T1::fun2 at .*.C:76: .*(\n|\r\n|\r)" }
+// { dg-output "fun2::x: 10 fun2::y: 10.500000(\n|\r\n|\r)" }
+// { dg-output "main::d: 10.500000(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nondefining::T1::funend at .*.C:151: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function nondefining::T1::funend at .*.C:152: .*(\n|\r\n|\r)" }
+// { dg-output "funend::x: 10(\n|\r\n|\r)" }
+// { dg-output "main::s.z: 1(\n|\r\n|\r)" }
return 0;
}
-// { dg-output "default std::handle_contract_violation called: .*.C 9 S::now .*(\n|\r\n|\r)*" }
-// { dg-output "S::now: a: -10, t->pri: -10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 15 now .*(\n|\r\n|\r)*" }
-// { dg-output "now: a: -20, t->pri: -10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 22 later .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 22 later .*(\n|\r\n|\r)*" }
-// { dg-output "later: a: -21, t->pri: -10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 27 both .*(\n|\r\n|\r)*" }
-// { dg-output "both: a: -22, t->pri: -10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 36 hidden .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 36 hidden .*(\n|\r\n|\r)*" }
-// { dg-output "hidden: a: -23, t->pri: -10(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 41 hidden2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 41 hidden2 .*(\n|\r\n|\r)*" }
-// { dg-output "hidden2: a: -24, t->pri: -10(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function S::now at .*.C:9: .*(\n|\r\n|\r)" }
+// { dg-output "S::now: a: -10, t->pri: -10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function now at .*.C:15: .*(\n|\r\n|\r)" }
+// { dg-output "now: a: -20, t->pri: -10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function later at .*.C:22: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function later at .*.C:22: .*(\n|\r\n|\r)" }
+// { dg-output "later: a: -21, t->pri: -10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function both at .*.C:27: .*(\n|\r\n|\r)" }
+// { dg-output "both: a: -22, t->pri: -10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function hidden at .*.C:36: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function hidden at .*.C:36: .*(\n|\r\n|\r)" }
+// { dg-output "hidden: a: -23, t->pri: -10(\n|\r\n|\r)" }
+// { dg-output "contract violation in function hidden2 at .*.C:41: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function hidden2 at .*.C:41: .*(\n|\r\n|\r)" }
+// { dg-output "hidden2: a: -24, t->pri: -10(\n|\r\n|\r)" }
return 0;
}
-// { dg-output "default std::handle_contract_violation called: .*.C 8 body<int> .*(\n|\r\n|\r)*" }
-// { dg-output "-2(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 16 body<double> .*(\n|\r\n|\r)*" }
-// { dg-output "-3(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 24 none<int> .*(\n|\r\n|\r)*" }
-// { dg-output "1(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 31 none<double> .*(\n|\r\n|\r)*" }
-// { dg-output "-101(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 38 arg0<int> .*(\n|\r\n|\r)*" }
-// { dg-output "-9(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 45 arg0<double> .*(\n|\r\n|\r)*" }
-// { dg-output "11(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 52 arg1<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 53 arg1<int> .*(\n|\r\n|\r)*" }
-// { dg-output "-3(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 60 arg1<double> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 61 arg1<double> .*(\n|\r\n|\r)*" }
-// { dg-output "14(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 68 ret<int> .*(\n|\r\n|\r)*" }
-// { dg-output "1(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 75 ret<double> .*(\n|\r\n|\r)*" }
-// { dg-output "3(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 75 ret<double> .*(\n|\r\n|\r)*" }
-// { dg-output "3.300000(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function body<int> at .*.C:8: .*(\n|\r\n|\r)" }
+// { dg-output "-2(\n|\r\n|\r)" }
+// { dg-output "contract violation in function body<double> at .*.C:16: .*(\n|\r\n|\r)" }
+// { dg-output "-3(\n|\r\n|\r)" }
+// { dg-output "contract violation in function none<int> at .*.C:24: .*(\n|\r\n|\r)" }
+// { dg-output "1(\n|\r\n|\r)" }
+// { dg-output "contract violation in function none<double> at .*.C:31: .*(\n|\r\n|\r)" }
+// { dg-output "-101(\n|\r\n|\r)" }
+// { dg-output "contract violation in function arg0<int> at .*.C:38: .*(\n|\r\n|\r)" }
+// { dg-output "-9(\n|\r\n|\r)" }
+// { dg-output "contract violation in function arg0<double> at .*.C:45: .*(\n|\r\n|\r)" }
+// { dg-output "11(\n|\r\n|\r)" }
+// { dg-output "contract violation in function arg1<int> at .*.C:52: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function arg1<int> at .*.C:53: .*(\n|\r\n|\r)" }
+// { dg-output "-3(\n|\r\n|\r)" }
+// { dg-output "contract violation in function arg1<double> at .*.C:60: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function arg1<double> at .*.C:61: .*(\n|\r\n|\r)" }
+// { dg-output "14(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ret<int> at .*.C:68: .*(\n|\r\n|\r)" }
+// { dg-output "1(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ret<double> at .*.C:75: .*(\n|\r\n|\r)" }
+// { dg-output "3(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ret<double> at .*.C:75: .*(\n|\r\n|\r)" }
+// { dg-output "3.300000(\n|\r\n|\r)" }
return 0;
}
-
-// { dg-output "default std::handle_contract_violation called: .*.C 9 body<int> .*(\n|\r\n|\r)*" }
-// { dg-output "-2(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 17 body<double> .*(\n|\r\n|\r)*" }
-// { dg-output "-3(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 25 none<int> .*(\n|\r\n|\r)*" }
-// { dg-output "1(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 32 none<double> .*(\n|\r\n|\r)*" }
-// { dg-output "-101(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 39 arg0<int> .*(\n|\r\n|\r)*" }
-// { dg-output "-9(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 46 arg0<double> .*(\n|\r\n|\r)*" }
-// { dg-output "11(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 53 arg1<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 54 arg1<int> .*(\n|\r\n|\r)*" }
-// { dg-output "-3(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 61 arg1<double> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 62 arg1<double> .*(\n|\r\n|\r)*" }
-// { dg-output "14(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 69 ret<int> .*(\n|\r\n|\r)*" }
-// { dg-output "1(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 76 ret<double> .*(\n|\r\n|\r)*" }
-// { dg-output "3(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 76 ret<double> .*(\n|\r\n|\r)*" }
-// { dg-output "3.300000(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 83 g1<int> .*(\n|\r\n|\r)*" }
-// { dg-output "-1(\n|\r\n|\r)*" }
-// { dg-output "-1(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 97 g2<int> .*(\n|\r\n|\r)*" }
-// { dg-output "-1(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 107 g2<double> .*(\n|\r\n|\r)*" }
-// { dg-output "1(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 114 g2<char> .*(\n|\r\n|\r)*" }
-// { dg-output "100(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 124 G3<double, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 125 G3<double, .*(\n|\r\n|\r)*" }
-// { dg-output "G3 general T S(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 139 G3<int, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 140 G3<int, .*(\n|\r\n|\r)*" }
-// { dg-output "G3 partial int S(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 147 G3<int, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 148 G3<int, .*(\n|\r\n|\r)*" }
-// { dg-output "G3 full int double(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 124 G3<char, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 125 G3<char, .*(\n|\r\n|\r)*" }
-// { dg-output "G3 general T S(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 139 G3<int, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 140 G3<int, .*(\n|\r\n|\r)*" }
-// { dg-output "G3 partial int S(\n|\r\n|\r)*" }
-// { dg-output "G3 full int C(\n|\r\n|\r)*" }
-// { dg-output "G3 full int C(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 173 G4<int, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 174 G4<int, .*(\n|\r\n|\r)*" }
-// { dg-output "G4 general T S(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 175 G4<int, .*(\n|\r\n|\r)*" }
-// { dg-output "G4 full double double(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 206 G4<double, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 207 G4<double, .*(\n|\r\n|\r)*" }
-// { dg-output "G4 full double char(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 208 G4<double, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 187 G4<char, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 188 G4<char, .*(\n|\r\n|\r)*" }
-// { dg-output "G4 partial char S(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 189 G4<char, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 220 G5<int, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 221 G5<int, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 222 G5<int, .*(\n|\r\n|\r)*" }
-// { dg-output "G5 gen T S, f gen R(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 220 G5<int, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 221 G5<int, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 222 G5<int, .*(\n|\r\n|\r)*" }
-// { dg-output "G5 gen T S, f gen R(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 233 G5<char, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 234 G5<char, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 235 G5<char, .*(\n|\r\n|\r)*" }
-// { dg-output "G5 partial char S, f gen R(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 233 G5<char, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 234 G5<char, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 235 G5<char, .*(\n|\r\n|\r)*" }
-// { dg-output "G5 partial char S, f gen R(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 244 G5<double, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 245 G5<double, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 246 G5<double, .*(\n|\r\n|\r)*" }
-// { dg-output "G5 full double double, f gen R(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 244 G5<double, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 245 G5<double, .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 246 G5<double, .*(\n|\r\n|\r)*" }
-// { dg-output "G5 full double double, f gen R(\n|\r\n|\r)*" }
-
+// { dg-output {contract violation in function body<int> at .*:9: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {-2(\n|\r\n|\r)} }
+// { dg-output {contract violation in function body<double> at .*:17: a > 1(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {-3(\n|\r\n|\r)} }
+// { dg-output {contract violation in function none<int> at .*:25: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {1(\n|\r\n|\r)} }
+// { dg-output {contract violation in function none<double> at .*:32: a > 1(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {-101(\n|\r\n|\r)} }
+// { dg-output {contract violation in function arg0<int> at .*:39: t > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {-9(\n|\r\n|\r)} }
+// { dg-output {contract violation in function arg0<double> at .*:46: t > 1(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {11(\n|\r\n|\r)} }
+// { dg-output {contract violation in function arg1<int> at .*:53: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function arg1<int> at .*:54: t > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {-3(\n|\r\n|\r)} }
+// { dg-output {contract violation in function arg1<double> at .*:61: a > 1(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function arg1<double> at .*:62: t > 1(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {14(\n|\r\n|\r)} }
+// { dg-output {contract violation in function ret<int> at .*:69: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {1(\n|\r\n|\r)} }
+// { dg-output {contract violation in function ret<double> at .*:76: a > 1(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {3(\n|\r\n|\r)} }
+// { dg-output {contract violation in function ret<double> at .*:76: a > 1(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {3.300000(\n|\r\n|\r)} }
+// { dg-output {contract violation in function g1<int> at .*:83: t > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {-1(\n|\r\n|\r)} }
+// { dg-output {-1(\n|\r\n|\r)} }
+// { dg-output {contract violation in function g2<int> at .*:97: t > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {-1(\n|\r\n|\r)} }
+// { dg-output {contract violation in function g2<double> at .*:107: t < 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {1(\n|\r\n|\r)} }
+// { dg-output {contract violation in function g2<char> at .*:114: t < 'c'(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {100(\n|\r\n|\r)} }
+// { dg-output {contract violation in function G3<double, double>::f at .*:124: t > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G3<double, double>::f at .*:125: s > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {G3 general T S(\n|\r\n|\r)} }
+// { dg-output {contract violation in function G3<int, int>::f at .*:139: t > 1(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G3<int, int>::f at .*:140: s > 1(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {G3 partial int S(\n|\r\n|\r)} }
+// { dg-output {contract violation in function G3<int, double>::f at .*:147: t > 2(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G3<int, double>::f at .*:148: s > 2(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {G3 full int double(\n|\r\n|\r)} }
+// { dg-output {contract violation in function G3<char, char>::f at .*:124: t > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G3<char, char>::f at .*:125: s > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {G3 general T S(\n|\r\n|\r)} }
+// { dg-output {contract violation in function G3<int, char>::f at .*:139: t > 1(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G3<int, char>::f at .*:140: s > 1(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {G3 partial int S(\n|\r\n|\r)} }
+// { dg-output {G3 full int C(\n|\r\n|\r)} }
+// { dg-output {G3 full int C(\n|\r\n|\r)} }
+// { dg-output {contract violation in function G4<int, int>::G4 at .*:173: t > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G4<int, int>::G4 at .*:174: s > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {G4 general T S(\n|\r\n|\r)} }
+// { dg-output {contract violation in function G4<int, int>::G4 at .*:175: x > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {G4 full double double(\n|\r\n|\r)} }
+// { dg-output {contract violation in function G4<double, char>::G4 at .*:206: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G4<double, char>::G4 at .*:207: b > 'b'(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {G4 full double char(\n|\r\n|\r)} }
+// { dg-output {contract violation in function G4<double, char>::G4 at .*:208: x > 1(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G4<char, int>::G4 at .*:187: t > 'c'(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G4<char, int>::G4 at .*:188: s > 3(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {G4 partial char S(\n|\r\n|\r)} }
+// { dg-output {contract violation in function G4<char, int>::G4 at .*:189: x2 > 3(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<int, int>::f<int> at .*:220: t > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<int, int>::f<int> at .*:221: s > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<int, int>::f<int> at .*:222: r > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {G5 gen T S, f gen R(\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<int, int>::f<double> at .*:220: t > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<int, int>::f<double> at .*:221: s > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<int, int>::f<double> at .*:222: r > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {G5 gen T S, f gen R(\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<char, int>::f<int> at .*:233: x > 'z'(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<char, int>::f<int> at .*:234: y > 1(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<char, int>::f<int> at .*:235: z > 1(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {G5 partial char S, f gen R(\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<char, int>::f<double> at .*:233: x > 'z'(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<char, int>::f<double> at .*:234: y > 1(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<char, int>::f<double> at .*:235: z > 1(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {G5 partial char S, f gen R(\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<double, double>::f<int> at .*:244: a > 2(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<double, double>::f<int> at .*:245: b > 2(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<double, double>::f<int> at .*:246: c > 2(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {G5 full double double, f gen R(\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<double, double>::f<double> at .*:244: a > 2(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<double, double>::f<double> at .*:245: b > 2(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<double, double>::f<double> at .*:246: c > 2(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {G5 full double double, f gen R(\n|\r\n|\r)} }
return 0;
}
-// { dg-output "G5 full double double, f gen R(\n|\r\n|\r)*" }
-// { dg-output "G5 full double double, f gen R(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 10 G5<int, .* t > 0 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 10 G5<int, .* s > 0 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 10 G5<int, .* r > 0 .*(\n|\r\n|\r)*" }
-// { dg-output "G5 gen T S, f gen R(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 10 G5<int, .* t > 0 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 10 G5<int, .* s > 0 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 10 G5<int, .* r > 0 .*(\n|\r\n|\r)*" }
-// { dg-output "G5 gen T S, f gen R(\n|\r\n|\r)*" }
-
+// { dg-output {G5 full double double, f gen R(\n|\r\n|\r)} }
+// { dg-output {G5 full double double, f gen R(\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<int, double>::f<int> at .*:10: t > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<int, double>::f<int> at .*:10: s > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<int, double>::f<int> at .*:10: r > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {G5 gen T S, f gen R(\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<int, double>::f<double> at .*:10: t > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<int, double>::f<double> at .*:10: s > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function G5<int, double>::f<double> at .*:10: r > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {G5 gen T S, f gen R(\n|\r\n|\r)} }
return 0;
}
-// { dg-output "default std::handle_contract_violation called: .*.C 47 main .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 48 main .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 49 main .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 100 main .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 13 tns::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 33 tns::fun2 .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 40 tns::TestType::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 24 tns::TestType::fun2 .*(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function main at .*.C:47: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function main at .*.C:48: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function main at .*.C:49: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function main at .*.C:100: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function tns::fun at .*.C:13: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function tns::fun2 at .*.C:33: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function tns::TestType::fun at .*.C:40: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function tns::TestType::fun2 at .*.C:24: .*(\n|\r\n|\r)" }
return 0;
}
-// { dg-output "custom std::handle_contract_violation called: 30 .*/contracts14.C(\n|\r\n|\r)*" }
-// { dg-output "synth caught direct: -30(\n|\r\n|\r)*" }
-// { dg-output "custom std::handle_contract_violation called: 18 .*/contracts14.C(\n|\r\n|\r)*" }
-// { dg-output "synth caught indirect: -18(\n|\r\n|\r)*" }
-// { dg-output "custom std::handle_contract_violation called: 18 .*/contracts14.C(\n|\r\n|\r)*" }
-// { dg-output "synth caught double indirect: -18(\n|\r\n|\r)*" }
+// { dg-output "custom std::handle_contract_violation called: 30 .*/contracts14.C(\n|\r\n|\r)" }
+// { dg-output "synth caught direct: -30(\n|\r\n|\r)" }
+// { dg-output "custom std::handle_contract_violation called: 18 .*/contracts14.C(\n|\r\n|\r)" }
+// { dg-output "synth caught indirect: -18(\n|\r\n|\r)" }
+// { dg-output "custom std::handle_contract_violation called: 18 .*/contracts14.C(\n|\r\n|\r)" }
+// { dg-output "synth caught double indirect: -18(\n|\r\n|\r)" }
// { dg-output "end main" }
return 0;
}
-// { dg-output "custom std::handle_contract_violation called: 30 .*/contracts15.C(\n|\r\n|\r)*" }
-// { dg-output "synth caught direct: -30(\n|\r\n|\r)*" }
-// { dg-output "custom std::handle_contract_violation called: 18 .*/contracts15.C(\n|\r\n|\r)*" }
-// { dg-output "terminate called after throwing an instance of .int.(\n|\r\n|\r)*" }
+// { dg-output "custom std::handle_contract_violation called: 30 .*/contracts15.C(\n|\r\n|\r)" }
+// { dg-output "synth caught direct: -30(\n|\r\n|\r)" }
+// { dg-output "custom std::handle_contract_violation called: 18 .*/contracts15.C(\n|\r\n|\r)" }
+// { dg-output "terminate called after throwing an instance of .int.(\n|\r\n|\r)" }
// { dg-shouldfail "throwing in noexcept" }
return 0;
}
-// { dg-output "custom std::handle_contract_violation called: 18 .*/contracts16.C(\n|\r\n|\r)*" }
-// { dg-output "synth caught indirect: -18(\n|\r\n|\r)*" }
+// { dg-output "custom std::handle_contract_violation called: 18 .*/contracts16.C(\n|\r\n|\r)" }
+// { dg-output "synth caught indirect: -18(\n|\r\n|\r)" }
return 0;
}
-// { dg-output "custom std::handle_contract_violation called: 19 .*/contracts17.C(\n|\r\n|\r)*" }
+// { dg-output "custom std::handle_contract_violation called: 19 .*/contracts17.C(\n|\r\n|\r)" }
// { dg-shouldfail "throwing in noexcept" }
return 0;
}
-// { dg-output "default std::handle_contract_violation called: .*.C 11 main .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 12 main .*(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function main at .*.C:11: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function main at .*.C:12: .*(\n|\r\n|\r)" }
return 0;
}
-// { dg-output "default std::handle_contract_violation called: .*.C 12 ffun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 30 ftfun<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 36 explicitfn .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 30 ftfun<double> .*(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function ffun at .*.C:12: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ftfun<int> at .*.C:30: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function explicitfn at .*.C:36: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function ftfun<double> at .*.C:30: .*(\n|\r\n|\r)" }
// { dg-do run }
// { dg-options "-std=c++2a -fcontracts" }
// { dg-shouldfail "assert violation" }
-// { dg-output "default std::handle_contract_violation called" }
+// { dg-output "contract violation in function main" }
int main()
{
return 0;
}
-// { dg-output "default std::handle_contract_violation called: .*.C 8 S::S<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 8 S::S<int> .*(\n|\r\n|\r)*" }
-// { dg-output "S::S.T.: -1(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 8 S::S<double> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 8 S::S<double> .*(\n|\r\n|\r)*" }
-// { dg-output "S::S.T.: -2(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 20 S1::S1<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 20 S1::S1<int> .*(\n|\r\n|\r)*" }
-// { dg-output "S1::S1.T.: -3(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 20 S1::S1<double> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 20 S1::S1<double> .*(\n|\r\n|\r)*" }
-// { dg-output "S1::S1.T.: -4(\n|\r\n|\r)*" }
+// { dg-output "contract violation in function S::S<int> at .*.C:8: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S::S<int> at .*.C:8: .*(\n|\r\n|\r)" }
+// { dg-output "S::S.T.: -1(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S::S<double> at .*.C:8: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S::S<double> at .*.C:8: .*(\n|\r\n|\r)" }
+// { dg-output "S::S.T.: -2(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S1::S1<int> at .*.C:20: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S1::S1<int> at .*.C:20: .*(\n|\r\n|\r)" }
+// { dg-output "S1::S1.T.: -3(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S1::S1<double> at .*.C:20: .*(\n|\r\n|\r)" }
+// { dg-output "contract violation in function S1::S1<double> at .*.C:20: .*(\n|\r\n|\r)" }
+// { dg-output "S1::S1.T.: -4(\n|\r\n|\r)" }
// { dg-do run }
// { dg-options "-std=c++2a -fcontracts -fcontract-build-level=audit" }
// { dg-shouldfail "assert violation" }
-// { dg-output "default std::handle_contract_violation called" }
+// { dg-output "contract violation in function main" }
int main()
{
// contract failure is switched on
// { dg-do run }
// { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
-// { dg-output "default std::handle_contract_violation called" }
+// { dg-output "contract violation in function main" }
int main()
{
// return 0;
}
-// { dg-output "default std::handle_contract_violation called: .*.C 12 fun1<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 11 fun1<double> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 11 fun1<const char.> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 11 fun1<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 12 fun1<int> .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 32 main .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 21 test<int>::fun .*(\n|\r\n|\r)*" }
-// { dg-output "default std::handle_contract_violation called: .*.C 21 test<double>::fun .*(\n|\r\n|\r)*" }
+// { dg-output {contract violation in function fun1<int> at .*:12: \(long long\)b > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function fun1<double> at .*:11: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function fun1<const char\*> at .*:11: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function fun1<int> at .*:11: a > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function fun1<int> at .*:12: \(long long\)b > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function main at .*:32: fun1\(-1, -5\)(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function test<int>::fun at .*:21: b > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
+// { dg-output {contract violation in function test<double>::fun at .*:21: b > 0(\n|\r\n|\r)} }
+// { dg-output {\[continue:on\](\n|\r\n|\r)} }
// -*- C++ -*- std::experimental::contract_violation and friends
+
// Copyright (C) 2019-2022 Free Software Foundation, Inc.
//
// This file is part of GCC.
// <http://www.gnu.org/licenses/>.
#include <experimental/contract>
-#include <iostream>
+#if _GLIBCXX_HOSTED && _GLIBCXX_VERBOSE
+# include <iostream>
+#endif
__attribute__ ((weak)) void
handle_contract_violation (const std::experimental::contract_violation &violation)
{
- std::cerr << "default std::handle_contract_violation called: \n"
- << " " << violation.file_name()
- << " " << violation.line_number()
- << " " << violation.function_name()
- << " " << violation.comment()
- << " " << violation.assertion_level()
- << " " << violation.assertion_role()
- << " " << (int)violation.continuation_mode()
- << std::endl;
-}
+#if _GLIBCXX_HOSTED && _GLIBCXX_VERBOSE
+ bool level_default_p = violation.assertion_level() == "default";
+ bool role_default_p = violation.assertion_role() == "default";
+ bool cont_mode_default_p = violation.continuation_mode()
+ == std::experimental::contract_violation_continuation_mode::never_continue;
+
+ const char* modes[]{ "off", "on" }; // Must match enumerators in header.
+ std::cerr << "contract violation in function " << violation.function_name()
+ << " at " << violation.file_name() << ':' << violation.line_number()
+ << ": " << violation.comment();
+
+ const char* delimiter = "\n[";
+ if (!level_default_p)
+ {
+ std::cerr << delimiter << "level:" << violation.assertion_level();
+ delimiter = ", ";
+ }
+ if (!role_default_p)
+ {
+ std::cerr << delimiter << "role:" << violation.assertion_role();
+ delimiter = ", ";
+ }
+ if (!cont_mode_default_p)
+ {
+ std::cerr << delimiter << "continue:"
+ << modes[(int)violation.continuation_mode() & 1];
+ delimiter = ", ";
+ }
+
+ if (delimiter[0] == ',')
+ std::cerr << ']';
+
+ std::cerr << std::endl;
+#endif
+}