This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] ipa-type-escape improvements
- From: Olga Golovanevsky <OLGA at il dot ibm dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: "Daniel Berlin" <dberlin at dberlin dot org>, gcc-patches at gcc dot gnu dot org, Jan Hubicka <jh at suse dot cz>, "Kenneth Zadeck" <zadeck at naturalbridge dot com>
- Date: Wed, 14 Mar 2007 09:00:04 +0200
- Subject: Re: [patch] ipa-type-escape improvements
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