[Bug c/53424] dynamic array expressions get wrong sizeof() if pointers to const are involved and the pointers are changed (const is misapplied to the whole expression)
jsm28 at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Dec 3 21:44:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53424
--- Comment #4 from Joseph S. Myers <jsm28 at gcc dot gnu.org> ---
Created attachment 31371
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31371&action=edit
Patch to tree_invariant_p_1
I tried restricting tree_invariant_p_1 as in the attached patch, but while this
fixes the bug it causes regressions
FAIL: gnat.dg/vect1.adb scan-tree-dump-times vect "vectorized 1 loops" 15
and similar for vect2.adb through vect6.adb. It seems Ada vectorization is
somehow relying on certain trees being treated as invariant when similar C
trees aren't invariant; I'd hoped that it wouldn't matter much because the
GIMPLE optimizers should eliminate any unnecessary temporaries.
More information about the Gcc-bugs
mailing list