public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug middle-end/46287] New: No thunk info on call graph edges leads to miscompilations @ 2010-11-03 12:57 jamborm at gcc dot gnu.org 2010-11-03 12:57 ` [Bug middle-end/46287] " jamborm at gcc dot gnu.org ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: jamborm at gcc dot gnu.org @ 2010-11-03 12:57 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46287 Summary: No thunk info on call graph edges leads to miscompilations Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned@gcc.gnu.org ReportedBy: jamborm@gcc.gnu.org Created attachment 22249 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22249 Testcase Compiling the attached testcase with -O3 leads to a run-time abort. (This is on i686 but I suspect it happens on all platforms). ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/46287] No thunk info on call graph edges leads to miscompilations 2010-11-03 12:57 [Bug middle-end/46287] New: No thunk info on call graph edges leads to miscompilations jamborm at gcc dot gnu.org @ 2010-11-03 12:57 ` jamborm at gcc dot gnu.org 2010-11-11 11:03 ` jamborm at gcc dot gnu.org ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: jamborm at gcc dot gnu.org @ 2010-11-03 12:57 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46287 Martin Jambor <jamborm at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2010.11.03 12:57:39 AssignedTo|unassigned at gcc dot |jamborm at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 --- Comment #1 from Martin Jambor <jamborm at gcc dot gnu.org> 2010-11-03 12:57:39 UTC --- Mine. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/46287] No thunk info on call graph edges leads to miscompilations 2010-11-03 12:57 [Bug middle-end/46287] New: No thunk info on call graph edges leads to miscompilations jamborm at gcc dot gnu.org 2010-11-03 12:57 ` [Bug middle-end/46287] " jamborm at gcc dot gnu.org @ 2010-11-11 11:03 ` jamborm at gcc dot gnu.org 2010-11-22 21:48 ` jamborm at gcc dot gnu.org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: jamborm at gcc dot gnu.org @ 2010-11-11 11:03 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46287 --- Comment #2 from Martin Jambor <jamborm at gcc dot gnu.org> 2010-11-11 11:03:10 UTC --- Patch posted to the mailing list: http://gcc.gnu.org/ml/gcc-patches/2010-11/msg01140.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/46287] No thunk info on call graph edges leads to miscompilations 2010-11-03 12:57 [Bug middle-end/46287] New: No thunk info on call graph edges leads to miscompilations jamborm at gcc dot gnu.org 2010-11-03 12:57 ` [Bug middle-end/46287] " jamborm at gcc dot gnu.org 2010-11-11 11:03 ` jamborm at gcc dot gnu.org @ 2010-11-22 21:48 ` jamborm at gcc dot gnu.org 2010-12-15 13:20 ` jamborm at gcc dot gnu.org 2010-12-15 14:32 ` jamborm at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: jamborm at gcc dot gnu.org @ 2010-11-22 21:48 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46287 --- Comment #3 from Martin Jambor <jamborm at gcc dot gnu.org> 2010-11-22 21:47:19 UTC --- Patch pinged: http://gcc.gnu.org/ml/gcc-patches/2010-11/msg02291.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/46287] No thunk info on call graph edges leads to miscompilations 2010-11-03 12:57 [Bug middle-end/46287] New: No thunk info on call graph edges leads to miscompilations jamborm at gcc dot gnu.org ` (2 preceding siblings ...) 2010-11-22 21:48 ` jamborm at gcc dot gnu.org @ 2010-12-15 13:20 ` jamborm at gcc dot gnu.org 2010-12-15 14:32 ` jamborm at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: jamborm at gcc dot gnu.org @ 2010-12-15 13:20 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46287 --- Comment #4 from Martin Jambor <jamborm at gcc dot gnu.org> 2010-12-15 13:19:51 UTC --- Author: jamborm Date: Wed Dec 15 13:19:46 2010 New Revision: 167855 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167855 Log: 2010-12-15 Martin Jambor <mjambor@suse.cz> PR tree-optimization/46053 PR middle-end/46287 PR middle-end/46242 * cgraph.h (cgraph_indirect_call_info): New field thunk_delta. * gimple.h (gimple_fold_obj_type_ref): Declaration removed. (gimple_fold_call): Declare. (gimple_adjust_this_by_delta): Likewise. * cgraph.c (cgraph_make_edge_direct): New parameter delta. Updated all users. (cgraph_clone_edge): Create a copy of indirect_info also for direct edges. * cgraphunit.c (cgraph_redirect_edge_call_stmt_to_callee): Adjust this parameters. * gimple-fold.c (gimple_fold_obj_type_ref_known_binfo): Renamed to gimple_get_virt_mehtod_for_binfo, new parameter delta. Do not search through thunks, in fact bail out if we encounter one, check that BINFO_VIRTUALS is not NULL. (gimple_adjust_this_by_delta): New function. (gimple_fold_obj_type_ref): Removed. (gimple_fold_obj_type_ref_call): New function. (fold_gimple_call): Renamed to gimple_fold_call, made external. Updated users. Call gimple_fold_obj_type_ref_call instead of gimple_fold_obj_type_ref. * ipa-cp.c (ipcp_process_devirtualization_opportunities): Process thunk deltas. (ipcp_discover_new_direct_edges): Likewise. * ipa-prop.c (ipa_make_edge_direct_to_target): New parameter delta. Updated callers. (ipa_write_indirect_edge_info): Stream thunk_delta. (ipa_read_indirect_edge_info): Likewise. * tree-ssa-ccp.c (ccp_fold_stmt): Use gimple_fold_call instead of gimple_fold_obj_type_ref. * testsuite/g++.dg/ipa/pr46053.C: New test. * testsuite/g++.dg/ipa/pr46287-1.C: Likewise. * testsuite/g++.dg/ipa/pr46287-2.C: Likewise. * testsuite/g++.dg/ipa/pr46287-3.C: Likewise. * testsuite/g++.dg/torture/covariant-1.C: Likewise. * testsuite/g++.dg/torture/pr46287.C: Likewise. Added: trunk/gcc/testsuite/g++.dg/ipa/pr46053.C trunk/gcc/testsuite/g++.dg/ipa/pr46287-1.C trunk/gcc/testsuite/g++.dg/ipa/pr46287-2.C trunk/gcc/testsuite/g++.dg/ipa/pr46287-3.C trunk/gcc/testsuite/g++.dg/torture/covariant-1.C trunk/gcc/testsuite/g++.dg/torture/pr46287.C Modified: trunk/gcc/ChangeLog trunk/gcc/cgraph.c trunk/gcc/cgraph.h trunk/gcc/cgraphunit.c trunk/gcc/gimple-fold.c trunk/gcc/gimple.h trunk/gcc/ipa-cp.c trunk/gcc/ipa-prop.c trunk/gcc/ipa-prop.h trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-ccp.c ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/46287] No thunk info on call graph edges leads to miscompilations 2010-11-03 12:57 [Bug middle-end/46287] New: No thunk info on call graph edges leads to miscompilations jamborm at gcc dot gnu.org ` (3 preceding siblings ...) 2010-12-15 13:20 ` jamborm at gcc dot gnu.org @ 2010-12-15 14:32 ` jamborm at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: jamborm at gcc dot gnu.org @ 2010-12-15 14:32 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46287 Martin Jambor <jamborm at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #5 from Martin Jambor <jamborm at gcc dot gnu.org> 2010-12-15 14:32:03 UTC --- Fixed. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-12-15 14:32 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-11-03 12:57 [Bug middle-end/46287] New: No thunk info on call graph edges leads to miscompilations jamborm at gcc dot gnu.org 2010-11-03 12:57 ` [Bug middle-end/46287] " jamborm at gcc dot gnu.org 2010-11-11 11:03 ` jamborm at gcc dot gnu.org 2010-11-22 21:48 ` jamborm at gcc dot gnu.org 2010-12-15 13:20 ` jamborm at gcc dot gnu.org 2010-12-15 14:32 ` jamborm at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).