public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "141242068 at smail dot nju.edu.cn" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/110154] New: When compiling __builtin_frame_address with a relatively large argument, GCC-trunk takes up a significant amount of time. Date: Wed, 07 Jun 2023 11:03:21 +0000 [thread overview] Message-ID: <bug-110154-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110154 Bug ID: 110154 Summary: When compiling __builtin_frame_address with a relatively large argument, GCC-trunk takes up a significant amount of time. Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: 141242068 at smail dot nju.edu.cn Target Milestone: --- This behavior can be verified on https://gcc.godbolt.org/z/7967MTMrP When compile below program with gcc: ``` void *h() { return __builtin_frame_address(0xFFFFF); } ``` gcc takes over 40 seconds to finish: ``` $ time gcc-14 -c -O2 a.c gcc-14 -c -O2 a.c 43.33s user 1.04s system 99% cpu 44.381 total ``` in contrast, clang immediately returns: ``` $ clang-17 -c -O2 a.c <source>:2:10: error: argument value 1048575 is outside the valid range [0, 65535] 2 | return __builtin_frame_address(0xFFFFF); | ^ ~~~~~~~ 1 error generated. Compiler returned: 1 ```
next reply other threads:[~2023-06-07 11:03 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-06-07 11:03 141242068 at smail dot nju.edu.cn [this message] 2023-06-07 11:09 ` [Bug c/110154] " 141242068 at smail dot nju.edu.cn
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-110154-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).