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 <rguent...@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) {