This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/60429] [4.7/4.8/4.9 Regression] Miscompilation (aliasing) with -finline-functions


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 ...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]