This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bootstrap failure for mingw target


Kai Tietz wrote:
> Hi,
> 
> caused be recent changes we see a bootstrap failure on trunk. It is
> reasoned by the mis-treating of __declspec(dllexport) attribute on
> variables. I assume it breaks also cygwin build, but I didn't tested
> it until now. We get:

  What trunk rev are you on?  I haven't been building objc for a little while.


> In file included from
> /home/nightstrike/a/build/gcc/gcc/libobjc/objc/runtime.h:38,
>                 from /home/nightstrike/a/build/gcc/gcc/libobjc/archive.c:26:
> /home/nightstrike/a/build/gcc/gcc/libobjc/objc/objc-api.h:365:
> internal compiler error: tree check: expected function_decl, have
> var_decl in handle_dll_attribute, at tree.c:4172

  Backtrace might be instructive, but it looks to me:

tree
handle_dll_attribute (tree * pnode, tree name, tree args, int flags,
		      bool *no_add_attrs)
{
             [   . . . . ]
  if (is_dllimport)
    {
      /* Honor any target-specific overrides. */
      if (!targetm.valid_dllimport_attribute_p (node))
	*no_add_attrs = true;

     else if (TREE_CODE (node) == FUNCTION_DECL
	        && DECL_DECLARED_INLINE_P (node))
	{
	  warning (OPT_Wattributes, "inline function %q+D declared as "
		  " dllimport: attribute ignored", node);
	  *no_add_attrs = true;
	}
             [   . . . . ]
    }
  else if (DECL_DECLARED_INLINE_P (node))
    /* An exported function, even if inline, must be emitted.  */
    DECL_EXTERNAL (node) = 0;
             [   . . . . ]

... like this is an oversight, and the second call to DECL_DECLARED_INLINE_P
should be guarded with "TREE_CODE (node) == FUNCTION_DECL &&" just like the
first one is.

    cheers,
      DaveK



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]