-fstrict-aliasing fixes 5/6: make type system independent of flag_strict_aliasing
Richard Biener
rguenther@suse.de
Wed Dec 9 09:05:00 GMT 2015
On Wed, 9 Dec 2015, Jan Hubicka wrote:
> Hi
> this patch implements the trik for punting if we get too many nested pointers.
> This fixes the ada tstcases. Curiously enough I would like to replace safe_push
> by quick_push but doing so I get weird error about freeing non-heap object
> in the auto_vec desructor...
That's odd but a sign of you doing sth wrong ;) Like somehow
clobbering m_using_auto_storage of the vec.
But of course if you use a maximum length of 8 there
is no need to use a vec<>, just use a fixed bool[8] array
(or an integer mask).
> Bootstraping/regtesting x86_64-linux. Ok if it passes?
Ok.
Thanks,
Richard.
> Honza
>
> * alias.c (get_alias_set): Punt after getting 8 nested pointers.
>
> Index: alias.c
> ===================================================================
> --- alias.c (revision 231439)
> +++ alias.c (working copy)
> @@ -990,6 +990,14 @@ get_alias_set (tree t)
> || TREE_CODE (p) == VECTOR_TYPE;
> p = TREE_TYPE (p))
> {
> + /* Ada supports recusive pointers. Instead of doing recrusion check
> + just give up once the preallocated space of 8 elements is up.
> + In this case just punt to void * alias set. */
> + if (reference.length () == 8)
> + {
> + p = ptr_type_node;
> + break;
> + }
> if (TREE_CODE (p) == REFERENCE_TYPE)
> /* In LTO we want languages that use references to be compatible
> with languages that use pointers. */
More information about the Gcc-patches
mailing list