@@ -256,7 +256,7 @@ region::get_subregions_for_binding (region_model_manager *mgr,
tree type,
auto_vec <const region *> *out) const
{
- if (get_type () == NULL_TREE)
+ if (get_type () == NULL_TREE || type == NULL_TREE)
return;
if (relative_bit_offset == 0
&& types_compatible_p (get_type (), type))
new file mode 100644
@@ -0,0 +1,10 @@
+void *calloc (__SIZE_TYPE__, __SIZE_TYPE__);
+
+int
+x7 (void)
+{
+ int **md = calloc (1, 1);
+
+ return md[0][0]; /* { dg-warning "possibly-NULL" "unchecked deref" } */
+ /* { dg-warning "leak of 'md'" "leak" { target *-*-* } .-1 } */
+}