Lines Matching defs:overflow

20 static const uint64_t overflow = 1 * 4608 * 1024 * 1024; // expected-warning {{overflow in expression; result is 536'870'912 with type 'int'}}
23 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
24 uint64_t overflow = 4608 * 1024 * 1024,
25 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
27 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
29 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
31 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
33 // expected-warning@+1 2{{overflow in expression; result is 536'870'912 with type 'int'}}
36 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
37 overflow += overflow2 = overflow3 = (uint64_t)(4608 * 1024 * 1024);
38 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
39 overflow += overflow2 = overflow3 = 4608 * 1024 * 1024;
41 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
42 overflow += overflow2 = overflow3 = static_cast<uint64_t>(4608 * 1024 * 1024);
47 // expected-warning@+1 2{{overflow in expression; result is 536'870'912 with type 'int'}}
48 overflow = 4608 * 1024 * 1024 ? 4608 * 1024 * 1024 : 0;
50 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
51 overflow = 0 ? 0 : 4608 * 1024 * 1024;
53 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
57 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
61 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
65 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
69 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
73 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
77 // expected-warning@+1 2{{overflow in expression; result is 536'870'912 with type 'int'}}
83 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
86 // expected-warning@+1 {{overflow in expression; result is 537'919'488 with type 'int'}}
89 // expected-warning@+1 {{overflow in expression; result is 537'919'488 with type 'int'}}
95 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
98 // expected-warning@+2 2{{overflow in expression; result is 536'870'912 with type 'int'}}
99 // expected-warning@+1 {{overflow converting case value to switch condition type (288230376151711744 to 0)}}
105 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
108 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
111 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
114 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
117 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
120 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
123 // expected-warning@+1 2{{overflow in expression; result is 536'870'912 with type 'int'}}
126 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
129 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
132 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
135 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
138 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
141 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
144 // expected-warning@+1 2{{overflow in expression; result is 536'870'912 with type 'int'}}
147 // expected-warning@+3 {{overflow in expression; result is 536'870'912 with type 'int'}}
148 // expected-warning@+3 {{overflow in expression; result is 536'870'912 with type 'int'}}
149 // expected-warning@+3 {{overflow in expression; result is 536'870'912 with type 'int'}}
154 // expected-warning@+3 {{overflow in expression; result is 536'870'912 with type 'int'}}
155 // expected-warning@+3 2{{overflow in expression; result is 536'870'912 with type 'int'}}
156 // expected-warning@+3 2{{overflow in expression; result is 536'870'912 with type 'int'}}
161 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
164 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
167 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
170 // expected-warning@+2 {{overflow in expression; result is 536'870'912 with type 'int'}}
178 // expected-warning@+1 2{{overflow in expression; result is 536'870'912 with type 'int'}}
183 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
186 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
189 // expected-warning@+2 {{overflow in expression; result is 536'870'912 with type 'int'}}
193 // expected-warning@+1 {{overflow in expression; result is 536'870'912 with type 'int'}}
197 // Tests that ensure that evaluation-for-overflow of random expressions doesn't
218 int a = -(1<<31); // expected-warning {{overflow in expression; result is -2'147'483'648 with type 'int'}}
244 int64_t x = Pass(30 * 24 * 60 * 59 * 1000); // expected-warning {{overflow in expression; result is -1'746'167'296 with type 'int'}}
245 auto r = Wrap(Pass(30 * 24 * 60 * 59 * 1000)); // expected-warning {{overflow in expression; result is -1'746'167'296 with type 'int'}}
252 struct { int v; } &&r = {512 * 1024 * 1024 * 1024}; // expected-warning {{overflow in expression; result is 0 with type 'int'}}