diff options
author | Jan Hubicka <jh@suse.cz> | 2011-10-20 13:33:07 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2011-10-20 11:33:07 +0000 |
commit | c1a7cdbbcca90ad5260bfc543f8c10f3514e76c1 (patch) | |
tree | ac1f85b7c683ced7ae5064497f5dcd5f1d057e50 | |
parent | 1d6d1a9214fb8dd499370701f53579ea51e27e59 (diff) | |
download | gcc-c1a7cdbbcca90ad5260bfc543f8c10f3514e76c1.zip gcc-c1a7cdbbcca90ad5260bfc543f8c10f3514e76c1.tar.gz gcc-c1a7cdbbcca90ad5260bfc543f8c10f3514e76c1.tar.bz2 |
lto.exp (lto_init): Test slib lto and no-liker-plugin path.
* 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.
From-SVN: r180245
-rw-r--r-- | gcc/testsuite/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/torture/pr34850.C | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/sync-1.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/sync-2.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/sync-3.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/builtins/strstr-asm.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/noncompile/920507-1.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/noncompile/invalid_asm.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr36400.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/lib/c-torture.exp | 17 | ||||
-rw-r--r-- | gcc/testsuite/lib/gcc-dg.exp | 17 | ||||
-rw-r--r-- | gcc/testsuite/lib/lto.exp | 27 |
12 files changed, 67 insertions, 16 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 654beee..87d499f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -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. diff --git a/gcc/testsuite/g++.dg/torture/pr34850.C b/gcc/testsuite/g++.dg/torture/pr34850.C index 5e30f1d..c33dbfb 100644 --- a/gcc/testsuite/g++.dg/torture/pr34850.C +++ b/gcc/testsuite/g++.dg/torture/pr34850.C @@ -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; diff --git a/gcc/testsuite/gcc.c-torture/compile/sync-1.c b/gcc/testsuite/gcc.c-torture/compile/sync-1.c index 0354923..1a6a096 100644 --- a/gcc/testsuite/gcc.c-torture/compile/sync-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/sync-1.c @@ -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, diff --git a/gcc/testsuite/gcc.c-torture/compile/sync-2.c b/gcc/testsuite/gcc.c-torture/compile/sync-2.c index bdc84ef..4ca0bb5 100644 --- a/gcc/testsuite/gcc.c-torture/compile/sync-2.c +++ b/gcc/testsuite/gcc.c-torture/compile/sync-2.c @@ -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, diff --git a/gcc/testsuite/gcc.c-torture/compile/sync-3.c b/gcc/testsuite/gcc.c-torture/compile/sync-3.c index 9689eea..d717ef2 100644 --- a/gcc/testsuite/gcc.c-torture/compile/sync-3.c +++ b/gcc/testsuite/gcc.c-torture/compile/sync-3.c @@ -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, diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/strstr-asm.c b/gcc/testsuite/gcc.c-torture/execute/builtins/strstr-asm.c index 3c3e45d..4167841 100644 --- a/gcc/testsuite/gcc.c-torture/execute/builtins/strstr-asm.c +++ b/gcc/testsuite/gcc.c-torture/execute/builtins/strstr-asm.c @@ -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 diff --git a/gcc/testsuite/gcc.dg/noncompile/920507-1.c b/gcc/testsuite/gcc.dg/noncompile/920507-1.c index 7024a5b..22b7b0a 100644 --- a/gcc/testsuite/gcc.dg/noncompile/920507-1.c +++ b/gcc/testsuite/gcc.dg/noncompile/920507-1.c @@ -1,3 +1,4 @@ +/* { dg-options "-ffat-lto-objects" } */ int * x(void) { diff --git a/gcc/testsuite/gcc.dg/noncompile/invalid_asm.c b/gcc/testsuite/gcc.dg/noncompile/invalid_asm.c index 0cb1479..d1d4b36 100644 --- a/gcc/testsuite/gcc.dg/noncompile/invalid_asm.c +++ b/gcc/testsuite/gcc.dg/noncompile/invalid_asm.c @@ -1,3 +1,4 @@ +/* { dg-options "-ffat-lto-objects" } */ asm_invalid_register_name() { asm("":::"this_is_an_invalid_register_name"); /* { dg-error "unknown register" } */ diff --git a/gcc/testsuite/gcc.dg/torture/pr36400.c b/gcc/testsuite/gcc.dg/torture/pr36400.c index bd9f35a..1dedc0a 100644 --- a/gcc/testsuite/gcc.dg/torture/pr36400.c +++ b/gcc/testsuite/gcc.dg/torture/pr36400.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-options "-ffat-lto-objects" } */ struct barstruct { char const* some_string; }; diff --git a/gcc/testsuite/lib/c-torture.exp b/gcc/testsuite/lib/c-torture.exp index 5274e8b..bb92871 100644 --- a/gcc/testsuite/lib/c-torture.exp +++ b/gcc/testsuite/lib/c-torture.exp @@ -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 diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index 6bac368d..e93fb87 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -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 } + ] + } } diff --git a/gcc/testsuite/lib/lto.exp b/gcc/testsuite/lib/lto.exp index f1f3a68..a9ca14b 100644 --- a/gcc/testsuite/lib/lto.exp +++ b/gcc/testsuite/lib/lto.exp @@ -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} \ + ] + } } } |