Ticket #1718: gcc-4.0.2-pr24109-1.patch

File gcc-4.0.2-pr24109-1.patch, 1.2 KB (added by alexander@…, 19 years ago)

Upstream fix

  • gcc/c-decl.c

    Submitted By: Alexander E. Patrakov
    Date: 2006-02-28
    Initial Package Version: 4.0.2
    Upstream status: Backport
    Origin: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24109
    Description: fixes compilation of kernel modules that use compound literals.
    Upstream log message:
    
    2005-09-29  Jakub Jelinek  <jakub@redhat.com>
    
          PR middle-end/24109
          * c-decl.c (c_write_global_declarations_1): If any
          wrapup_global_declaration_2 call returned true, restart the loop.
    
    old new  
    75277527c_write_global_declarations_1 (tree globals)
    75287528{
    75297529  tree decl;
     7530  bool reconsider;
    75307531
    75317532  /* Process the decls in the order they were written.  */
    75327533  for (decl = globals; decl; decl = TREE_CHAIN (decl))
     
    75457546        }
    75467547
    75477548      wrapup_global_declaration_1 (decl);
    7548       wrapup_global_declaration_2 (decl);
    7549       check_global_declaration_1 (decl);
    75507549    }
     7550
     7551  do
     7552    {
     7553      reconsider = false;
     7554      for (decl = globals; decl; decl = TREE_CHAIN (decl))
     7555        reconsider |= wrapup_global_declaration_2 (decl);
     7556    }
     7557  while (reconsider);
     7558
     7559  for (decl = globals; decl; decl = TREE_CHAIN (decl))
     7560    check_global_declaration_1 (decl);
    75517561}
    75527562
    75537563/* A subroutine of c_write_global_declarations Emit debug information for each