https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97927

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #14 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #13)
>  <var_decl 0x7ffff7ffbab0 ierror
...
>     align:32 warn_if_not_align:0 context <namespace_decl 0x7ffff7667260
> modmpi> chain <function_decl 0x7ffff7668200 exxengy>>
> 
> 
> I am not quite sure whether the context is right or not:
>   context <namespace_decl 0x7ffff7667260 modmpi> 
> but it does not really look wrong, does it?

The following compiles – but I don't know whether it makes sense:


--- a/gcc/tree-nested.c
+++ b/gcc/tree-nested.c
@@ -382,7 +382,8 @@ static tree
 lookup_field_for_decl (struct nesting_info *info, tree decl,
                       enum insert_option insert)
 {
-  gcc_checking_assert (decl_function_context (decl) == info->context);
+  gcc_checking_assert (TREE_CODE (DECL_CONTEXT (decl)) == NAMESPACE_DECL
+                      || decl_function_context (decl) == info->context);

   if (insert == NO_INSERT)
     {

Reply via email to