Hello! > An issue turned up in our internal 4.6 based testing that has been > fixed on trunk. This patch backports the fix to 4.6. I also have a > small test case that I will add to both 4.6 and 4.7. > > Bootstrapped and checked with x86_64-unknown-linux-gnu. > > 2011-12-07 Teresa Johnson <tejohn...@google.com> > > Backport from mainline: > > 2011-08-05 Uros Bizjak <ubiz...@gmail.com> > > * config/i386/i386.md (*movdi_internal_rex64): Use "!o" constraint > instead of "!m" for operand 0, alternative 4. > (*movdf_internal_rex64): Ditto for operand 0, alernative 6. > > 2011-12-07 Teresa Johnson <tejohn...@google.com> > > * gcc.target/i386/movdi-rex64.c: New.
Index: testsuite/gcc.target/i386/movdi-rex64.c =================================================================== --- testsuite/gcc.target/i386/movdi-rex64.c (revision 0) +++ testsuite/gcc.target/i386/movdi-rex64.c (revision 0) @@ -0,0 +1,11 @@ +/* { dg-do compile { target *-*-linux* } } */ +/* { dg-options "-fPIE -Wwrite-strings" } */ + +#include <string.h> +static __thread char buffer[25]; +const char * error_message (void) +{ +oops: + strcpy (buffer, "Unknown code "); + return 0; +} You don't need #include for compile tests, just use: --cut here-- /* { dg-do compile } */ /* { dg-options "-fPIE" } */ char *strcpy (char *dest, const char *src); static __thread char buffer[25]; const char * error_message (void) { strcpy (buffer, "Unknown code "); return 0; } --cut here-- Also this can be compiled everywhere, not just linux. OK with the testcase above. Thanks, Uros.