> To get the data flow yes, but of course the FRE issue is that
> the SSO attribution is lost and we generate wrong code, so actual
> SSO attribution is needed for that.

Sure, but we do not support type punning when it toggles the storage order and 
this testcase does that (admittedly in a more subtle way than most cases, as 
you need to realize that the bit order is implicitly changed for bitfields).

What needs to be prevented is the optimization of:

g.f3 = { 1, 4 };

into

*(char *) &g.f3 = ...

because the SSO attribution is indeed lost.

 > I was mostly questioning SSO on bitfields given bitfield layout might
> be special.  I suppose avoiding padding in S0 might make this more
> portable (so signed/unsigned char for f7/f6).  The testcase fails
> with that as well before the fix.

SSO on bitfields was the motivating case in Ada though.

-- 
Eric Botcazou


Reply via email to