This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/36602] memset should be optimized into an empty CONSTRUCTOR


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36602

--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #11)
> Created attachment 44963 [details]
> updated patch
> 
> Updated patch.  There are the expected missing warnings plus the two missed
> optimizations noted by the bugs this now depends on.

Current fallout is

FAIL: g++.dg/pr79095-2.C  -std=gnu++14  (test for warnings, line )
FAIL: g++.dg/pr79095-2.C  -std=gnu++17  (test for warnings, line )
FAIL: g++.dg/pr79095-2.C  -std=gnu++98  (test for warnings, line )

FAIL: gcc.dg/builtin-object-size-4.c execution test
FAIL: gcc.dg/builtin-stringop-chk-5.c  (test for warnings, line 72)
FAIL: gcc.dg/builtin-stringop-chk-5.c  (test for warnings, line 75)
FAIL: gcc.dg/builtin-stringop-chk-5.c  (test for warnings, line 78)
FAIL: gcc.dg/builtin-stringop-chk-5.c  (test for warnings, line 81)
FAIL: gcc.dg/builtin-stringop-chk-5.c  (test for warnings, line 84)
FAIL: gcc.dg/builtin-stringop-chk-5.c  (test for warnings, line 87)
FAIL: gcc.dg/builtin-stringop-chk-5.c  (test for warnings, line 92)
FAIL: gcc.dg/builtin-stringop-chk-5.c  (test for warnings, line 95)
FAIL: gcc.dg/builtin-stringop-chk-5.c  (test for warnings, line 98)

FAIL: gcc.dg/tm/memset.c scan-assembler _ITM_memsetW

FAIL: gcc.dg/tree-ssa/calloc-3.c scan-tree-dump-not optimized "malloc"
FAIL: gcc.dg/tree-ssa/calloc-3.c scan-tree-dump-times optimized "calloc" 1
 -> PR87900

FAIL: gcc.dg/tree-ssa/ssa-dse-25.c scan-tree-dump dse1 "memset .&z, 0, 8."
 -> PR87901

and additionally with -m32

FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 101)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 110)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 111)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 117)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 118)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 119)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 153)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 154)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 155)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 156)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 157)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 158)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 46)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 71)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 72)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 73)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 74)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 75)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 76)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 92)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 96)
FAIL: gcc.dg/warn-strlen-no-nul.c  (test for warnings, line 99)
FAIL: gcc.dg/warn-strlen-no-nul.c (internal compiler error)
FAIL: gcc.dg/warn-strlen-no-nul.c (test for excess errors)

(the ICE looks latent, and thus may be the reason for the missed warnings)

FAIL: gcc.dg/tree-ssa/builtin-sprintf-10.c (test for excess errors)


Some of the missed warnings might be cured with careful placement of
check_bounds_or_overlap calls in memset folding like we do for
memcpy folding.  But that's not exactly my area of expertise/interest.

I will test a slightly less aggresive patch now.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]