From: Richard Guenther Date: Tue, 28 Feb 2012 09:13:40 +0000 (+0000) Subject: re PR lto/52400 (lto1: ICE with extern on static linkage) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=95510497873486319b680dfedf017415a2bb8173;p=gcc.git re PR lto/52400 (lto1: ICE with extern on static linkage) 2012-02-28 Richard Guenther PR lto/52400 * lto.c (lto_register_function_decl_in_symtab): Do not register a reverse renamed decl mapping. * g++.dg/lto/pr52400_0.C: New testcase. From-SVN: r184618 --- diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 825d268e290..6d074db096c 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,9 @@ +2012-02-28 Richard Guenther + + PR lto/52400 + * lto.c (lto_register_function_decl_in_symtab): Do not register + a reverse renamed decl mapping. + 2012-01-06 Jakub Jelinek PR lto/51774 diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 2ec6c44906e..f267d2a4ec4 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -689,13 +689,6 @@ lto_register_function_decl_in_symtab (struct data_in *data_in, tree decl) lto_record_renamed_decl (data_in->file_data, IDENTIFIER_POINTER (old_assembler_name), IDENTIFIER_POINTER (new_assembler_name)); - - /* Also register the reverse mapping so that we can find the - new name given to an existing assembler name (used when - restoring alias pairs in input_constructors_or_inits. */ - lto_record_renamed_decl (data_in->file_data, - IDENTIFIER_POINTER (new_assembler_name), - IDENTIFIER_POINTER (old_assembler_name)); } } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d1365a0e19d..ee4e5f34ade 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-02-28 Richard Guenther + + PR lto/52400 + * g++.dg/lto/pr52400_0.C: New testcase. + 2012-02-28 Georg-Johann Lay * gcc.target/avr/torture/builtins-1.c: New test. diff --git a/gcc/testsuite/g++.dg/lto/pr52400_0.C b/gcc/testsuite/g++.dg/lto/pr52400_0.C new file mode 100644 index 00000000000..b1a7e6634c7 --- /dev/null +++ b/gcc/testsuite/g++.dg/lto/pr52400_0.C @@ -0,0 +1,18 @@ +// { dg-lto-do run } + +extern "C" { + static int f4(int); + +int f5(int a) { + extern int f4(int); + return f4(a); +} +} + +int f4(int a) { return 4+a; } + +int main(int argc, char *argv[]) +{ + int a = f4(1); + return !(a == 5); +}