Bug 19783 - Aliasing optimisation bug
Summary: Aliasing optimisation bug
Status: RESOLVED DUPLICATE of bug 19786
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.0.0
: P2 critical
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-06 08:19 UTC by Sylvain Pion
Modified: 2005-07-23 22:49 UTC (History)
2 users (show)

See Also:
Host: i686-pc-linux-gnu
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sylvain Pion 2005-02-06 08:19:47 UTC
The attached C++ program triggers an assertion violation when compiled with -O2
(it should not).
The assertion is not triggered when adding -fno-strict-aliasing, or when removing
-O2.  It is also working when slight changes to the program are made (see comments
in the source).  It is the smallest version of the program which allowed me to
reproduce the bug, but I did not try to look into the <vector> header.

It might be an aliasing bug in <vector>, I don't know.
Note that g++ 3.4 works fine.
Comment 1 Andrew Pinski 2005-02-06 18:34:52 UTC

*** This bug has been marked as a duplicate of 19786 ***