This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/60429] [4.7/4.8/4.9 Regression] Miscompilation (aliasing) with -finline-functions
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 10 Mar 2014 11:28:58 +0000
- Subject: [Bug middle-end/60429] [4.7/4.8/4.9 Regression] Miscompilation (aliasing) with -finline-functions
- Auto-submitted: auto-generated
- References: <bug-60429-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60429
--- Comment #20 from Richard Biener <rguenth at gcc dot gnu.org> ---
As for what Andrew said, yes, the reinterpret_casts<> look bogus, you should
really change
typedef struct _POINTBLOCK {
int data[200 * sizeof(QPoint)];
QPoint *pts;
struct _POINTBLOCK *next;
} POINTBLOCK;
to
typedef struct _POINTBLOCK {
char data[200 * sizeof(QPoint) * sizeof (int)];
QPoint *pts;
struct _POINTBLOCK *next;
} POINTBLOCK;
but that doesn't change the outcome of the testcase. The reduced testcase
requiring QtCore is valgrind clean for me.
The cause of the issue _is_ what tree PRE does to the function though.
+Replaced AET.next with prephitmp_4 in pPrevAET_44 = AET.next;
in PolygonRegion, with -O2 -fno-ipa-cp. Still most of the pointers are
computed to point to noting by PTA.
Function calls left in that function after inlining are operator delete[],
free, operator new, qBadAlloc and malloc calls.
--param max-fields-for-field-sensitive=0 fixes it as well, so it does point
at a PTA issue. Still looking ...