public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/14639] [3.5 Regression] [non-unit-at-a-time] Incorrect emission of unused compiler-generated destructor Date: Fri, 04 Jun 2004 21:11:00 -0000 [thread overview] Message-ID: <20040604211149.25644.qmail@sourceware.org> (raw) In-Reply-To: <20040318204634.14639.austern@apple.com> ------- Additional Comments From hubicka at ucw dot cz 2004-06-04 21:11 ------- Subject: Re: [3.5 Regression] [non-unit-at-a-time] Incorrect emission of unused compiler-generated destructor > > ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-04 01:50 ------- > This should fix it by making non-unit-at-a-time more like unit-at-a-time also removes one ??? to fix > the rest of the way because now we mark the variables when outputing the asm so there is no need to > do it while analyzing the function. I have not tested or bootstrapped this yet, Robert could you test this > as I have a test to study for/do? > > Index: passes.c > =============================================================== > ==== > RCS file: /cvs/gcc/gcc/gcc/passes.c,v > retrieving revision 2.17 > diff -u -p -r2.17 passes.c > --- passes.c 30 May 2004 18:32:27 -0000 2.17 > +++ passes.c 4 Jun 2004 01:45:17 -0000 > @@ -370,7 +370,7 @@ rest_of_decl_compilation (tree decl, > || (flag_unit_at_a_time && DECL_INITIAL (decl))) > && !DECL_EXTERNAL (decl)) > { > - if (flag_unit_at_a_time && !cgraph_global_info_ready > + if (!cgraph_global_info_ready > && TREE_CODE (decl) != FUNCTION_DECL && top_level) > cgraph_varpool_finalize_decl (decl); > else > Index: cgraphunit.c > =============================================================== > ==== > RCS file: /cvs/gcc/gcc/gcc/cgraphunit.c,v > retrieving revision 1.64 > diff -u -p -r1.64 cgraphunit.c > --- cgraphunit.c 30 May 2004 18:32:24 -0000 1.64 > +++ cgraphunit.c 4 Jun 2004 01:45:17 -0000 > @@ -395,11 +395,6 @@ record_call_1 (tree *tp, int *walk_subtr > switch (TREE_CODE (t)) > { > case VAR_DECL: > - /* ??? Really, we should mark this decl as *potentially* referenced > - by this function and re-examine whether the decl is actually used > - after rtl has been generated. */ > - if (TREE_STATIC (t)) > - cgraph_varpool_mark_needed_node (cgraph_varpool_node (t)); The mark call here must stay (it is the only place we do the reachability analysis in the case we will drop it here compiler will break at least if we get past the callback from the asm outputting code (I am currently testing patch to do it but it has problems still...) The "needed" in cgraph sense is "conservatively needed" so the Richard comment should be probably placed elsewhere as this is defect of callgraph code affecting both functions and variables. The problem is that at the moment cgraph code is trusting to "needed" flag for variables and output them early instead of later pass really checking whether they are really needed (ie still referenced by the optimized body of function). The reason why it is done this way is that I still rely on backend calling me back when variable is needed as it is quite non-trivial to do the reachability analysis on all kinds of datastructures output by the front-end. I am working on that as we speak, but it will take time (I just hit problems with Java and objective C bypassing the cgraph as I feared) Honza > break; > > case ADDR_EXPR: > > > -- > > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14639 > > ------- You are receiving this mail because: ------- > You are on the CC list for the bug, or are watching someone who is. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14639
next prev parent reply other threads:[~2004-06-04 21:11 UTC|newest] Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-03-18 20:46 [Bug c++/14639] New: Incorrect emission of unused compiler-generated destructor at -O2 austern at apple dot com 2004-03-19 1:33 ` [Bug c++/14639] [3.4/3.5 Regression] [unit-at-a-time] " pinskia at gcc dot gnu dot org 2004-03-19 2:27 ` mmitchel at gcc dot gnu dot org 2004-03-19 4:02 ` austern at apple dot com 2004-03-19 4:44 ` mark at codesourcery dot com 2004-03-21 18:26 ` hubicka at ucw dot cz 2004-03-21 18:26 ` [Bug c++/14639] New: " Jan Hubicka 2004-03-21 19:25 ` Mark Mitchell 2004-03-22 9:44 ` Jan Hubicka 2004-03-22 15:31 ` Mark Mitchell 2004-03-23 9:52 ` Jan Hubicka 2004-03-21 19:25 ` [Bug c++/14639] [3.4/3.5 Regression] [unit-at-a-time] " mark at codesourcery dot com 2004-03-21 23:33 ` steven at gcc dot gnu dot org 2004-03-22 9:44 ` jh at suse dot cz 2004-03-22 15:32 ` mark at codesourcery dot com 2004-03-23 9:52 ` jh at suse dot cz 2004-03-23 21:25 ` mark at codesourcery dot com 2004-03-23 21:26 ` mmitchel at gcc dot gnu dot org 2004-03-23 21:26 ` mmitchel at gcc dot gnu dot org 2004-03-24 18:23 ` hubicka at ucw dot cz 2004-03-24 18:44 ` mark at codesourcery dot com 2004-03-24 23:51 ` hubicka at ucw dot cz 2004-03-26 8:23 ` mark at codesourcery dot com 2004-03-26 10:01 ` hubicka at ucw dot cz 2004-03-28 15:42 ` cvs-commit at gcc dot gnu dot org 2004-03-30 13:46 ` [Bug c++/14639] [3.5 " pinskia at gcc dot gnu dot org 2004-06-03 23:27 ` bowdidge at apple dot com 2004-06-03 23:33 ` pinskia at gcc dot gnu dot org 2004-06-03 23:35 ` pinskia at gcc dot gnu dot org 2004-06-03 23:38 ` mark at codesourcery dot com 2004-06-03 23:38 ` bowdidge at apple dot com 2004-06-03 23:45 ` cvs-commit at gcc dot gnu dot org 2004-06-03 23:46 ` pinskia at gcc dot gnu dot org 2004-06-04 0:37 ` bowdidge at apple dot com 2004-06-04 0:38 ` bowdidge at apple dot com 2004-06-04 0:40 ` pinskia at gcc dot gnu dot org 2004-06-04 0:50 ` [Bug c++/14639] [3.5 Regression] [non-unit-at-a-time] " pinskia at gcc dot gnu dot org 2004-06-04 0:58 ` [Bug c++/14639] [3.5 Regression] [non-unit-at-a-time] Incorrect emission of unused compiler-generated destructor bowdidge at apple dot com 2004-06-04 1:09 ` pinskia at gcc dot gnu dot org 2004-06-04 1:50 ` pinskia at gcc dot gnu dot org 2004-06-04 2:12 ` bowdidge at apple dot com 2004-06-04 2:19 ` pinskia at gcc dot gnu dot org 2004-06-04 2:20 ` pinskia at gcc dot gnu dot org 2004-06-04 2:47 ` pinskia at gcc dot gnu dot org 2004-06-04 3:45 ` bowdidge at apple dot com 2004-06-04 4:53 ` bowdidge at apple dot com 2004-06-04 4:58 ` pinskia at gcc dot gnu dot org 2004-06-04 19:13 ` bowdidge at apple dot com 2004-06-04 21:04 ` hubicka at ucw dot cz 2004-06-04 21:11 ` hubicka at ucw dot cz [this message] 2004-06-04 21:15 ` bowdidge at apple dot com 2004-06-04 21:16 ` hubicka at ucw dot cz 2004-06-04 21:54 ` bowdidge at apple dot com 2004-06-04 22:59 ` bowdidge at apple dot com 2004-06-05 0:58 ` bowdidge at apple dot com 2004-06-05 1:02 ` bowdidge at apple dot com 2004-06-05 1:19 ` pinskia at gcc dot gnu dot org 2004-06-14 23:56 ` pinskia at gcc dot gnu dot org 2004-06-15 3:43 ` pinskia at gcc dot gnu dot org 2004-06-15 20:52 ` pinskia at gcc dot gnu dot org 2004-06-15 20:52 ` cvs-commit at gcc dot gnu dot org 2004-07-29 18:09 ` pinskia at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20040604211149.25644.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).