------- Comment #14 from rguenth at gcc dot gnu dot org 2010-09-15 12:31
-------
You are accessing a pointer of type char *s1 via an lvalue of type void *
(*data). Or speaking in C++, you are accessing an object of dynamic type
void * (stored to via *data) by an lvalue of type char * (s1).
Thus your testcase invokes undefined behavior.
That it is miscompiled at -O1 is a bug.
With GCC 4.6 we now assign the same alias-set to all pointers, hiding
this issue.
data_4 is a non-pointer variable,ignoring constraint:*data_4 = s2.1_5
data_4, points-to vars: { }
oops. I will have a look at the points-to bug.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Component|target |tree-optimization
Keywords| |wrong-code
Last reconfirmed|2010-09-15 12:16:05 |2010-09-15 12:31:16
date| |
Summary|GCC 4.5.[01] breaks our ffi |[4.5/4.6 Regression] GCC
|on Linux64. ABI break? |4.5.[01] breaks our ffi on
| |Linux64. ABI break?
Target Milestone|--- |4.5.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45623