diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 922cc52a0a75..76c44a6ffba1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2018-12-06 Richard Biener + + PR middle-end/63184 + * c-c++-common/pr19807-2.c: Try link only on x86, add xfailed + optimized dump scanning. + * c-c++-common/pr19807-3.c: Likewise. + 2018-12-06 Paolo Carlini * g++.dg/parse/bitfield6b.C: New. diff --git a/gcc/testsuite/c-c++-common/pr19807-2.c b/gcc/testsuite/c-c++-common/pr19807-2.c index c8b2a57d6541..d2c010140d0a 100644 --- a/gcc/testsuite/c-c++-common/pr19807-2.c +++ b/gcc/testsuite/c-c++-common/pr19807-2.c @@ -1,5 +1,6 @@ -/* { dg-do link } */ -/* { dg-options "-O" } */ +/* Some targets can optimize this on RTL. */ +/* { dg-do link { target { x86_64-*-* i?86-*-* } } } */ +/* { dg-options "-O -fdump-tree-optimized" } */ extern void link_error(void); int i; @@ -10,3 +11,5 @@ int main() link_error(); return 0; } + +/* { dg-final { scan-tree-dump-not "link_error" "optimized" { xfail *-*-* } } } */ diff --git a/gcc/testsuite/c-c++-common/pr19807-3.c b/gcc/testsuite/c-c++-common/pr19807-3.c index d882bd369bff..bb7f98277259 100644 --- a/gcc/testsuite/c-c++-common/pr19807-3.c +++ b/gcc/testsuite/c-c++-common/pr19807-3.c @@ -1,5 +1,6 @@ -/* { dg-do link } */ -/* { dg-options "-O" } */ +/* Some targets can optimize this on RTL. */ +/* { dg-do link { target { x86_64-*-* i?86-*-* } } } */ +/* { dg-options "-O -fdump-tree-optimized" } */ extern void link_error(void); int i; @@ -10,3 +11,5 @@ int main() link_error(); return 0; } + +/* { dg-final { scan-tree-dump-not "link_error" "optimized" { xfail *-*-* } } } */