Hello.
This is first patch that addresses test-suite fallout. All these tests fail in
runtime.
Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
Ready to be installed?
Martin
>From f945460bccf6d54e790bf7c4cacac7cb5b915a28 Mon Sep 17 00:00:00 2001
From: marxin
Date: Tue, 3 Oct 2017 17:28:43 +0200
Subject: [PATCH 2/3] Fix all tests that fail with -sanitize=return.
gcc/testsuite/ChangeLog:
2017-10-18 Martin Liska
* c-c++-common/dfp/call-by-value.c (foo32): Return a default
value of change return type to void.
(foo64): Likewise.
(foo128): Likewise.
* g++.dg/bprob/g++-bprob-1.C: Likewise.
* g++.dg/cpp0x/lambda/lambda-template.C (f): Likewise.
* g++.dg/cpp0x/range-for6.C (foo): Likewise.
* g++.dg/cpp0x/udlit-template.C: Likewise.
* g++.dg/cpp1z/eval-order3.C (struct A): Likewise.
(operator>>): Likewise.
* g++.dg/expr/cond12.C (struct X): Likewise.
(X::operator=): Likewise.
* g++.dg/gcov/gcov-1.C: Likewise.
* g++.dg/gcov/gcov-threads-1.C (ContentionNoDeadlock_thread): Likewise.
* g++.dg/ipa/devirt-21.C: Likewise.
* g++.dg/ipa/devirt-23.C: Likewise.
* g++.dg/ipa/devirt-34.C (t): Likewise.
* g++.dg/missing-return.C: New test. Likewise.
* g++.dg/opt/20050511-1.C (bar): Likewise.
* g++.dg/opt/const3.C (A::foo1): Likewise.
(A::foo2): Likewise.
* g++.dg/opt/pr23299.C (E::c): Likewise.
* g++.dg/other/copy2.C (A::operator=): Likewise.
* g++.dg/overload/addr1.C: Likewise.
* g++.dg/pr48484.C: Likewise.
* g++.dg/tls/thread_local3.C (thread_main): Likewise.
* g++.dg/tls/thread_local3g.C (thread_main): Likewise.
* g++.dg/tls/thread_local5.C (thread_main): Likewise.
* g++.dg/tls/thread_local5g.C (thread_main): Likewise.
* g++.dg/tls/thread_local6.C (thread_main): Likewise.
* g++.dg/tls/thread_local6g.C (thread_main): Likewise.
* g++.dg/torture/pr34850.C (OctetString::operator^=): Likewise.
* g++.dg/tree-prof/pr79259.C (fn2): Likewise.
* g++.dg/tree-ssa/pr33604.C (struct Value): Likewise.
* g++.dg/tree-ssa/pr81408.C (struct p): Likewise.
(av): Likewise.
* g++.dg/warn/string1.C (test): Likewise.
---
gcc/testsuite/c-c++-common/dfp/call-by-value.c | 6 +++---
gcc/testsuite/g++.dg/bprob/g++-bprob-1.C| 2 +-
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template.C | 2 +-
gcc/testsuite/g++.dg/cpp0x/range-for6.C | 2 ++
gcc/testsuite/g++.dg/cpp0x/udlit-template.C | 2 +-
gcc/testsuite/g++.dg/cpp1z/eval-order3.C| 4 ++--
gcc/testsuite/g++.dg/expr/cond12.C | 8 +++-
gcc/testsuite/g++.dg/gcov/gcov-1.C | 2 +-
gcc/testsuite/g++.dg/gcov/gcov-threads-1.C | 2 ++
gcc/testsuite/g++.dg/ipa/devirt-21.C| 2 +-
gcc/testsuite/g++.dg/ipa/devirt-23.C| 2 +-
gcc/testsuite/g++.dg/ipa/devirt-34.C| 2 ++
gcc/testsuite/g++.dg/missing-return.C | 8
gcc/testsuite/g++.dg/opt/20050511-1.C | 2 ++
gcc/testsuite/g++.dg/opt/const3.C | 4 ++--
gcc/testsuite/g++.dg/opt/pr23299.C | 2 ++
gcc/testsuite/g++.dg/other/copy2.C | 10 +++---
gcc/testsuite/g++.dg/overload/addr1.C | 2 +-
gcc/testsuite/g++.dg/pr48484.C | 3 +++
gcc/testsuite/g++.dg/tls/thread_local3.C| 1 +
gcc/testsuite/g++.dg/tls/thread_local3g.C | 1 +
gcc/testsuite/g++.dg/tls/thread_local5.C| 1 +
gcc/testsuite/g++.dg/tls/thread_local5g.C | 1 +
gcc/testsuite/g++.dg/tls/thread_local6.C| 1 +
gcc/testsuite/g++.dg/tls/thread_local6g.C | 1 +
gcc/testsuite/g++.dg/torture/pr34850.C | 6 ++
gcc/testsuite/g++.dg/tree-prof/pr79259.C| 2 ++
gcc/testsuite/g++.dg/tree-ssa/pr33604.C | 2 +-
gcc/testsuite/g++.dg/tree-ssa/pr81408.C | 12 ++--
gcc/testsuite/g++.dg/warn/string1.C | 2 ++
30 files changed, 72 insertions(+), 25 deletions(-)
create mode 100644 gcc/testsuite/g++.dg/missing-return.C
diff --git a/gcc/testsuite/c-c++-common/dfp/call-by-value.c b/gcc/testsuite/c-c++-common/dfp/call-by-value.c
index 74aec53aefb..e7aea3076cf 100644
--- a/gcc/testsuite/c-c++-common/dfp/call-by-value.c
+++ b/gcc/testsuite/c-c++-common/dfp/call-by-value.c
@@ -5,17 +5,17 @@
#include "dfp-dbg.h"
-int foo32 (_Decimal32 z)
+void foo32 (_Decimal32 z)
{
z = z + 1.0df;
}
-int foo64 (_Decimal64 z)
+void foo64 (_Decimal64 z)
{
z = z + 1.0dd;
}
-int foo128 (_Decimal128 z)
+void foo128 (_Decimal128 z)
{
z = z + 1.0dl;
}
diff --git a/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C b/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C
index b1a1de77e98..3aafc06d51d 100644
--- a/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C
+++ b/gcc/testsuite/g++.dg/bprob/g++-bprob-1.C
@@ -35,7 +35,7 @@ test_for2 (int m, int n, int o)
return for_temp; /* count(6) */
}
-int
+void
call_for ()
{
for_val1 += test_for1 (0);
diff --git a/gcc/test