This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/21450] [3.4/4.0/4.1 regression] -fstrict-aliasing causes miscompilation
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 May 2005 22:19:39 -0000
- Subject: [Bug rtl-optimization/21450] [3.4/4.0/4.1 regression] -fstrict-aliasing causes miscompilation
- References: <20050507215612.21450.belyshev@depni.sinp.msu.ru>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-07 22:19 -------
Confirmed, here is a testcase which makes it fail with 3.4.0:
extern "C" void abort (void) throw();
struct T {};
struct U : T {};
int size = 2;
int main ()
{
struct T * * pretmp3;
struct U * p;
int i;
int size1 = size;
p =(U*)1 ;
pretmp3 = (struct T * *) &p;
i = 0;
L0:;
*pretmp3 = 0;
if (p != 0) abort();
i = i + 1;
if (i != 2) goto L0;
L4:;
return 0;
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
GCC target triplet| |i686-pc-linux-gnu
Known to fail| |3.2.3 3.3.4 3.4.2 4.0.0
| |4.1.0
Known to work| |2.95.3 3.0.4
Last reconfirmed|0000-00-00 00:00:00 |2005-05-07 22:19:39
date| |
Summary|[4.0/4.1 regression] - |[3.4/4.0/4.1 regression] -
|fstrict-aliasing causes |fstrict-aliasing causes
|miscompilation |miscompilation
Target Milestone|--- |3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21450