Bug 28056
Summary: | optimization -O2 does string inlining when it shouldn't | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | nobody+jrlflah |
Component: | glibc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED NOTABUG | QA Contact: | David Lawrence <dkl> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | fweimer |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
URL: | http://divx.euro.ru/ | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2001-02-16 22:51:20 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
nobody+jrlflah
2001-02-16 22:51:16 UTC
There is now way how can glibc know you have passed -fno-builtin unless you tell it (via -D__NO_STRING_INLINES). gcc only defined __OPTIMIZE__ macro if -O1 or higher is present. I don't think it is a good idea if gcc defines a macro for each option passed to it, it would be quite a mess (because it would have to take account default switch values and also would be changing all the time with new options being added and old removed). Well, should it have done the inlining in the first place? According to the documentation stated in both man/info pages, [it] "does not perform loop unrolling or function inlining when you specify '-O2'".... in the case of O3, does it say to turn on the inline functions... In any case, what you said earlier is the workaround I came up with anyways. *shrug* Yes, it should. At -O1 and above glibc attempts to inline functions which are marked as inline (and __strcpy_small is marked as such), at -O3 and above gcc attempts to inline even functions not marked as inline. |