diff options
author | John David Anglin <dave.anglin@nrc-cnrc.gc.ca> | 2010-07-17 22:51:34 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2010-07-17 22:51:34 +0000 |
commit | 84aa7cea8faf45e9a045ceebe7f117d39301ab57 (patch) | |
tree | efff6b07524227769e74084b91222e57988f34b9 | |
parent | fbd4785962aa6959f7487e3592d4b32033334d78 (diff) | |
download | gcc-84aa7cea8faf45e9a045ceebe7f117d39301ab57.zip gcc-84aa7cea8faf45e9a045ceebe7f117d39301ab57.tar.gz gcc-84aa7cea8faf45e9a045ceebe7f117d39301ab57.tar.bz2 |
re PR target/44805 (FAIL: gcc.c-torture/execute/builtins/strpcpy-2.c execution, at -O1 and above)
PR target/44805
* config/pa/pa.h (CONSTANT_ALIGNMENT): Align strings to BITS_PER_WORD
on all targets.
From-SVN: r162278
-rw-r--r-- | gcc/ChangeLog | 22 | ||||
-rw-r--r-- | gcc/config/pa/pa.h | 5 |
2 files changed, 25 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 77938c3..ddfdc91 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,25 @@ +2010-07-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + PR target/44805 + * config/pa/pa.h (CONSTANT_ALIGNMENT): Align strings to BITS_PER_WORD + on all targets. + +Index: config/pa/pa.h +=================================================================== +--- config/pa/pa.h (revision 162277) ++++ config/pa/pa.h (working copy) +@@ -316,8 +316,9 @@ + #define BIGGEST_ALIGNMENT (2 * BITS_PER_WORD) + + /* Get around hp-ux assembler bug, and make strcpy of constants fast. */ +-#define CONSTANT_ALIGNMENT(CODE, TYPEALIGN) \ +- ((TYPEALIGN) < 32 ? 32 : (TYPEALIGN)) ++#define CONSTANT_ALIGNMENT(EXP, ALIGN) \ ++ (TREE_CODE (EXP) == STRING_CST \ ++ && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) + + /* Make arrays of chars word-aligned for the same reasons. */ + #define DATA_ALIGNMENT(TYPE, ALIGN) \ 2010-07-17 Bernd Schmidt <bernds@codesourcery.com> PR target/42235 diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h index 1bb0f10..73116c5 100644 --- a/gcc/config/pa/pa.h +++ b/gcc/config/pa/pa.h @@ -316,8 +316,9 @@ typedef struct GTY(()) machine_function #define BIGGEST_ALIGNMENT (2 * BITS_PER_WORD) /* Get around hp-ux assembler bug, and make strcpy of constants fast. */ -#define CONSTANT_ALIGNMENT(CODE, TYPEALIGN) \ - ((TYPEALIGN) < 32 ? 32 : (TYPEALIGN)) +#define CONSTANT_ALIGNMENT(EXP, ALIGN) \ + (TREE_CODE (EXP) == STRING_CST \ + && (ALIGN) < BITS_PER_WORD ? BITS_PER_WORD : (ALIGN)) /* Make arrays of chars word-aligned for the same reasons. */ #define DATA_ALIGNMENT(TYPE, ALIGN) \ |