diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-01 13:56:50 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-01 13:56:50 +0000 |
commit | e064ace631e668b611f853d0d933c3b46d749799 (patch) | |
tree | 3c921df66e3114e29c1039db399133df37bceb08 /gcc | |
parent | b107942a722ea520a963745037d867711566f733 (diff) | |
download | gcc-e064ace631e668b611f853d0d933c3b46d749799.tar.gz |
2010-01-01 Richard Guenther <rguenther@suse.de>
PR middle-end/42559
* builtins.c (get_object_alignment): Do not use DECL_ALIGN
for LABEL_DECLs.
* gcc.c-torture/compile/pr42559.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155554 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/builtins.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr42559.c | 8 |
4 files changed, 21 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index af1a94f7bc9..ecb340a812d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-01-01 Richard Guenther <rguenther@suse.de> + + PR middle-end/42559 + * builtins.c (get_object_alignment): Do not use DECL_ALIGN + for LABEL_DECLs. + 2009-12-31 Jakub Jelinek <jakub@redhat.com> * tree-dump.c (dump_options): Don't set TDF_NOUID for all. diff --git a/gcc/builtins.c b/gcc/builtins.c index 53d74a25b17..d48263c5478 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -325,7 +325,8 @@ get_object_alignment (tree exp, unsigned int align, unsigned int max_align) } if (TREE_CODE (exp) == CONST_DECL) exp = DECL_INITIAL (exp); - if (DECL_P (exp)) + if (DECL_P (exp) + && TREE_CODE (exp) != LABEL_DECL) align = MIN (inner, DECL_ALIGN (exp)); #ifdef CONSTANT_ALIGNMENT else if (CONSTANT_CLASS_P (exp)) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 005b4ac4e9d..b1efc4cb578 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2010-01-01 Richard Guenther <rguenther@suse.de> + + PR middle-end/42559 + * gcc.c-torture/compile/pr42559.c: New testcase. + 2009-12-30 Joseph Myers <joseph@codesourcery.com> PR c/42439 diff --git a/gcc/testsuite/gcc.c-torture/compile/pr42559.c b/gcc/testsuite/gcc.c-torture/compile/pr42559.c new file mode 100644 index 00000000000..25f7fd6e85c --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr42559.c @@ -0,0 +1,8 @@ +void jumpfunc(int copy, void *p) +{ + void *l = &&jumplabel; + if (copy) + __builtin___memcpy_chk (p, l, 128, __builtin_object_size (p, 0)); +jumplabel: + return; +} |