re PR lto/43373 (-fwhopr -fuse-linker-plugin ICE compressed stream data error)
authorRichard Guenther <rguenther@suse.de>
Thu, 22 Jul 2010 12:54:44 +0000 (12:54 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 22 Jul 2010 12:54:44 +0000 (12:54 +0000)
2010-07-22  Richard Guenther  <rguenther@suse.de>

* lib/target-supports-dg.exp (dg-require-linker-plugin): New proc.
* lib/target-supports.exp (check_linker_plugin_available): Likewise.

PR lto/43373
* gcc.dg/lto/20100722-1_0.c: New testcase.

From-SVN: r162414

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/lto/20100722-1_0.c [new file with mode: 0644]
gcc/testsuite/lib/target-supports-dg.exp
gcc/testsuite/lib/target-supports.exp

index 7bffd78e1dcbd826e80123932bcade2d77e7a224..ebfd2575b0061232f32a4b4981e32207573423fc 100644 (file)
@@ -1,3 +1,11 @@
+2010-07-22  Richard Guenther  <rguenther@suse.de>
+
+       * lib/target-supports-dg.exp (dg-require-linker-plugin): New proc.
+       * lib/target-supports.exp (check_linker_plugin_available): Likewise.
+
+       PR lto/43373
+       * gcc.dg/lto/20100722-1_0.c: New testcase.
+
 2010-07-22  Martin Jambor  <mjambor@suse.cz>
 
        PR tree-optimization/44891
diff --git a/gcc/testsuite/gcc.dg/lto/20100722-1_0.c b/gcc/testsuite/gcc.dg/lto/20100722-1_0.c
new file mode 100644 (file)
index 0000000..a859e7e
--- /dev/null
@@ -0,0 +1,6 @@
+/* { dg-lto-do run } */
+/* { dg-require-lto-plugin "" } */
+/* { dg-extra-ld-options "-fuse-linker-plugin" } */
+
+int main() { return 0; }
+
index e742d750c762d5823a6a3237996f7325cc7965b9..02f0bc19f57dddf07b0eca7a1f35a9b2ec52a5c3 100644 (file)
@@ -207,6 +207,14 @@ proc dg-require-host-local { args } {
     }
 }
 
+proc dg-require-linker-plugin { args } {
+    set linker_plugin_available [ check_linker_plugin_available ]
+    if { $linker_plugin_available == 0 } {
+       upvar dg-do-what dg-do-what
+       set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
+    }
+}
+
 # Add any target-specific flags needed for accessing the given list
 # of features.  This must come after all dg-options.
 
index 0378f807d63e7d5936faa3706c182cfd8e35d216..9c1369a35931d1aba3c809330f5c6f11a7528bc3 100644 (file)
@@ -886,6 +886,12 @@ proc check_effective_target_static_libgfortran { } {
     } "-static"]
 }
 
+proc check_linker_plugin_available { } {
+  return [check_no_compiler_messages_nocache linker_plugin executable {
+     int main() { return 0; }
+  } "-flto -fuse-linker-plugin"]
+}
+
 # Return 1 if the target supports executing 750CL paired-single instructions, 0
 # otherwise.  Cache the result.