]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR lto/52400 (lto1: ICE with extern on static linkage)
authorRichard Guenther <rguenther@suse.de>
Tue, 28 Feb 2012 09:13:40 +0000 (09:13 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 28 Feb 2012 09:13:40 +0000 (09:13 +0000)
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.

* g++.dg/lto/pr52400_0.C: New testcase.

From-SVN: r184618

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

index 825d268e290e5a46654fd2191a4dceb630e69e2a..6d074db096cc24a9879b2f8daba50a2c942bd76e 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 2ec6c44906ea6f1695d844dfb7b74cdac0353624..f267d2a4ec4182813879888465e6b1b30bb59215 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 d1365a0e19d2229f7a9a71a2e56aa61d5676f646..ee4e5f34adea96b0005cf597a0a273a738ac0050 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);
+}