[Bug middle-end/78995] A strange copy error caused by O3 optimization

2017-01-05 Thread zhangfei1 at cffex dot com.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78995 --- Comment #4 from feiz --- (In reply to Richard Biener from comment #2) > static inline void > rte_memcpy(void *dst, const void *src, size_t n) > { > uintptr_t dstu = (uintptr_t)dst; > uintptr_t srcu = (uintptr_t)src; > >

[Bug middle-end/78995] A strange copy error caused by O3 optimization

2017-01-05 Thread zhangfei1 at cffex dot com.cn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78995 --- Comment #3 from feiz --- (In reply to Andrew Pinski from comment #1) > Does adding -fno-strict-aliasing fix the problem you are seeing? > > I am suspecting the code is violating C/C++ aliasing rules. Yeah, that's right. I try the

[Bug c++/78995] New: A strange copy error caused by O3 optimization

2017-01-04 Thread zhangfei1 at cffex dot com.cn
++ Assignee: unassigned at gcc dot gnu.org Reporter: zhangfei1 at cffex dot com.cn Target Milestone: --- Created attachment 40464 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40464=edit A demon to reproduce this bug I come across a strange error while us