target/7592: sh-elf-gcc cannot decrease alignment by -falign-functions
hhonda26@ybb.ne.jp
hhonda26@ybb.ne.jp
Tue Aug 13 20:26:00 GMT 2002
>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:
More information about the Gcc-bugs
mailing list