public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "polacek at redhat dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/54345] jump threading leaks e->aux heap memory Date: Fri, 21 Sep 2012 15:11:00 -0000 [thread overview] Message-ID: <bug-54345-4-Hi1esj9500@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-54345-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54345 --- Comment #3 from Marek Polacek <polacek at redhat dot com> 2012-09-21 15:11:08 UTC --- Hmm. I hoped that something like this will show the leak, but no (it does a lot of threading with -O2--through conditionals, through loop headers and also through latches). But obviously it's not enough. Any ideas, please? extern void bla (void); extern void bar (void); extern void foo (void); void thread_through_condition (int a, int b) { #define E if (a > b) \ bla (); \ else \ bar (); \ if (a <= b) \ foo (); #define E10 E E E E E E E E E E #define E100 E10 E10 E10 E10 E10 E10 E10 E10 E10 E10 #define E1000 E100 E100 E100 E100 E100 E100 E100 E100 E100 E100 #define EE E1000 E1000 EE } void thread_entry_through_header (void) { int i; #define A for (i = 0; i < 42; ++i) \ bla (); #define A10 A A A A A A A A A A #define A100 A10 A10 A10 A10 A10 A10 A10 A10 A10 A10 #define A1000 A100 A100 A100 A100 A100 A100 A100 A100 A100 A100 #define AA A1000 A1000 A1000 A1000 A1000 AA } void thread_latch_through_header (void) { int i = 0; int first; #define L first = 1; i = 0; \ do { \ if (first) \ foo (); \ first = 0; \ bla (); \ } while (i++ < 100); #define L10 L L L L L L L L L L #define L100 L10 L10 L10 L10 L10 L10 L10 L10 L10 L10 #define L1000 L100 L100 L100 L100 L100 L100 L100 L100 L100 L100 L1000 }
next prev parent reply other threads:[~2012-09-21 15:11 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-08-21 12:27 [Bug tree-optimization/54345] New: " rguenth at gcc dot gnu.org 2012-09-20 8:17 ` [Bug tree-optimization/54345] " polacek at redhat dot com 2012-09-20 11:13 ` rguenther at suse dot de 2012-09-21 15:11 ` polacek at redhat dot com [this message] 2012-09-24 8:52 ` rguenther at suse dot de 2012-09-28 13:04 ` mpolacek at gcc dot gnu.org 2021-08-14 22:21 ` pinskia at gcc dot gnu.org 2024-02-20 14:02 ` rguenth at gcc dot gnu.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=bug-54345-4-Hi1esj9500@http.gcc.gnu.org/bugzilla/ \ --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).