From bb60d646c100b8807ed1595ef7252f9a0789e436 Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Mon, 10 Nov 2014 10:07:34 +0000 Subject: [PATCH] align-7.c: Skip for -flto -fno-fat-lto-objects. * c-c++-common/ubsan/align-7.c: Skip for -flto -fno-fat-lto-objects. * c-c++-common/ubsan/align-8.c: Likewise. * g++.dg/ubsan/null-4.C: Likewise. * g++.dg/ubsan/null-5.C: Likewise. From-SVN: r217282 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/c-c++-common/ubsan/align-7.c | 3 ++- gcc/testsuite/c-c++-common/ubsan/align-8.c | 1 + gcc/testsuite/g++.dg/ubsan/null-4.C | 1 + gcc/testsuite/g++.dg/ubsan/null-5.C | 1 + 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8c9df3d70c4..9695c2eece6 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2014-11-10 Marek Polacek + + * c-c++-common/ubsan/align-7.c: Skip for -flto -fno-fat-lto-objects. + * c-c++-common/ubsan/align-8.c: Likewise. + * g++.dg/ubsan/null-4.C: Likewise. + * g++.dg/ubsan/null-5.C: Likewise. + 2014-11-10 Eric Botcazou * gcc.misc-tests/gcov-16.c: New test. diff --git a/gcc/testsuite/c-c++-common/ubsan/align-7.c b/gcc/testsuite/c-c++-common/ubsan/align-7.c index 4a18d8d5f05..68c9135fa42 100644 --- a/gcc/testsuite/c-c++-common/ubsan/align-7.c +++ b/gcc/testsuite/c-c++-common/ubsan/align-7.c @@ -1,6 +1,7 @@ /* Limit this to known non-strict alignment targets. */ /* { dg-do run { target { i?86-*-linux* x86_64-*-linux* } } } */ /* { dg-options "-O -fsanitize=alignment -fno-sanitize-recover=alignment -fdump-tree-sanopt-details" } */ +/* { dg-skip-if "" { *-*-* } { "-flto -fno-fat-lto-objects" } } */ /* { dg-shouldfail "ubsan" } */ struct S { int a; char b; long long c; short d[10]; }; @@ -27,6 +28,6 @@ main () return 0; } -/* { dg-output "\.c:15:\[0-9]*: \[^\n\r]*member access within misaligned address 0x\[0-9a-fA-F]* for type 'struct S', which requires \[48] byte alignment.*" } */ +/* { dg-output "\.c:16:\[0-9]*: \[^\n\r]*member access within misaligned address 0x\[0-9a-fA-F]* for type 'struct S', which requires \[48] byte alignment.*" } */ /* { dg-final { scan-tree-dump-times "Optimizing" 4 "sanopt"} } */ /* { dg-final { cleanup-tree-dump "sanopt" } } */ diff --git a/gcc/testsuite/c-c++-common/ubsan/align-8.c b/gcc/testsuite/c-c++-common/ubsan/align-8.c index b930162d92e..4e43a09ff3a 100644 --- a/gcc/testsuite/c-c++-common/ubsan/align-8.c +++ b/gcc/testsuite/c-c++-common/ubsan/align-8.c @@ -1,6 +1,7 @@ /* Limit this to known non-strict alignment targets. */ /* { dg-do run { target { i?86-*-linux* x86_64-*-linux* } } } */ /* { dg-options "-O -fsanitize=alignment -fsanitize-undefined-trap-on-error -fdump-tree-sanopt-details" } */ +/* { dg-skip-if "" { *-*-* } { "-flto -fno-fat-lto-objects" } } */ /* { dg-shouldfail "ubsan" } */ struct S { int a; char b; long long c; short d[10]; }; diff --git a/gcc/testsuite/g++.dg/ubsan/null-4.C b/gcc/testsuite/g++.dg/ubsan/null-4.C index 9cb04ef2fcc..55944a4712c 100644 --- a/gcc/testsuite/g++.dg/ubsan/null-4.C +++ b/gcc/testsuite/g++.dg/ubsan/null-4.C @@ -1,5 +1,6 @@ // { dg-do run } // { dg-options "-O -fsanitize=null -fno-sanitize-recover=null -fdump-tree-sanopt-details" } +// { dg-skip-if "" { *-*-* } { "-flto -fno-fat-lto-objects" } } // { dg-shouldfail "ubsan" } int diff --git a/gcc/testsuite/g++.dg/ubsan/null-5.C b/gcc/testsuite/g++.dg/ubsan/null-5.C index d8e4a686e53..fbda96ff471 100644 --- a/gcc/testsuite/g++.dg/ubsan/null-5.C +++ b/gcc/testsuite/g++.dg/ubsan/null-5.C @@ -1,5 +1,6 @@ // { dg-do run } // { dg-options "-O -fsanitize=null -fsanitize-undefined-trap-on-error -fdump-tree-sanopt-details" } +// { dg-skip-if "" { *-*-* } { "-flto -fno-fat-lto-objects" } } // { dg-shouldfail "ubsan" } int -- 2.30.2