public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/48783] New: ARM: kernel compiled at -O2 has a unused reference to __aeabi_uldivmod
@ 2011-04-26 23:46 michael.hope at linaro dot org
  2011-04-27  9:43 ` [Bug c/48783] " ams at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: michael.hope at linaro dot org @ 2011-04-26 23:46 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-08-18 13:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-26 23:46 [Bug c/48783] New: ARM: kernel compiled at -O2 has a unused reference to __aeabi_uldivmod michael.hope at linaro dot org
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

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).