IPA merge: cgraph_add_function improvement
Andrew Pinski
pinskia@physics.uc.edu
Sun Dec 31 22:43:00 GMT 2006
> This causes a bootstrap failure on powerpc-aix and maybe other targets which don't
> have support for the init section.
>
> A reduced testcase is:
> static void f(void) __attribute__((constructor));
> static void f(void) {}
>
>
> I tested this with a cross compiler to powerpc-aix5.3.
>
> The ICE we get is:
> t.c:2: internal compiler error: in cgraph_expand_all_functions, at cgraphunit.c:1220
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Here is the fix I came up with while on the plane.
David,
Could you test it for me on powerpc-aix?
Thanks,
Andrew Pinski
ChangeLog:
* c-decl.c (c_write_global_declarations): Call
cgraph_process_new_functions before calling cgraph_optimize.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fixc.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061231/956289fd/attachment.txt>
More information about the Gcc-patches
mailing list