OSDN Git Service

2012-02-28 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Feb 2012 09:13:40 +0000 (09:13 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Feb 2012 09:13:40 +0000 (09:13 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184618 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/lto/ChangeLog
gcc/lto/lto.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lto/pr52400_0.C [new file with mode: 0644]

index 825d268..6d074db 100644 (file)
@@ -1,3 +1,9 @@
+2012-02-28  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/52400
+       * lto.c (lto_register_function_decl_in_symtab): Do not register
+       a reverse renamed decl mapping.
+
 2012-01-06  Jakub Jelinek  <jakub@redhat.com>
 
        PR lto/51774
index 2ec6c44..f267d2a 100644 (file)
@@ -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));
        }
     }
 
index d1365a0..ee4e5f3 100644 (file)
@@ -1,3 +1,8 @@
+2012-02-28  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/52400
+       * g++.dg/lto/pr52400_0.C: New testcase.
+
 2012-02-28  Georg-Johann Lay  <avr@gjlay.de>
 
        * 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 (file)
index 0000000..b1a7e66
--- /dev/null
@@ -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);
+}