You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
247 B
14 lines
247 B
4 months ago
|
// RUN: %clang_cc1 -analyze -analyzer-checker=core.DivideZero -verify %s
|
||
|
|
||
|
int fooPR10616 (int qX ) {
|
||
|
int a, c, d;
|
||
|
|
||
|
d = (qX-1);
|
||
|
while ( d != 0 ) {
|
||
|
d = c - (c/d) * d;
|
||
|
}
|
||
|
|
||
|
return (a % (qX-1)); // expected-warning {{Division by zero}}
|
||
|
|
||
|
}
|