Bug 43817 - Runtime endian-ness check is not optimized on the tree level
Summary: Runtime endian-ness check is not optimized on the tree level
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.6.0
: P3 enhancement
Target Milestone: 4.7.0
Assignee: Not yet assigned to anyone
URL:
Keywords: missed-optimization, TREE
Depends on:
Blocks:
 
Reported: 2010-04-20 13:06 UTC by Richard Biener
Modified: 2016-08-09 08:31 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work: 4.7.0
Known to fail: 4.6.4
Last reconfirmed: 2010-04-20 18:01:51


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Biener 2010-04-20 13:06:30 UTC
bool tell_endian() {
  unsigned x = 1;
  return *(char*)&x;
}

optimized on the RTL level only, split out from PR26069.
Comment 1 Andrew Pinski 2010-04-20 18:01:51 UTC
Confirmed.
Comment 2 Andrew Pinski 2016-08-06 23:53:13 UTC
I think this has been fixed in either 6.1.0 or on the trunk.
Comment 3 Richard Biener 2016-08-09 08:31:34 UTC
4.7 actually.