bool tell_endian() { unsigned x = 1; return *(char*)&x; } optimized on the RTL level only, split out from PR26069.
-- Summary: Runtime endian-ness check is not optimized on the tree level Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: missed-optimization, TREE Severity: enhancement Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43817