This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug driver/11368] New: -falign-* has no effect on i386


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11368

           Summary: -falign-* has no effect on i386
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: driver
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-linux
  GCC host triplet: i386-linux
GCC target triplet: i386-linux

[forwarded from http://bugs.debian.org/198269]

Compiling the following program (b.c) on i386

int f(int a) {
	int i = 0;

	if (a > 3)
		goto end;
	return 3;

end:
	return g(0);
}

with "gcc -O2 -falign-jumps=0 -S" produces

	.file	"b.c"
	.text
	.p2align 2,,3
.globl f
	.type	f, @function
f:
	pushl	%ebp
	movl	%esp, %ebp
	cmpl	$3, 8(%ebp)
	jle	.L4
.L3:
	movl	$0, 8(%ebp)
	leave
	jmp	g
	.p2align 2,,3
.L4:
	movl	$3, %eax
	leave
	ret
	.size	f, .-f
	.ident	"GCC: (GNU) 3.3 (Debian)"

As you can see, -falign-jumps=0 was ignored.  -malign-jumps=0 does
work on the other hand.  This applies to all -falign-* options.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]