public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/105253] New: __popcountdi2 calls generated in kernel code with gcc12
@ 2022-04-13  5:28 raj.khem at gmail dot com
  2022-04-13  5:37 ` [Bug middle-end/105253] " pinskia at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: raj.khem at gmail dot com @ 2022-04-13  5:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105253

            Bug ID: 105253
           Summary: __popcountdi2 calls generated in kernel code with
                    gcc12
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: raj.khem at gmail dot com
  Target Milestone: ---

Created attachment 52794
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52794&action=edit
test case

gcc 12 when using -march=core2 generates __popcountdi2 calls which go
unresolved in kernel and build fails. When I use -march=corei7 then the calls
are optimized away.
Interestingly, gcc-11 did not emit these calls even with -march=core2,

a similar error is seen when compiling kernel for arm

arm-yoe-linux-gnueabi-ld.bfd: arch/arm/probes/kprobes/actions-common.o: in
function `simulate_ldm1stm1':
actions-common.c:(.kprobes.text+0x74): undefined reference to `__popcountsi2'

Attached testcase demonstrates the behaviour on x86_64. Is it expected behavior
in gcc 12 ?

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

end of thread, other threads:[~2022-04-15  7:48 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-13  5:28 [Bug c/105253] New: __popcountdi2 calls generated in kernel code with gcc12 raj.khem at gmail dot com
2022-04-13  5:37 ` [Bug middle-end/105253] " pinskia at gcc dot gnu.org
2022-04-13  5:40 ` pinskia at gcc dot gnu.org
2022-04-13  5:47 ` raj.khem at gmail dot com
2022-04-13  6:40 ` pinskia at gcc dot gnu.org
2022-04-13  7:00 ` rguenth at gcc dot gnu.org
2022-04-13  8:52 ` jakub at gcc dot gnu.org
2022-04-13  9:15 ` rguenth at gcc dot gnu.org
2022-04-13  9:27 ` jakub at gcc dot gnu.org
2022-04-13  9:39 ` jakub at gcc dot gnu.org
2022-04-13  9:52 ` jakub at gcc dot gnu.org
2022-04-13 10:01 ` jakub at gcc dot gnu.org
2022-04-13 10:02 ` jakub at gcc dot gnu.org
2022-04-13 12:22 ` rguenth at gcc dot gnu.org
2022-04-13 12:31 ` rguenth at gcc dot gnu.org
2022-04-13 13:45 ` cvs-commit at gcc dot gnu.org
2022-04-13 13:46 ` jakub at gcc dot gnu.org
2022-04-15  7:48 ` crazylht at gmail dot com

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