public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/63569] New: [5.0 Regression] Wrong code with volatile and ICF Date: Fri, 17 Oct 2014 06:49:00 -0000 [thread overview] Message-ID: <bug-63569-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63569 Bug ID: 63569 Summary: [5.0 Regression] Wrong code with volatile and ICF Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Take: static int f(int t, int *a) __attribute__((noinline)); static int g(int t, volatile int *a) __attribute__((noinline)); static int g(int t, volatile int *a) { int i; int tt = 0; for(i=0;i<t;i++) tt += *a; return tt; } static int f(int t, int *a) { int i; int tt = 0; for(i=0;i<t;i++) tt += *a; return tt; } int h(int t, int *a) { return f(t, a) + g(t, a); } --- CUT --- The order of f and g are important. The .icf dump has: Semantic equality hit:f->g Assembler symbol names:f->g Which is incorrect as they are not semantic equivalent as one you can load from a only once while the other you need to load a each time through the loop.
next reply other threads:[~2014-10-17 6:49 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-10-17 6:49 pinskia at gcc dot gnu.org [this message] 2014-10-17 6:51 ` [Bug tree-optimization/63569] " pinskia at gcc dot gnu.org 2014-10-17 22:28 ` pinskia at gcc dot gnu.org 2014-11-11 6:42 ` trippels at gcc dot gnu.org 2014-11-21 8:01 ` trippels at gcc dot gnu.org 2014-11-21 11:26 ` [Bug ipa/63569] " marxin at gcc dot gnu.org 2014-11-21 12:48 ` marxin at gcc dot gnu.org 2014-11-26 23:50 ` pinskia at gcc dot gnu.org 2014-12-02 13:26 ` pinskia at gcc dot gnu.org 2014-12-12 10:30 ` trippels at gcc dot gnu.org 2014-12-19 12:41 ` marxin 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-63569-4@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).