This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Bootstrap failure for mingw target
2009/5/28 Dave Korn <dave.korn.cygwin@googlemail.com>:
> 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
>
>
>
Yes, you right. This piece of code seems to be the reason here. I am
just testing the patch you suggested.
Kai
--
| (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination