This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix gcc.target/i386/large-size-array-3.c failure
- From: Hui-May Chang <hm dot chang at apple dot com>
- To: Eric Christopher <echristo at apple dot com>
- Cc: Uros Bizjak <ubizjak at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 22 Jun 2007 13:02:46 -0700
- Subject: Re: Fix gcc.target/i386/large-size-array-3.c failure
- References: <467C256A.5010908@gmail.com> <7008AAF5-E340-44D8-AFB4-6EA6365338E3@apple.com>
On Jun 22, 2007, at 12:46 PM, Eric Christopher wrote:
On Jun 22, 2007, at 12:39 PM, Uros Bizjak wrote:
Hello!
This test case has wrong dg-do directive and compile flags. The
testcase is valid on all lp64 x86 targets, as -mcmodel is valid
everywhere for these targets. Patch was tested by running the
testcase and committed as obvious.
BTW: I can't find the discussion or an approval for the patch that
introduced this test case. If it was committed as obvious, then
IMO it must be at least tested on all targets and double-checked
for correctness.
The patch was approved in February and tested on our linux box. I am
not familiar with lp64 and -mcmodel, will be more cautious next time.
It was apparently approved a while back, but I can't see anything
either.
I also don't think it should have both values in scanning either
since the larger size isn't correct unless you pad the variable
size which probably isn't correct either.
-eric
The reason why both values exist is line 1883 will be executed if
ASM_OUTPUT_ALIGNED_COMMON is not defined.
1869 static bool
1870 emit_common (tree decl ATTRIBUTE_UNUSED,
1871 const char *name ATTRIBUTE_UNUSED,
1872 unsigned HOST_WIDE_INT size ATTRIBUTE_UNUSED,
1873 unsigned HOST_WIDE_INT rounded ATTRIBUTE_UNUSED)
1874 {
1875 #if defined ASM_OUTPUT_ALIGNED_DECL_COMMON
1876 ASM_OUTPUT_ALIGNED_DECL_COMMON (asm_out_file, decl, name,
1877 size, DECL_ALIGN (decl));
1878 return true;
1879 #elif defined ASM_OUTPUT_ALIGNED_COMMON
1880 ASM_OUTPUT_ALIGNED_COMMON (asm_out_file, name, size,
DECL_ALIGN (decl));
1881 return true;
1882 #else
1883 ASM_OUTPUT_COMMON (asm_out_file, name, size, rounded);
1884 return false;
1885 #endif