aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2009-09-29 12:56:29 +0000
committerRichard Guenther <rguenther@suse.de>2009-09-29 12:56:29 +0000
commit0e31fd885f6379e3110e517ad80e9e5ba2d57176 (patch)
treed733f3b0f3e1b0c40f6f66ad2b9eee9e5964782f
parentcf8ec958e0160352caad6b81ef5569a81710b38e (diff)
2009-09-29 Richard Guenther <rguenther@suse.de>
PR lto/41467 * lto-symtab.c (lto_symtab_compatible): Fix typos. PR lto/40392 * langhooks.c (lhd_begin_section): Do not align the section. * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Handle LTO. PR lto/40754 * lto-elf.c (init_shdr##BITS): Properly specify alignment in bytes. (first_data_block): New static variable. (lto_elf_append_data): Align the first data block in each section. * lib/torture-options.exp: Do not append an empty option. git-svn-id: https://gcc.gnu.org/svn/gcc/branches/lto@152274 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog.lto11
-rw-r--r--gcc/config/rs6000/rs6000.c6
-rw-r--r--gcc/langhooks.c1
-rw-r--r--gcc/lto-symtab.c4
-rw-r--r--gcc/lto/ChangeLog9
-rw-r--r--gcc/lto/lto-elf.c13
-rw-r--r--gcc/testsuite/ChangeLog.lto4
-rw-r--r--gcc/testsuite/lib/torture-options.exp13
8 files changed, 46 insertions, 15 deletions
diff --git a/gcc/ChangeLog.lto b/gcc/ChangeLog.lto
index b1a97d24b52..66e605328c8 100644
--- a/gcc/ChangeLog.lto
+++ b/gcc/ChangeLog.lto
@@ -1,3 +1,14 @@
+2009-09-29 Richard Guenther <rguenther@suse.de>
+
+ PR lto/41467
+ * lto-symtab.c (lto_symtab_compatible): Fix typos.
+
+ PR lto/40392
+ * langhooks.c (lhd_begin_section): Do not align the section.
+
+ * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
+ Handle LTO.
+
2009-09-28 Diego Novillo <dnovillo@google.com>
* Makefile.in (enable_lto): New.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 2de4ffad046..f6bcbac0e4d 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -20052,8 +20052,10 @@ rs6000_output_function_epilogue (FILE *file,
use language_string.
C is 0. Fortran is 1. Pascal is 2. Ada is 3. C++ is 9.
Java is 13. Objective-C is 14. Objective-C++ isn't assigned
- a number, so for now use 9. */
- if (! strcmp (language_string, "GNU C"))
+ a number, so for now use 9. LTO isn't assigned a number either,
+ so for now use 0. */
+ if (! strcmp (language_string, "GNU C")
+ || ! strcmp (language_string, "GNU GIMPLE"))
i = 0;
else if (! strcmp (language_string, "GNU F77")
|| ! strcmp (language_string, "GNU Fortran"))
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index 16b017c71ec..633caf58c53 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -608,7 +608,6 @@ lhd_begin_section (const char *name)
/* Create a new section and switch to it. */
section = get_section (name, SECTION_DEBUG, NULL);
switch_to_section (section);
- assemble_align (POINTER_SIZE);
}
diff --git a/gcc/lto-symtab.c b/gcc/lto-symtab.c
index 3890f474a53..90a200fc735 100644
--- a/gcc/lto-symtab.c
+++ b/gcc/lto-symtab.c
@@ -300,13 +300,13 @@ lto_symtab_compatible (tree old_decl, tree new_decl)
if (tree_int_cst_compare (TYPE_SIZE (old_type),
TYPE_SIZE (new_type)) < 0)
{
- TREE_TYPE (old_type) = new_type;
+ TREE_TYPE (old_decl) = new_type;
DECL_SIZE (old_decl) = DECL_SIZE (new_decl);
DECL_SIZE_UNIT (old_decl) = DECL_SIZE_UNIT (new_decl);
}
else
{
- TREE_TYPE (new_type) = old_type;
+ TREE_TYPE (new_decl) = old_type;
DECL_SIZE (new_decl) = DECL_SIZE (old_decl);
DECL_SIZE_UNIT (new_decl) = DECL_SIZE_UNIT (old_decl);
}
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index fcd311fbf34..77377e288c2 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,12 @@
+2009-09-29 Richard Guenther <rguenther@suse.de>
+
+ PR lto/40754
+ * lto-elf.c (init_shdr##BITS): Properly specify alignment
+ in bytes.
+ (first_data_block): New static variable.
+ (lto_elf_append_data): Align the first data block in each
+ section.
+
2009-09-28 Diego Novillo <dnovillo@google.com>
* lto-lang.c: Tidy. Remove stale FIXME lto markers.
diff --git a/gcc/lto/lto-elf.c b/gcc/lto/lto-elf.c
index f89b59089f1..4c275809127 100644
--- a/gcc/lto/lto-elf.c
+++ b/gcc/lto/lto-elf.c
@@ -236,7 +236,7 @@ init_shdr##BITS (Elf_Scn *scn, size_t sh_name, size_t sh_type) \
\
shdr->sh_name = sh_name; \
shdr->sh_type = sh_type; \
- shdr->sh_addralign = POINTER_SIZE; \
+ shdr->sh_addralign = POINTER_SIZE / BITS_PER_UNIT; \
shdr->sh_flags = 0; \
shdr->sh_entsize = 0; \
}
@@ -244,6 +244,7 @@ init_shdr##BITS (Elf_Scn *scn, size_t sh_name, size_t sh_type) \
DEFINE_INIT_SHDR (32)
DEFINE_INIT_SHDR (64)
+static bool first_data_block;
/* Begin a new ELF section named NAME with type TYPE in the current output
file. TYPE is an SHT_* macro from the libelf headers. */
@@ -286,6 +287,8 @@ lto_elf_begin_section_with_type (const char *name, size_t type)
default:
gcc_unreachable ();
}
+
+ first_data_block = true;
}
@@ -318,7 +321,13 @@ lto_elf_append_data (const void *data, size_t len, void *block)
if (!elf_data)
fatal_error ("elf_newdata() failed: %s.", elf_errmsg(-1));
- elf_data->d_align = 1;
+ if (first_data_block)
+ {
+ elf_data->d_align = POINTER_SIZE / BITS_PER_UNIT;
+ first_data_block = false;
+ }
+ else
+ elf_data->d_align = 1;
elf_data->d_buf = CONST_CAST (void *, data);
elf_data->d_off = 0LL;
elf_data->d_size = len;
diff --git a/gcc/testsuite/ChangeLog.lto b/gcc/testsuite/ChangeLog.lto
index db307e75a43..a4d63d6091f 100644
--- a/gcc/testsuite/ChangeLog.lto
+++ b/gcc/testsuite/ChangeLog.lto
@@ -1,3 +1,7 @@
+2009-09-29 Richard Guenther <rguenther@suse.de>
+
+ * lib/torture-options.exp: Do not append an empty option.
+
2009-09-28 Diego Novillo <dnovillo@google.com>
* gcc.c-torture/execute/builtins/builtins.exp: Do not use
diff --git a/gcc/testsuite/lib/torture-options.exp b/gcc/testsuite/lib/torture-options.exp
index 5649674639d..f3b3e22948b 100644
--- a/gcc/testsuite/lib/torture-options.exp
+++ b/gcc/testsuite/lib/torture-options.exp
@@ -61,12 +61,6 @@ proc set-torture-options { args } {
set other_list [list {}]
}
- if { [llength $args] > 2 } {
- set append_list [lindex $args 2]
- } else {
- set append_list [list {}]
- }
-
set torture_with_loops ""
set torture_without_loops ""
foreach torture_opts $torture_list {
@@ -80,8 +74,11 @@ proc set-torture-options { args } {
}
}
- append torture_with_loops " $append_list"
- append torture_without_loops " $append_list"
+ if { [llength $args] > 2 } {
+ set append_list [lindex $args 2]
+ append torture_with_loops " $append_list"
+ append torture_without_loops " $append_list"
+ }
}
# Finish up after using a set of torture options.