Bug 47936 - [4.6 Regression] Missed optimization with LTO due to strict aliasing issues
Summary: [4.6 Regression] Missed optimization with LTO due to strict aliasing issues
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: lto (show other bugs)
Version: 4.6.0
: P5 normal
Target Milestone: 4.7.0
Assignee: Not yet assigned to anyone
URL:
Keywords: alias, lto, missed-optimization
Depends on:
Blocks:
 
Reported: 2011-03-01 07:11 UTC by Dmitry Gorbachev
Modified: 2013-04-12 16:17 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work: 4.5.3, 4.7.3, 4.8.0
Known to fail: 4.6.4
Last reconfirmed: 2011-03-01 10:28:51


Attachments
Testcase (113 bytes, text/plain)
2011-03-01 07:11 UTC, Dmitry Gorbachev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Gorbachev 2011-03-01 07:11:13 UTC
Created attachment 23497 [details]
Testcase

This seems to be different from bug 47924.
Comment 1 Richard Biener 2011-03-01 10:28:51 UTC
Confirmed.  This one happens because we merge struct S and struct T for
TBAA purposes (they get the same TYPE_CANONICAL).

This is by design to allow cross-language (and slightly invalid) code to
not fall over TBAA issues too easily.
Comment 2 Richard Biener 2011-03-01 10:30:12 UTC
IMHO WONTFIX.  Eventually we could add a -fvery-strict-aliasing, but it's
probably not worth it.

Leaving open to eventually document this fact somewhere.
Comment 3 Richard Biener 2011-03-03 11:25:22 UTC
But downgrading priority.
Comment 4 Jakub Jelinek 2011-03-25 19:52:53 UTC
GCC 4.6.0 is being released, adjusting target milestone.
Comment 5 Jakub Jelinek 2011-06-27 12:33:06 UTC
GCC 4.6.1 is being released.
Comment 6 Dmitry Gorbachev 2011-07-14 23:19:23 UTC
It seems to work in 4.7.
Comment 7 Jakub Jelinek 2011-10-26 17:13:50 UTC
GCC 4.6.2 is being released.
Comment 8 Jakub Jelinek 2012-03-01 14:39:04 UTC
GCC 4.6.3 is being released.
Comment 9 Dmitry Gorbachev 2013-02-07 00:40:06 UTC
I can't reproduce it with GCC 4.7.3 and 4.8.0.
Comment 10 Jakub Jelinek 2013-04-12 16:17:53 UTC
The 4.6 branch has been closed, fixed in GCC 4.7.0.