1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -analyze -analyzer-checker=core.DivideZero -verify %s 2*f4a2713aSLionel Sambuc fooPR10616(int qX)3*f4a2713aSLionel Sambucint fooPR10616 (int qX ) { 4*f4a2713aSLionel Sambuc int a, c, d; 5*f4a2713aSLionel Sambuc 6*f4a2713aSLionel Sambuc d = (qX-1); 7*f4a2713aSLionel Sambuc while ( d != 0 ) { 8*f4a2713aSLionel Sambuc d = c - (c/d) * d; 9*f4a2713aSLionel Sambuc } 10*f4a2713aSLionel Sambuc 11*f4a2713aSLionel Sambuc return (a % (qX-1)); // expected-warning {{Division by zero}} 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc } 14