public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "michael.hope at linaro dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/48783] New: ARM: kernel compiled at -O2 has a unused reference to __aeabi_uldivmod
Date: Tue, 26 Apr 2011 23:46:00 -0000	[thread overview]
Message-ID: <bug-48783-4@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48783

           Summary: ARM: kernel compiled at -O2 has a unused reference to
                    __aeabi_uldivmod
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: michael.hope@linaro.org


Created attachment 24107
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24107
Preprocessed source

When compiled, the attached code refers to the 64 bit unsigned divmod helper
function '__aeabi_uldivmod' even though the function is never called.  This
causes a link error when cross-compiling an ARM Linux 2.6.38 kernel.

To reproduce:
 * Make a arm-linux-gnueabi cross compiler configured with --with-mode=thumb
--with-arch=armv7-a --with-tune=cortex-a9 --with-float=softfp --with-fpu=neon
 * Compile the attached code with 'arm-linux-gnueabi-gcc -O2 -S wm8974.i'
 * See a '.global __aeabi_uldivmod' in the header of wm8974_set_dai_pll

Marking pll_factors() as noinline or putting asm("" : "+r"(source)); before the
call to do_div() works around the problem.


             reply	other threads:[~2011-04-26 23:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-26 23:46 michael.hope at linaro dot org [this message]
2011-04-27  9:43 ` [Bug c/48783] " ams at gcc dot gnu.org
2011-04-27  9:56 ` michael.hope at linaro dot org
2011-04-27 10:13 ` michael.hope at linaro dot org
2011-04-27 11:09 ` ams at gcc dot gnu.org
2011-05-31 22:31 ` ramana at gcc dot gnu.org
2012-01-29  4:51 ` [Bug tree-optimization/48783] ~0ULL % (a / (a & -a)) == 0 is not optimized to false on the tree level pinskia at gcc dot gnu.org
2023-01-30 18:40 ` pinskia at gcc dot gnu.org
2023-01-30 18:43 ` pinskia at gcc dot gnu.org
2023-08-18 13:57 ` jemarch 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-48783-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: link
Be 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).