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]

[LTO] Fix various compile.exp tests


I added -flto to compile.exp and got quite a few ICEs.  This patch
fixes most of them.  I changed the handling of static variables to use
DECL_CONTEXT instead of just checking for "globalness".  The thing is
that static variables may be declared locally to a function and have
initializers that reference variables in the function.  So I modified
the handler so that they're handled as a regular local variable
instead of the global handler.

Another ICE was related to PR 31899.  There already is a fix on
mainline, so I just backported it.

The only ones I still haven't worked on are:

gcc.c-torture/compile/20020109-2.c
   We ICE in dwarf2out.c:output_die but I haven't really looked why or how.

gcc.c-torture/compile/init-1.c
   We do not write out compund literals yet.  Just need to add the
code to handle them.

The rest of compile.exp seems to work with -O2 -flto.  Next, I will
see about adding dejagnu support to exercise the whole loop (-flto and
then call lto1 on the generated object).  I find this useful to go
through the most obvious problems.

With this patch I get 12 failures on compile.exp.  Committed to the branch.

Attachment: 20071005-lto-writeout-fixes.txt
Description: Text document


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