OSDN Git Service

* lib/lto.exp (lto_init): Test slib lto and no-liker-plugin path.
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Oct 2011 11:33:07 +0000 (11:33 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 20 Oct 2011 11:33:07 +0000 (11:33 +0000)
* lto/gcc-dg.exp (check_effective_target_lto): Likewise.
* lto/c-torture.exp: Likewise.
* execute/bultins/strstr-asm.c: Force fat LTO.
* gcc.c-torture/compile/sync-1.c: Likewise.
* gcc.c-torture/compile/sync-1.c: Likewise.
* gcc.c-torture/compile/sync-3.c: Likewise.
* gcc.dg/noncompile/invalid_asm.c: Likewise.
* gcc.dg/noncompile/920507-1.c: Likewise.
* gcc.dg/torture/pr36400.c: Likewise.
* g++.dg/torture/pr34850.C: Likewise.

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

12 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/torture/pr34850.C
gcc/testsuite/gcc.c-torture/compile/sync-1.c
gcc/testsuite/gcc.c-torture/compile/sync-2.c
gcc/testsuite/gcc.c-torture/compile/sync-3.c
gcc/testsuite/gcc.c-torture/execute/builtins/strstr-asm.c
gcc/testsuite/gcc.dg/noncompile/920507-1.c
gcc/testsuite/gcc.dg/noncompile/invalid_asm.c
gcc/testsuite/gcc.dg/torture/pr36400.c
gcc/testsuite/lib/c-torture.exp
gcc/testsuite/lib/gcc-dg.exp
gcc/testsuite/lib/lto.exp

index 654beee..87d499f 100644 (file)
@@ -1,3 +1,17 @@
+2011-10-19  Jan Hubicka  <jh@suse.cz>
+
+       * lib/lto.exp (lto_init): Test slib lto and no-liker-plugin path.
+       * lto/gcc-dg.exp (check_effective_target_lto): Likewise.
+       * lto/c-torture.exp: Likewise.
+       * execute/bultins/strstr-asm.c: Force fat LTO.
+       * gcc.c-torture/compile/sync-1.c: Likewise.
+       * gcc.c-torture/compile/sync-1.c: Likewise.
+       * gcc.c-torture/compile/sync-3.c: Likewise.
+       * gcc.dg/noncompile/invalid_asm.c: Likewise.
+       * gcc.dg/noncompile/920507-1.c: Likewise.
+       * gcc.dg/torture/pr36400.c: Likewise.
+       * g++.dg/torture/pr34850.C: Likewise.
+
 2011-10-20  Eric Botcazou  <ebotcazou@adacore.com>
 
        * gnat.dg/source_ref1.adb: New test.
index 5e30f1d..c33dbfb 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
+/* { dg-options "-ffat-lto-objects" } */
 
 typedef unsigned char uint8_t;
 typedef unsigned int uint32_t;
index 0354923..1a6a096 100644 (file)
@@ -1,5 +1,6 @@
 /* { dg-message "note: '__sync_fetch_and_nand' changed semantics in GCC 4.4" "" { target *-*-* } 0 } */
 /* { dg-message "note: '__sync_nand_and_fetch' changed semantics in GCC 4.4" "" { target *-*-* } 0 } */
+/* { dg-options "-ffat-lto-objects" } */
 
 /* Validate that each of the __sync builtins compiles.  This won't 
    necessarily link, since the target might not support the builtin,
index bdc84ef..4ca0bb5 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-message "note: '__sync_fetch_and_nand' changed semantics in GCC 4.4" "" { target *-*-* } 0 } */
+/* { dg-options "-ffat-lto-objects" } */
 
 /* Validate that each of the __sync builtins compiles.  This won't 
    necessarily link, since the target might not support the builtin,
index 9689eea..d717ef2 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-message "note: '__sync_fetch_and_nand' changed semantics in GCC 4.4" "" { target *-*-* } 0 } */
+/* { dg-options "-ffat-lto-objects" } */
 
 /* Validate that each of the __sync builtins compiles.  This won't 
    necessarily link, since the target might not support the builtin,
index 3c3e45d..4167841 100644 (file)
@@ -2,6 +2,7 @@
 
    Ensure all expected transformations of builtin strstr occur and
    perform correctly in presence of redirect.  */
+/* { dg-options "-ffat-lto-objects" } */
 
 #define ASMNAME(cname)  ASMNAME2 (__USER_LABEL_PREFIX__, cname)
 #define ASMNAME2(prefix, cname) STRING (prefix) cname
index 0cb1479..d1d4b36 100644 (file)
@@ -1,3 +1,4 @@
+/* { dg-options "-ffat-lto-objects" } */
 asm_invalid_register_name()
 {
   asm("":::"this_is_an_invalid_register_name");        /* { dg-error "unknown register" } */
index bd9f35a..1dedc0a 100644 (file)
@@ -1,4 +1,5 @@
 /* { dg-do compile } */
+/* { dg-options "-ffat-lto-objects" } */
 
 struct barstruct { char const* some_string; };
 
index 5274e8b..bb92871 100644 (file)
@@ -52,10 +52,19 @@ if [info exists ADDITIONAL_TORTURE_OPTIONS] {
 
 set LTO_TORTURE_OPTIONS ""
 if [check_effective_target_lto] {
-    set LTO_TORTURE_OPTIONS [list \
-       { -O2 -flto -flto-partition=none } \
-       { -O2 -flto }
-    ]
+    # When having plugin test both slim and fat LTO and plugin/nonplugin
+    # path.
+    if [check_linker_plugin_available] {
+      set LTO_TORTURE_OPTIONS [list \
+         { -O2 -flto -fno-use-linker-plugin -flto-partition=none } \
+         { -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects }
+      ]
+    } else {
+      set LTO_TORTURE_OPTIONS [list \
+         { -O2 -flto -flto-partition=none } \
+         { -O2 -flto }
+      ]
+    }
 }
 
 global GCC_UNDER_TEST
index 6bac368..e93fb87 100644 (file)
@@ -69,10 +69,19 @@ if [info exists ADDITIONAL_TORTURE_OPTIONS] {
 
 set LTO_TORTURE_OPTIONS ""
 if [check_effective_target_lto] {
-    set LTO_TORTURE_OPTIONS [list \
-       { -O2 -flto -flto-partition=none } \
-       { -O2 -flto }
-    ]
+    # When having plugin test both slim and fat LTO and plugin/nonplugin
+    # path.
+    if [check_linker_plugin_available] {
+      set LTO_TORTURE_OPTIONS [list \
+         { -O2 -flto -fno-use-linker-plugin -flto-partition=none } \
+         { -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects }
+      ]
+    } else {
+      set LTO_TORTURE_OPTIONS [list \
+         { -O2 -flto -flto-partition=none } \
+         { -O2 -flto }
+      ]
+    }
 }
 
 
index f1f3a68..a9ca14b 100644 (file)
@@ -66,14 +66,25 @@ proc lto_init { args } {
     # You can put this in the environment before site.exp is written or
     # add it to site.exp directly.
     if ![info exists LTO_OPTIONS] {
-       set LTO_OPTIONS [list   \
-           {-O0 -flto -flto-partition=none } \
-           {-O2 -flto -flto-partition=none } \
-           {-O0 -flto -flto-partition=1to1 } \
-           {-O2 -flto -flto-partition=1to1 } \
-           {-O0 -flto}         \
-           {-O2 -flto}         \
-       ]
+        if [check_linker_plugin_available] {
+         set LTO_OPTIONS [list \
+             {-O0 -flto -flto-partition=none -fuse-linker-plugin} \
+             {-O2 -flto -flto-partition=none -fuse-linker-plugin -fno-fat-lto-objects } \
+             {-O0 -flto -flto-partition=1to1 -fno-use-linker-plugin } \
+             {-O2 -flto -flto-partition=1to1 -fno-use-linker-plugin } \
+             {-O0 -flto -fuse-linker-plugin -fno-fat-lto-objects }     \
+             {-O2 -flto -fuse-linker-plugin}   \
+         ]
+       } else {
+         set LTO_OPTIONS [list \
+             {-O0 -flto -flto-partition=none } \
+             {-O2 -flto -flto-partition=none } \
+             {-O0 -flto -flto-partition=1to1 } \
+             {-O2 -flto -flto-partition=1to1 } \
+             {-O0 -flto }      \
+             {-O2 -flto}               \
+         ]
+       }
     }
 }