OSDN Git Service

2010-07-23 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Jul 2010 19:30:37 +0000 (19:30 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 23 Jul 2010 19:30:37 +0000 (19:30 +0000)
PR lto/43071
* gcc.c (LINK_COMMAND_SPEC): Filter out -fcompare-debug
for -flto and -fwhopr.

* g++.dg/lto/20100723-1_0.C: New testcase.

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

gcc/ChangeLog
gcc/gcc.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lto/20100723-1_0.C [new file with mode: 0644]

index 0a566ff..a616cde 100644 (file)
@@ -1,3 +1,9 @@
+2010-07-23  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/43071
+       * gcc.c (LINK_COMMAND_SPEC): Filter out -fcompare-debug
+       for -flto and -fwhopr.
+
 2010-07-23  Kai Tietz  <kai.tietz@onevision.com>
 
        PR target/41943
index 6a0dae5..efaf813 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -752,6 +752,7 @@ proper position among the other output files.  */
     %{static|static-libgcc:-plugin-opt=-pass-through=%(lto_libgcc)}    \
     %{static:-plugin-opt=-pass-through=-lc}    \
     } \
+    %{flto:%<fcompare-debug*} %{fwhopr*:%<fcompare-debug*} \
     %{flto} %{fwhopr*} %l " LINK_PIE_SPEC \
    "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\
     %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\
index f6a20dc..9e8c046 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-23  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/43071
+       * g++.dg/lto/20100723-1_0.C: New testcase.
+
 2010-07-23  H.J. Lu  <hongjiu.lu@intel.com>
 
        * gcc.target/i386/aes-avx-check.h (main): Require OSXSAVE for
diff --git a/gcc/testsuite/g++.dg/lto/20100723-1_0.C b/gcc/testsuite/g++.dg/lto/20100723-1_0.C
new file mode 100644 (file)
index 0000000..e8d3c8c
--- /dev/null
@@ -0,0 +1,12 @@
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-fcompare-debug -flto} {-fcompare-debug -fwhopr}} } */
+
+struct S {
+    virtual void f() { }
+};
+
+int main(int, char *[])
+{
+  S s;
+  return 0;
+}