public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "marcus at jet dot franken.de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/49642] New: constant part of a macro not optimized away as expected due to splitter Date: Tue, 05 Jul 2011 12:40:00 -0000 [thread overview] Message-ID: <bug-49642-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49642 Summary: constant part of a macro not optimized away as expected due to splitter Product: gcc Version: tree-ssa Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned@gcc.gnu.org ReportedBy: marcus@jet.franken.de my Linux kernel builds on gcc 4.6 pcc64 fail with: ERROR: ".____ilog2_NaN" [drivers/infiniband/hw/ehca/ib_ehca.ko] undefined! This comes from include/linux/log2.h which uses a large macro with builtin_constant_p() to optimize constant ilog2 calls. I have reduced it to the attached testcase. $ gcc -m64 -O2 -fno-inline-functions-called-once -c ehca_mrmw.i ; objdump -dr ehca_mrmw.o |grep NaN 1a8: R_PPC64_REL24 ____ilog2_NaN 1cc: R_PPC64_REL24 ____ilog2_NaN $ It should not report NaN as that is in a if (__builtin_constant_p(shca->hca_cap_mr_pgsize)) expression.
next reply other threads:[~2011-07-05 12:40 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-07-05 12:40 marcus at jet dot franken.de [this message] 2011-07-05 12:41 ` [Bug c/49642] " marcus at jet dot franken.de 2011-07-05 12:43 ` marcus at jet dot franken.de 2011-07-05 12:59 ` [Bug tree-optimization/49642] " rguenth at gcc dot gnu.org 2012-01-06 17:09 ` wschmidt at gcc dot gnu.org 2012-01-07 0:13 ` wschmidt at gcc dot gnu.org 2012-01-09 12:11 ` rguenth at gcc dot gnu.org 2012-01-09 21:59 ` wschmidt at gcc dot gnu.org 2012-01-11 16:52 ` wschmidt at gcc dot gnu.org 2012-01-11 22:38 ` wschmidt at gcc dot gnu.org 2012-01-18 20:07 ` wschmidt at gcc dot gnu.org 2012-01-18 20:37 ` wschmidt at gcc dot gnu.org 2012-01-18 23:06 ` ebotcazou 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-49642-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).