public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug other/45996] New: -falign-functions=X does not work @ 2010-10-13 0:36 us15 at os dot inf.tu-dresden.de 2010-10-13 9:10 ` [Bug other/45996] " rguenth at gcc dot gnu.org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: us15 at os dot inf.tu-dresden.de @ 2010-10-13 0:36 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45996 Summary: -falign-functions=X does not work Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: other AssignedTo: unassigned@gcc.gnu.org ReportedBy: us15@os.inf.tu-dresden.de According to the gcc manpage, specifying -falign-functions=X should align functions on an X-byte boundary. This works correctly with 4.1.2, 4.2.4, and 4.3.5. It does not work with 4.4.5, 4.5.1, 4.6.0 (svn) and will instead cause function aligning to be completely disabled. This can be observed both in generated code and in gcc --help=optimizers ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug other/45996] -falign-functions=X does not work 2010-10-13 0:36 [Bug other/45996] New: -falign-functions=X does not work us15 at os dot inf.tu-dresden.de @ 2010-10-13 9:10 ` rguenth at gcc dot gnu.org 2010-10-13 12:07 ` us15 at os dot inf.tu-dresden.de ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: rguenth at gcc dot gnu.org @ 2010-10-13 9:10 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45996 --- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-13 09:10:05 UTC --- Works for me. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug other/45996] -falign-functions=X does not work 2010-10-13 0:36 [Bug other/45996] New: -falign-functions=X does not work us15 at os dot inf.tu-dresden.de 2010-10-13 9:10 ` [Bug other/45996] " rguenth at gcc dot gnu.org @ 2010-10-13 12:07 ` us15 at os dot inf.tu-dresden.de 2010-10-13 12:20 ` us15 at os dot inf.tu-dresden.de 2012-01-28 19:26 ` [Bug target/45996] " pinskia at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: us15 at os dot inf.tu-dresden.de @ 2010-10-13 12:07 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45996 --- Comment #2 from Udo Steinberg <us15 at os dot inf.tu-dresden.de> 2010-10-13 12:06:32 UTC --- Created attachment 22029 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22029 Testcase gcc -Os -falign-functions=32 foo.cc -o foo nm foo | c++filt | grep func_ 00000000004004f6 T func_bar() 0000000000400500 T func_baz() 00000000004004ec T func_foo() gcc -falign-functions=32 foo.cc -o foo nm foo | c++filt | grep func_ 0000000000400520 T func_bar() 0000000000400540 T func_baz() 0000000000400500 T func_foo() So it seems to be related to the -Os option. My gcc is configured as follows: gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-slackware-linux/4.6.0/lto-wrapper Target: x86_64-slackware-linux Configured with: ../gcc-svn/configure --prefix=/usr --libdir=/usr/lib64 --enable-shared --enable-bootstrap --enable-languages=c,c++ --enable-threads=posix --enable-checking=release --with-system-zlib --disable-libunwind-exceptions --enable-__cxa_atexit --enable-libssp --with-gnu-ld --verbose --disable-multilib --target=x86_64-slackware-linux --build=x86_64-slackware-linux --host=x86_64-slackware-linux Thread model: posix gcc version 4.6.0 20101005 (experimental) (GCC) ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug other/45996] -falign-functions=X does not work 2010-10-13 0:36 [Bug other/45996] New: -falign-functions=X does not work us15 at os dot inf.tu-dresden.de 2010-10-13 9:10 ` [Bug other/45996] " rguenth at gcc dot gnu.org 2010-10-13 12:07 ` us15 at os dot inf.tu-dresden.de @ 2010-10-13 12:20 ` us15 at os dot inf.tu-dresden.de 2012-01-28 19:26 ` [Bug target/45996] " pinskia at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: us15 at os dot inf.tu-dresden.de @ 2010-10-13 12:20 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45996 --- Comment #3 from Udo Steinberg <us15 at os dot inf.tu-dresden.de> 2010-10-13 12:19:57 UTC --- According to the gcc manpage: -Os disables the following optimization flags: -falign-functions -falign-jumps -falign-loops -falign-labels -freorder-blocks -freorder-blocks-and-partition -fprefetch-loop-arrays -ftree-vect-loop-version But this is what actually happens: gcc -Os -Q --help=optimizers | grep align-functions -falign-functions [enabled] gcc -Os -falign-functions -Q --help=optimizers | grep align-functions -falign-functions [enabled] gcc -Os -falign-functions=32 -Q --help=optimizers | grep align-functions -falign-functions [disabled] ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/45996] -falign-functions=X does not work 2010-10-13 0:36 [Bug other/45996] New: -falign-functions=X does not work us15 at os dot inf.tu-dresden.de ` (2 preceding siblings ...) 2010-10-13 12:20 ` us15 at os dot inf.tu-dresden.de @ 2012-01-28 19:26 ` pinskia at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: pinskia at gcc dot gnu.org @ 2012-01-28 19:26 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45996 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target| |x86_64-*-* Component|other |target --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-28 19:17:16 UTC --- This is a target issue overriding it for -Os. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-01-28 19:17 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-10-13 0:36 [Bug other/45996] New: -falign-functions=X does not work us15 at os dot inf.tu-dresden.de 2010-10-13 9:10 ` [Bug other/45996] " rguenth at gcc dot gnu.org 2010-10-13 12:07 ` us15 at os dot inf.tu-dresden.de 2010-10-13 12:20 ` us15 at os dot inf.tu-dresden.de 2012-01-28 19:26 ` [Bug target/45996] " pinskia 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).