+2017-11-06 Martin Liska <mliska@suse.cz>
+
+ * c-c++-common/cilk-plus/AN/pr57541-2.c (foo1): Return a value
+ for functions with non-void return type, or change type to void,
+ or add -Wno-return-type for test.
+ (foo2): Likewise.
+ * c-c++-common/cilk-plus/AN/pr57541.c (foo): Likewise.
+ (foo1): Likewise.
+ * c-c++-common/cilk-plus/CK/errors.c: Likewise.
+ * c-c++-common/cilk-plus/CK/pr60197.c: Likewise.
+ * c-c++-common/cilk-plus/CK/spawn_in_return.c: Likewise.
+ * c-c++-common/fold-masked-cmp-1.c (test_pic): Likewise.
+ (test_exe): Likewise.
+ * c-c++-common/fold-masked-cmp-2.c (test_exe): Likewise.
+ * g++.dg/cilk-plus/AN/builtin_fn_mutating_tplt.cc (my_func): Likewise.
+ * g++.dg/cilk-plus/CK/pr68997.cc (fa2): Likewise.
+ * g++.dg/eh/sighandle.C (dosegv): Likewise.
+ * g++.dg/ext/vector14.C (foo): Likewise.
+ (main): Likewise.
+ * g++.dg/graphite/pr41305.C: Likewise.
+ * g++.dg/graphite/pr42930.C: Likewise.
+ * g++.dg/opt/pr46640.C (struct QBasicAtomicInt): Likewise.
+ (makeDir): Likewise.
+ * g++.dg/other/i386-8.C (foo): Likewise.
+ * g++.dg/pr45788.C: Likewise.
+ * g++.dg/pr64688.C (at_c): Likewise.
+ * g++.dg/pr65032.C (G::DecodeVorbis): Likewise.
+ * g++.dg/pr71633.C (c3::fn2): Likewise.
+ * g++.dg/stackprotectexplicit2.C (A): Likewise.
+ * g++.old-deja/g++.law/weak.C (main): Likewise.
+
2017-11-06 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/gcov: New directory.
/* { dg-do compile } */
/* { dg-options "-fcilkplus" } */
-int foo1 ()
+void foo1 ()
{
int a;
a = __sec_reduce_add (1); /* { dg-error "Invalid builtin arguments" } */
}
-int foo2 ()
+void foo2 ()
{
int a;
a = __sec_reduce_add (); /* { dg-error "Invalid builtin arguments" } */
int A[10];
-int foo () {
-
+void foo () {
/* C compiler uses the term "undeclared" whereas C++ compiler uses
"not declared". Thus, grepping for declared seem to be the easiest. */
char c = (char)N; /* { dg-error "declared" } */
A[l:s:c];
}
-int foo1 (int N) {
-
+void foo1 (int N) {
char c = (char)N;
short s = (short)N;
A[l:s:c]; /* { dg-error "declared" } */
}
-
-
-
/* { dg-do compile } */
-/* { dg-options "-fcilkplus" } */
+/* { dg-options "-fcilkplus -Wno-return-type" } */
int func_2(void);
/* PR c/60197 */
/* { dg-do compile } */
-/* { dg-options "-fcilkplus" } */
+/* { dg-options "-fcilkplus -Wno-return-type" } */
extern int foo (void);
extern int bar (int);
/* { dg-do compile } */
-/* { dg-options "-fcilkplus" } */
+/* { dg-options "-fcilkplus -Wno-return-type" } */
int main (void)
{
void test_pic (struct bfd_link_info *info)
{
if (bfd_link_pic (info))
- result++;
+ result++;
}
int test_exe (struct bfd_link_info *info)
{
if (bfd_link_executable (info))
result++;
+
+ return 0;
}
/* { dg-final { scan-assembler-times "testn?b" 2 } } */
{
if (bfd_link_executable (info))
result++;
+
+ return 0;
}
/* { dg-final { scan-assembler-times "testn?b" 2 } } */
*x = y;
else
*x = *x;
+
+ return T();
}
template <class T> T my_func (T *x, T y);
};
A2 fa2 () {
- A2 ();
+ return A2 ();
}
struct B1 {
char * dosegv ()
{
* ((volatile int *)0) = 12;
+ return 0;
}
int main ()
#define vector __attribute__((vector_size(16)))
-template<int N> vector signed int foo (vector float value) {}
+template<int N> vector signed int foo (vector float value)
+{
+ vector signed int a;
+ return a;
+}
template<int> void foo (float) {}
float f;
foo<1> (v);
foo<1> (f);
+
+ return 0;
}
// { dg-do compile }
-// { dg-options "-O3 -floop-interchange -Wno-conversion-null" }
+// { dg-options "-O3 -floop-interchange -Wno-conversion-null -Wno-return-type" }
void __throw_bad_alloc ();
-/* { dg-options "-O1 -floop-block" } */
+/* { dg-options "-O1 -floop-block -Wno-return-type" } */
typedef unsigned char byte;
typedef unsigned int uint;
bool deref ()
{
asm volatile ("":"=m" (i), "=qm" (j));
+ return true;
}
};
return false;
i = pos;
}
+
+ return true;
}
__m64 c = _mm_cvtps_pi16 (b);
__builtin_memcpy (y, &c, sizeof (short) * 4);
y[0] = bar (y[0]);
+
+ return 0;
}
// { dg-do compile { target i?86-*-* x86_64-*-* } }
-// { dg-options "-O3 -fwhole-program -msse2" }
+// { dg-options "-O3 -fwhole-program -msse2 -Wno-return-type" }
typedef long unsigned int __darwin_size_t;
typedef __darwin_size_t size_t;
template <typename> struct G;
template <typename, typename, int> struct H;
template <typename Element, typename Layout> struct H<Element, Layout, 3> {};
-template <int, typename E, typename L, int N> unsigned char at_c(H<E, L, N>) {}
+template <int, typename E, typename L, int N> unsigned char at_c(H<E, L, N>)
+{
+ return 0;
+}
template <typename> class I;
template <typename> class J;
template <typename> class K;
mDecodedAudioFrames -= b;
fn2 (b);
}
+
+ return nsresult();
}
int *c3::fn2 () const
{
+ return 0;
}
int *c3::fn3 (int p) const
{
int A[23];
char b[22];
+ return 0;
}
int __attribute__((stack_protect)) B()
}
-/* { dg-final { scan-assembler-times "stack_chk_fail" 2 } } */
\ No newline at end of file
+/* { dg-final { scan-assembler-times "stack_chk_fail" 2 } } */
std::istream x (0);
+int
main () {
x.get();
std::putc(0, 0);
std::fgets(0, 0, 0);
x.get((char*) 0, 0);
+ return 0;
}
+2017-11-06 Martin Liska <mliska@suse.cz>
+
+ * testsuite/libgomp.c++/loop-2.C: Return a value
+ for functions with non-void return type, or change type to void,
+ or add -Wno-return-type for test.
+ * testsuite/libgomp.c++/loop-4.C: Likewise.
+ * testsuite/libgomp.c++/parallel-1.C: Likewise.
+ * testsuite/libgomp.c++/shared-1.C: Likewise.
+ * testsuite/libgomp.c++/single-1.C: Likewise.
+ * testsuite/libgomp.c++/single-2.C: Likewise.
+
2017-10-31 Tom de Vries <tom@codesourcery.com>
* plugin/plugin-hsa.c (HSA_LOG): Remove semicolon after
a[i] = i + 3;
}
+int
main()
{
int i, a[N];
extern "C" void abort (void);
+int
main()
{
int i, a;
return 10;
}
+int
main ()
{
int A = 0;
abort ();
}
+int
main()
{
parallel (1, 2);
extern "C" void abort (void);
+int
main()
{
int i = 0;
int c;
};
+int
main()
{
int i = 0;
+2017-11-06 Martin Liska <mliska@suse.cz>
+
+ * testsuite/27_io/basic_fstream/cons/char/path.cc (main):
+ Return a value for functions with non-void return type,
+ or change type to void, or add -Wno-return-type for test.
+ * testsuite/27_io/basic_ifstream/cons/char/path.cc (main):
+ Likewise.
+ * testsuite/27_io/basic_ofstream/open/char/path.cc (main):
+ Likewise.
+
2017-11-06 Paolo Carlini <paolo.carlini@oracle.com>
* testsuite/20_util/optional/cons/deduction.cc: Avoid -Wreturn-type
{
test01();
test02();
+ return 0;
}
{
test01();
test02();
+ return 0;
}
{
test01();
test02();
+ return 0;
}