Assembler problem while trying to integrate D iompiler in GCC suite

Gerrit P. Haase gerrit@familiehaase.de
Tue Jun 7 15:25:00 GMT 2005


Gerrit P. Haase wrote:

> Hi all,
> 
> I'm trying to integrate the D frontend for GCC in the GCC 3.4.4 release,
> I'm in contact with the maintainer David Friedman, he successfully
> compiled the current (0.12.1) sources with MinGW and I expect that he
> also has tested it with other supported platforms, however I get this
> error now and I have not really an idea what the reason may be. 

[...]

> What is new in the source regarding this problem is this patch which 
> gives me the error cited below:

[...]

This part is 1:1 from C++/methods.c, besides the commented lines, these 
are ncluded in the C++ compiler, so it seems that one or more of these
comments here are too much because the C++ compiler is working:

> diff -cr d-0.12/d-codegen.cc d-0.12.1/d-codegen.cc
> *** d-0.12/d-codegen.cc    Sat May 28 18:00:56 2005
> --- d-0.12.1/d-codegen.cc    Sun Jun  5 19:27:36 2005
> ***************
> *** 1743,1748 ****
> --- 1743,1805 ----
>       return call_exp;
>   }
> 
> +
> + #if D_GCC_VER >= 34
> + #ifdef ASM_OUTPUT_DEF
> + static int thunk_labelno;
> +
> + /* Create a static alias to function.  */
> +
> + static tree
> + make_alias_for_thunk (tree function)
> + {
> +   tree alias;
> +   char buf[256];
> +
> + #if defined (TARGET_IS_PE_COFF)
> +   if (DECL_ONE_ONLY (function))
> +     return function;
> + #endif
> +
> +   ASM_GENERATE_INTERNAL_LABEL (buf, "LTHUNK", thunk_labelno);
> +   thunk_labelno++;
> +   alias = build_decl (FUNCTION_DECL, get_identifier (buf),
> +               TREE_TYPE (function));
> +   //DECL_LANG_SPECIFIC (alias) = DECL_LANG_SPECIFIC (function);
> +   //cxx_dup_lang_specific_decl (alias);
> +   DECL_CONTEXT (alias) = NULL;
> +   TREE_READONLY (alias) = TREE_READONLY (function);
> +   TREE_THIS_VOLATILE (alias) = TREE_THIS_VOLATILE (function);
> +   TREE_PUBLIC (alias) = 0;
> +   //DECL_INTERFACE_KNOWN (alias) = 1;
> +   //DECL_NOT_REALLY_EXTERN (alias) = 1;
> +   //DECL_THIS_STATIC (alias) = 1;
> +   //DECL_SAVED_FUNCTION_DATA (alias) = NULL;
> +   //DECL_DESTRUCTOR_P (alias) = 0;
> +   //DECL_CONSTRUCTOR_P (alias) = 0;
> +   //DECL_CLONED_FUNCTION (alias) = NULL_TREE;
> +   DECL_EXTERNAL (alias) = 0;
> +   DECL_ARTIFICIAL (alias) = 1;
> +   DECL_NO_STATIC_CHAIN (alias) = 1;
> +   //DECL_PENDING_INLINE_P (alias) = 0;
> +   DECL_INLINE (alias) = 0;
> +   DECL_DECLARED_INLINE_P (alias) = 0;
> +   //DECL_DEFERRED_FN (alias) = 0;
> +   //DECL_USE_TEMPLATE (alias) = 0;
> +   //DECL_TEMPLATE_INSTANTIATED (alias) = 0;
> +   //DECL_TEMPLATE_INFO (alias) = NULL;
> +   //DECL_INITIAL (alias) = error_mark_node;
> +   TREE_ADDRESSABLE (alias) = 1;
> +   TREE_USED (alias) = 1;
> +   SET_DECL_ASSEMBLER_NAME (alias, DECL_NAME (alias));
> +   TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (alias)) = 1;
> +   if (!flag_syntax_only)
> +     assemble_alias (alias, DECL_ASSEMBLER_NAME (function));
> +   return alias;
> + }
> + #endif
> + #endif
> +
>   // Can't output thunks while a function is being compiled. Called from
>   // d-decls.cc (no cur_irs)
>   static Array deferredThunks;


Gerrit

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list