This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c/6873: Improper Alignment Parameters Emitted by Compiler for .comm Section
- From: mmitchel at qualcomm dot com
- To: gcc-gnats at gcc dot gnu dot org
- Date: 30 May 2002 20:24:30 -0000
- Subject: c/6873: Improper Alignment Parameters Emitted by Compiler for .comm Section
- Reply-to: mmitchel at qualcomm dot com
>Number: 6873
>Category: c
>Synopsis: Improper Alignment Parameters Emitted by Compiler for .comm Section
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu May 30 13:26:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: mmitchel@qualcomm.com
>Release: gcc version 3.1 arm-elf
>Organization:
>Environment:
cross compile, windows nt, cygwin
$ arm-elf-gcc -v
Reading specs from /gnude/lib/gcc-lib/arm-elf/3.1/specs
Configured with: ../src/configure --target=arm-elf --host=i686-pc-cygwin --prefi
x=/gnude --with-local-prefix=/gnude/local --with-gnu-as --with-gnu-ld
Thread model: single
gcc version 3.1
>Description:
The compiler not emitting correct assembly output for following example:
$ more test.c
int i;
int j;
$ arm-elf-gcc -S test.c
$ more test.s
.file "test.c"
.comm i, 4, 32
.comm j, 4, 32
.ident "GCC: (GNU) 3.1"
the third paramater, alignment parameter, to the .comm pseudo op is incorrect.
Incorrect output impacts memory use and requirements of generating small code for embedded targets.
>How-To-Repeat:
>Fix:
In the file gcc\config\arm\elf.h, at line 172, scale the parameter ALIGN by dividing by BITS_PER_UNIT. This is how this macro is implemented for other targets; this may be an undesired omission for this target.
>Release-Note:
>Audit-Trail:
>Unformatted: