diff options
author | Dave Korn <dave.korn.cygwin@gmail.com> | 2009-05-28 10:48:35 +0000 |
---|---|---|
committer | Dave Korn <davek@gcc.gnu.org> | 2009-05-28 10:48:35 +0000 |
commit | 233215fe7cedf3cfa908f11c9543e1f7f10e3283 (patch) | |
tree | 2b465942c117a52260a5dba92c2e0be1abe405aa /gcc/doc | |
parent | b10ca522327a88f62bdbf6b0ee587498d2bab8a1 (diff) | |
download | gcc-233215fe7cedf3cfa908f11c9543e1f7f10e3283.zip gcc-233215fe7cedf3cfa908f11c9543e1f7f10e3283.tar.gz gcc-233215fe7cedf3cfa908f11c9543e1f7f10e3283.tar.bz2 |
re PR target/37216 ([cygming] Invalid alignment for SSE store to .comm data generated with -O3)
gcc/ChangeLog:
2009-05-28 Dave Korn <dave.korn.cygwin@gmail.com>
PR target/37216
* configure.ac (HAVE_GAS_ALIGNED_COMM): Add autoconf test and
macro definition for support of three-operand format aligned
.comm directive in assembler on cygwin/pe/mingw target OS.
* configure: Regenerate.
* config.in: Regenerate.
* config/i386/winnt.c (i386_pe_asm_output_aligned_decl_common): Use
aligned form of .comm directive if -mpe-aligned-commons is in effect.
* config/i386/cygming.opt (-mpe-aligned-commons): Add new option.
* doc/invoke.texi (-mpe-aligned-commons): Document new target option.
* doc/tm.texi (ASM_OUTPUT_COMMON): Document zero size commons.
gcc/testsuite/ChangeLog:
2009-05-28 Dave Korn <dave.korn.cygwin@gmail.com>
Uros Bizjak <ubizjak@gmail.com>
Danny Smith <dansmister@gmail.com>
PR target/37216
* lib/target-supports.exp (check_effective_target_pe_aligned_commons):
New function.
* gcc.target/i386/pr37216.c: New test source file.
* gcc.dg/compat/struct-layout-1_generate.c (dg_options[]): No longer
use -fno-common for testing Cygwin and MinGW targets.
Co-Authored-By: Danny Smith <dansmister@gmail.com>
Co-Authored-By: Uros Bizjak <ubizjak@gmail.com>
From-SVN: r147950
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/invoke.texi | 9 | ||||
-rw-r--r-- | gcc/doc/tm.texi | 9 |
2 files changed, 17 insertions, 1 deletions
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index db9df63..6a79566 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -15678,6 +15678,15 @@ This option is available for Cygwin and MinGW targets. It specifies that a GUI application is to be generated by instructing the linker to set the PE header subsystem type appropriately. + +@item -mpe-aligned-commons +@opindex mpe-aligned-commons +This option is available for Cygwin and MinGW targets. It +specifies that the GNU extension to the PE file format that +permits the correct alignment of COMMON variables should be +used when generating code. It will be enabled by default if +GCC detects that the target assembler found during configuration +supports the feature. @end table See also under @ref{i386 and x86-64 Options} for standard options. diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index 552d5c9..bc15583 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -7384,7 +7384,14 @@ outputting a single uninitialized variable. A C statement (sans semicolon) to output to the stdio stream @var{stream} the assembler definition of a common-label named @var{name} whose size is @var{size} bytes. The variable @var{rounded} -is the size rounded up to whatever alignment the caller wants. +is the size rounded up to whatever alignment the caller wants. It is +possible that @var{size} may be zero, for instance if a struct with no +other member than a zero-length array is defined. In this case, the +backend must output a symbol definition that allocates at least one +byte, both so that the address of the resulting object does not compare +equal to any other, and because some object formats cannot even express +the concept of a zero-sized common symbol, as that is how they represent +an ordinary undefined external. Use the expression @code{assemble_name (@var{stream}, @var{name})} to output the name itself; before and after that, output the additional |