public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/110154] New: When compiling __builtin_frame_address with a relatively large argument, GCC-trunk takes up a significant amount of time.
@ 2023-06-07 11:03 141242068 at smail dot nju.edu.cn
  2023-06-07 11:09 ` [Bug c/110154] " 141242068 at smail dot nju.edu.cn
  0 siblings, 1 reply; 2+ messages in thread
From: 141242068 at smail dot nju.edu.cn @ 2023-06-07 11:03 UTC (permalink / raw)
  To: gcc-bugs

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
```

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

* [Bug c/110154] When compiling __builtin_frame_address with a relatively large argument, GCC-trunk takes up a significant amount of time.
  2023-06-07 11:03 [Bug c/110154] New: When compiling __builtin_frame_address with a relatively large argument, GCC-trunk takes up a significant amount of time 141242068 at smail dot nju.edu.cn
@ 2023-06-07 11:09 ` 141242068 at smail dot nju.edu.cn
  0 siblings, 0 replies; 2+ messages in thread
From: 141242068 at smail dot nju.edu.cn @ 2023-06-07 11:09 UTC (permalink / raw)
  To: gcc-bugs

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

wierton <141242068 at smail dot nju.edu.cn> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #1 from wierton <141242068 at smail dot nju.edu.cn> ---
not a bug

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

end of thread, other threads:[~2023-06-07 11:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-07 11:03 [Bug c/110154] New: When compiling __builtin_frame_address with a relatively large argument, GCC-trunk takes up a significant amount of time 141242068 at smail dot nju.edu.cn
2023-06-07 11:09 ` [Bug c/110154] " 141242068 at smail dot nju.edu.cn

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