public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* target/7592: sh-elf-gcc cannot decrease alignment by -falign-functions
@ 2002-08-14  4:36 hhonda26
  0 siblings, 0 replies; only message in thread
From: hhonda26 @ 2002-08-14  4:36 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7592
>Category:       target
>Synopsis:       sh-elf-gcc cannot decrease alignment by -falign-functions
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 13 20:26:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Honda Hiroki (hhonda26@ybb.ne.jp)
>Release:        3.1.1
>Organization:
>Environment:
host=i686-pc-linux-gnu (Linux 2.4.5-3)
target=sh-elf
>Description:
[sh-elf-gcc -m3] aligns functions to 16 bytes by default.
[sh-elf-gcc -m3 -falign-functions=32] aligns functions to 32 bytes, as expected.
[sh-elf-gcc -m3 -falign-functions=4] should align functions to 4 bytes.
However, [sh-elf-gcc -m3 -falign-functions=4] align functions to 16 bytes.

Similar problems exist for other -falign-xxx options (not presented here).
>How-To-Repeat:
[/tmp]% sh-elf-gcc -v
Reading specs from /tmp/experiment/lib/gcc-lib/sh-elf/3.1.1/specs
Configured with: ../gcc-3.1.1/configure --prefix=/tmp/experiment --target=sh-elf --with-gnu-as --with-gnu-ld --disable-nls --enable-languages=c
Thread model: single
gcc version 3.1.1
[/tmp]% echo 'int foo(void) { return 1; }' > ttt.c
[/tmp]% echo 'int bar(void) { return 2; }' >> ttt.c
[/tmp]% sh-elf-gcc -m3 -S -o - ttt.c | grep align
        .align 4
        .align 4
[/tmp]% sh-elf-gcc -m3 -S -o - ttt.c -falign-functions=32 | grep align
        .align 4
        .align 5
        .align 4
        .align 5
[/tmp]% sh-elf-gcc -m3 -S -o - ttt.c -falign-functions=4 | grep align
        .align 4
        .align 4
>Fix:
The following article may help.

http://gcc.gnu.org/ml/gcc-patches/2002-08/msg00878.html
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-08-14  3:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-14  4:36 target/7592: sh-elf-gcc cannot decrease alignment by -falign-functions hhonda26

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