This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Don't emit zero-size locals on Tru64 UNIX (PR target/22224)
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 16 Apr 2010 17:52:23 +0200
- Subject: Don't emit zero-size locals on Tru64 UNIX (PR target/22224)
As described in the PR, some libjava test cases and one in the gcc
testsuite fail on Tru64 UNIX:
FAIL: gcc.c-torture/execute/pr23324.c compilation, -O0
UNRESOLVED: gcc.c-torture/execute/pr23324.c execution, -O0
output is:
as1: Warning: /tmp//ccAZQsKv.s, line 1: Length of .lcomm was less than 1: vv6
as1: Warning: /tmp//ccAZQsKv.s, line 1: Length of .lcomm was less than 1: xv7
I've followed the lead of alpha/elf.h (ASM_OUTPUT_ALIGNED_LOCAL) and
emit a size of 1 if SIZE == 0. I'll still investigate what the
underlying problem is, though.
Will commit to mainline and 4.5 branch after the weekend unless someone
objects.
Bootstrapped on alpha-dec-osf5.1b without regressions, fixes several
libjava testsuite failures and the one above.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2010-04-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR target/22224
* config/alpha/osf5.h (ASM_OUTPUT_LOCAL): Redefine.
diff -r 2d0d7273f8b2 gcc/config/alpha/osf5.h
--- a/gcc/config/alpha/osf5.h Thu Apr 08 13:27:29 2010 +0200
+++ b/gcc/config/alpha/osf5.h Fri Apr 16 17:19:12 2010 +0200
@@ -238,6 +238,14 @@
? (((GLOBAL) ? DW_EH_PE_indirect : 0) | DW_EH_PE_pcrel | DW_EH_PE_sdata4) \
: DW_EH_PE_aligned)
+/* The Tru64 UNIX assembler warns on .lcomm with SIZE 0, so use 1 in that
+ case. */
+#undef ASM_OUTPUT_LOCAL
+#define ASM_OUTPUT_LOCAL(FILE, NAME, SIZE,ROUNDED) \
+( fputs ("\t.lcomm ", (FILE)), \
+ assemble_name ((FILE), (NAME)), \
+ fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED"\n", (SIZE) ? (SIZE) : 1))
+
/* This is how we tell the assembler that a symbol is weak. */
#define ASM_OUTPUT_WEAK_ALIAS(FILE, NAME, VALUE) \