public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/105727] New: __builtin_constant_p expansion in LTO
@ 2022-05-25  9:28 marxin at gcc dot gnu.org
  2022-05-25  9:29 ` [Bug lto/105727] " marxin at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 18+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-05-25  9:28 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105727
           Summary: __builtin_constant_p expansion in LTO
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: hubicka at gcc dot gnu.org, marxin at gcc dot gnu.org
  Target Milestone: ---

It's basically follow-up of PR101941 which I noticed during the building of
Linux with LTO w/ KASAN enabled:

$ cat a.c
void memory_is_poisoned(int size) {
  if (__builtin_constant_p(size)) __builtin_abort();
}

$ cat b.c
void memory_is_poisoned(int size);

int main(int argc, char **argv) {
  memory_is_poisoned(128);
  return 0;
}

$ gcc [ab].c -O2 && ./a.out
$ clang [ab].c -flto -O2 && ./a.out
$ gcc [ab].c -flto -O2 && ./a.out
Aborted (core dumped)

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

end of thread, other threads:[~2022-05-26 14:03 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-25  9:28 [Bug lto/105727] New: __builtin_constant_p expansion in LTO marxin at gcc dot gnu.org
2022-05-25  9:29 ` [Bug lto/105727] " marxin at gcc dot gnu.org
2022-05-25  9:31 ` fw at gcc dot gnu.org
2022-05-25  9:35 ` pinskia at gcc dot gnu.org
2022-05-25  9:35 ` jakub at gcc dot gnu.org
2022-05-25 10:26 ` marxin at gcc dot gnu.org
2022-05-25 11:33 ` hubicka at gcc dot gnu.org
2022-05-25 13:15 ` marxin at gcc dot gnu.org
2022-05-25 13:46 ` jakub at gcc dot gnu.org
2022-05-25 13:50 ` marxin at gcc dot gnu.org
2022-05-25 13:54 ` jakub at gcc dot gnu.org
2022-05-25 14:03 ` marxin at gcc dot gnu.org
2022-05-25 16:22   ` Jan Hubicka
2022-05-25 16:22 ` hubicka at kam dot mff.cuni.cz
2022-05-26  9:09 ` marxin at gcc dot gnu.org
2022-05-26  9:12 ` marxin at gcc dot gnu.org
2022-05-26 13:49 ` hubicka at kam dot mff.cuni.cz
2022-05-26 14:03 ` jakub 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).