This is the mail archive of the 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]

[PATCH] Fix (parts of?) PR46560

This fixes EH miscompiles at WPA stage, of which kind at least some
of the current libstdc++ FAILs with -flto are of.

We can't rely on call_stmt availability during inline edge cloning.

Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.


2010-11-26  Richard Guenther  <>

	PR lto/46560
	* cgraph.c (cgraph_clone_edge): Clone call_stmt dependent
	flags manually.

Index: gcc/cgraph.c
*** gcc/cgraph.c	(revision 167172)
--- gcc/cgraph.c	(working copy)
*************** cgraph_clone_edge (struct cgraph_edge *e
*** 2121,2126 ****
--- 2121,2129 ----
    new_edge->inline_failed = e->inline_failed;
    new_edge->indirect_inlining_edge = e->indirect_inlining_edge;
    new_edge->lto_stmt_uid = stmt_uid;
+   /* Clone flags that depend on call_stmt availability manually.  */
+   new_edge->can_throw_external = e->can_throw_external;
+   new_edge->call_stmt_cannot_inline_p = e->call_stmt_cannot_inline_p;
    if (update_original)
        e->count -= new_edge->count;

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