Skip compilation of dead code from duplicate methods

Change-Id: If6114b3cd8e9a2d9a901dc93c352cee6afa3361f
diff --git a/src/dex_file.cc b/src/dex_file.cc
index eb2a157..eb48ded 100644
--- a/src/dex_file.cc
+++ b/src/dex_file.cc
@@ -824,12 +824,20 @@
 void ClassDataItemIterator::ReadClassDataField() {
   field_.field_idx_delta_ = DecodeUnsignedLeb128(&ptr_pos_);
   field_.access_flags_ = DecodeUnsignedLeb128(&ptr_pos_);
+  if (field_.field_idx_delta_ == 0) {
+    LOG(WARNING) << "Duplicate field " << PrettyField(GetMemberIndex(), dex_file_)
+                 << " in " << dex_file_.GetLocation();
+  }
 }
 
 void ClassDataItemIterator::ReadClassDataMethod() {
   method_.method_idx_delta_ = DecodeUnsignedLeb128(&ptr_pos_);
   method_.access_flags_ = DecodeUnsignedLeb128(&ptr_pos_);
   method_.code_off_ = DecodeUnsignedLeb128(&ptr_pos_);
+  if (method_.method_idx_delta_ == 0) {
+    LOG(WARNING) << "Duplicate method " << PrettyMethod(GetMemberIndex(), dex_file_)
+                 << " in " << dex_file_.GetLocation();
+  }
 }
 
 // Read a signed integer.  "zwidth" is the zero-based byte count.