<ExcludeList Include="$(XunitTestBinBase)/tracing/tracecontrol/tracecontrol/*">
<Issue>20299</Issue>
</ExcludeList>
- <ExcludeList Include="$(XunitTestBinBase)/JIT/Regression/JitBlue/GitHub_7147/GitHub_7147/*">
- <Issue>26335</Issue>
- </ExcludeList>
<ExcludeList Include="$(XunitTestBinBase)/readytorun/DynamicMethodGCStress/DynamicMethodGCStress/*">
<Issue>timeout</Issue>
</ExcludeList>
return b;
}
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static bool callargs(int x, int y, int[] a)
+ {
+ bool b = false;
+
+ for (int i = 0; i < x; i++)
+ {
+ // The following call should throw DivideByZeroException when y is 0
+ // because call arguments are expected to be evaluated in order.
+ b |= call(x / y, a.Length + x + y);
+ }
+
+ return b;
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static bool call(int x, int y)
+ {
+ return x == y;
+ }
+
public static int Main(string[] args)
{
int errors = 0;
// This is the correct result -- i / y should be evaluated and
// raise this exception (before c.f raises nulllref).
}
- catch
- {
- // Any exception other than DivideByZero is a failure
- errors |= 2;
- }
#endif
try
swap(10, 11, 0, null);
// DivByZero should be raised from 'swap'; normal return
// is an error.
- errors |= 4;
+ errors |= 2;
}
catch (DivideByZeroException)
{
// This is the correct result -- x / y should be evaluated and
// raise this exception (before c.f raises nulllref).
}
- catch
+
+ try
+ {
+ callargs(42, 0, null);
+ // callargs shoulw always throw an exception.
+ errors |= 4;
+ }
+ catch (DivideByZeroException)
{
- // Any exception other than DivideByZero is a failure
- errors |= 8;
+ // This is the expected exception
}
return 100 + errors;