[patch] ipa-type-escape improvements

Olga Golovanevsky OLGA@il.ibm.com
Wed Mar 14 07:51:00 GMT 2007


Eric Botcazou <ebotcazou@adacore.com> wrote on 14/03/2007 01:31:18:

> > +2007-03-01  Olga Golovanevsky  <olga@il.ibm.com>
> > +
> > +     * tree.h : Add multiple_of_p declaration.
> > +     * fold-const.c (multiple_of_p): Make multiple_of_p public.
> > +     * ipa-type-escape.c (results_of_malloc): Redundant.
> > +     (visited_stmts): New. Visited stmt for walk_use_def_chains.
> > +     (cast_type): Extended with new members.
> > +     (check_cast): Returns cast_type.
> > +     (cast): New structure for data of walk_use_def_chains.
> > +     (is_malloc_result, is_cast_from_non_pointer_1,
> > +     is_cast_from_non_pointer,
> > +     is_array_access_through_pointer_and_index): New functions.
> > +     (look_for_casts): Returns cast types.
> > +     (check_call): Returns void.
> > +     (okay_pointer_operation): Use support of pointer plus index,
> > +     pointer plus constant and allow all multiplications.
>
> This breaks Ada on x86 with tree checking enabled.  To reproduce, compile
the
> attached reproducer in the objdir directory with:
>
> gcc/xgcc -Bgcc -S -O2 -gnatpg a-numaux.adb -Igcc/ada/rts
>
> +===========================GNAT BUG
DETECTED==============================+
> | 4.3.0 20070313 (experimental) (i586-suse-linux-gnu) GCC error:
|
> | tree check: expected class 'expression', have 'constant' (real_cst)
|
> |     in look_for_casts, at ipa-type-escape.c:1249
|
> | Error detected at a-numaux.adb:37:1
>

Looking into this problem.

Sorry, I have checked for c, c++ on powerpc and x86, but did not check for
Ada.

Olga

> --
> Eric Botcazou



More information about the Gcc-patches mailing list