[llvm-commits] [dragonegg] r136347 - /dragonegg/trunk/src/Types.cpp

Duncan Sands baldrick at free.fr
Thu Jul 28 04:34:30 PDT 2011


Author: baldrick
Date: Thu Jul 28 06:34:29 2011
New Revision: 136347

URL: http://llvm.org/viewvc/llvm-project?rev=136347&view=rev
Log:
Sometimes the Fortran front-end creates a record type T with a field
F where DECL_CONTEXT(F)!=T (the context is some other record type that
is structurally equivalent to T).  This used to be hidden by our not
distinguishing between structurally equivalent types.  Disable the
check for the moment.

Modified:
    dragonegg/trunk/src/Types.cpp

Modified: dragonegg/trunk/src/Types.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Types.cpp?rev=136347&r1=136346&r2=136347&view=diff
==============================================================================
--- dragonegg/trunk/src/Types.cpp (original)
+++ dragonegg/trunk/src/Types.cpp Thu Jul 28 06:34:29 2011
@@ -210,7 +210,9 @@
 /// INT_MAX if there is no such LLVM field.
 int GetFieldIndex(tree decl, Type *Ty) {
   assert(TREE_CODE(decl) == FIELD_DECL && "Expected a FIELD_DECL!");
-  assert(Ty == ConvertType(DECL_CONTEXT(decl)) && "Field not for this type!");
+  // FIXME: The following test sometimes fails when compiling Fortran90 because
+  // DECL_CONTEXT does not point to the containing type, but some other type!
+//  assert(Ty == ConvertType(DECL_CONTEXT(decl)) && "Field not for this type!");
 
   // If we previously cached the field index, return the cached value.
   unsigned Index = (unsigned)get_decl_index(decl);





More information about the llvm-commits mailing list