This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/32575] [4.2/4.3 regression] With -ftree-vrp miscompiles a single line of code in SQLite
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Aug 2007 15:58:29 -0000
- Subject: [Bug c/32575] [4.2/4.3 regression] With -ftree-vrp miscompiles a single line of code in SQLite
- References: <bug-32575-14787@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from jakub at gcc dot gnu dot org 2007-08-28 15:58 -------
if (a == 0) a = bar (); isn't necessary either.
salias has:
# BLOCK 2 freq:10000
# PRED: ENTRY [100.0%] (fallthru,exec)
# VUSE <qD.2026_12(D), SMT.25D.2079_13(D)> { qD.2026 SMT.25D.2079 }
D.2027_3 = foo ();
pD.2025_4 = (struct S *) D.2027_3;
if (pD.2025_4 == 0B)
goto <bb 3>;
else
goto <bb 4>;
# SUCC: 3 [7.3%] (true,exec) 4 [92.7%] (false,exec)
# BLOCK 3 freq:735
# PRED: 2 [7.3%] (true,exec)
# qD.2026_15 = VDEF <qD.2026_12(D)>
# SMT.25D.2079_16 = VDEF <SMT.25D.2079_13(D)>
# SMT.26D.2080_17 = VDEF <SMT.26D.2080_14(D)> { qD.2026 SMT.25D.2079
SMT.26D.2080 }
__builtin_memset (&qD.2026, 0, 24);
# SUCC: 4 [100.0%] (fallthru,exec)
# BLOCK 4 freq:10000
# PRED: 2 [92.7%] (false,exec) 3 [100.0%] (fallthru,exec)
# qD.2026_11 = PHI <qD.2026_12(D)(2), qD.2026_15(3)>
# pD.2025_1 = PHI <pD.2025_4(2), &qD.2026(3)>
# qD.2026_18 = VDEF <qD.2026_11> { qD.2026 }
pD.2025_1->s1D.2008 = aD.2021_6(D);
# qD.2026_19 = VDEF <qD.2026_18> { qD.2026 }
pD.2025_1->s2D.2009 = bD.2022_7(D);
Shouldn't the VDEFs be a PHI of some SMT and qD? pD.2025_1 can either be what
foo returned, or it can point to the automatic variable q.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.2.2 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32575