This is the mail archive of the gcc-patches@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] |
> From: Richard Biener [mailto:richard.guenther@gmail.com] > > "More like" isn't enough to answer this - do you have a testcase? (usually > these end up in undefined-overflow and/or conversion-to-sizetype issues) I do. See attachment. This testcase needs to be compiled with patch 2/3 applied. As you can see from the patch, data[a] and data[a+1] will be converted to offsets by multiplying the index with the element size. Then later, analyzing the ORing, a substraction of these two index will be done. So you have two fold_build and not one. I can't reproduce it with a simple expression such as (a+1)*1 - a*1 so maybe being done in two part is the reason, you know better. Best regards, Thomas
Attachment:
missed_folding.c
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |