OSDN Git Service

2010-07-22 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 22 Jul 2010 12:54:44 +0000 (12:54 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 22 Jul 2010 12:54:44 +0000 (12:54 +0000)
* 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.

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

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 7bffd78..ebfd257 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 e742d75..02f0bc1 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 0378f80..9c1369a 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.