[PATCH] Fix PR91004
Richard Biener
rguenther@suse.de
Thu Jun 27 09:07:00 GMT 2019
This fixes
FAIL: g++.dg/torture/pr34850.C -O2 (test for excess errors)
FAIL: g++.dg/torture/pr34850.C -O3 -g (test for excess errors)
FAIL: g++.dg/torture/pr34850.C -Os (test for excess errors)
FAIL: g++.dg/torture/pr34850.C -O2 -flto -fno-use-linker-plugin
-flto-partition=none (test for excess errors)
FAIL: g++.dg/torture/pr34850.C -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects (test for excess errors)
by reducing the testcase a bit less.
Tested on x86_64-unknown-linux-gnu, applied to trunk.
2019-06-27 Richard Biener <rguenther@suse.de>
PR testsuite/91004
* g++.dg/torture/pr34850.C: Fix overly reduced testcase.
Index: gcc/testsuite/g++.dg/torture/pr34850.C
===================================================================
--- gcc/testsuite/g++.dg/torture/pr34850.C (revision 272732)
+++ gcc/testsuite/g++.dg/torture/pr34850.C (working copy)
@@ -13,7 +13,8 @@ extern "C" {
extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__, __artificial__))
void * memset (void *__dest, int __ch, size_t __len) throw () {
if (__builtin_constant_p (__len) && __len == 0)
- __warn_memset_zero_len ();
+ __warn_memset_zero_len ();
+ return __dest;
}
}
inline void clear_mem(void* ptr, u32bit n) {
More information about the Gcc-patches
mailing list