This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[lto] Add another test
- From: Diego Novillo <dnovillo at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 9 Nov 2008 20:29:36 -0500
- Subject: [lto] Add another test
This used to ICE lto/lto.c:lto_fixup_state when compiled with
-flto-single. Not anymore.
* g++.dg/lto/20081109-2_0.C: New.
Index: g++.dg/lto/20081109-2_0.C
===================================================================
--- g++.dg/lto/20081109-2_0.C (revision 0)
+++ g++.dg/lto/20081109-2_0.C (revision 0)
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+extern void func(int);
+
+struct Foo
+{
+ void bar() {
+ static int local;
+ func(local);
+ }
+ void baz();
+};
+
+void Foo::baz() {
+ bar();
+}