This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][tuples][Ada] Disable gcc_asserts in gimple_has_side_effects
On Mon, 21 Jul 2008, Olivier Hainque wrote:
> Olivier Hainque wrote:
> > Need to add a couple of comments before posting.
>
> The idea is to stop gigi's double gimplification of elaboration
> subprograms, which looked suspicious in any case and caused confusion
> as to which sequence of statements is attached in what way.
>
> The first gimplification was done to fetch info on the body emptyness
> before proceeding further with a "regular" compilation process. The
> change slightly adjusts the interfaces to account for elab procs in a
> more integrated manner so they can be processed mostly like regular
> procs, except totally discarded post gimplification if empty.
>
> We probably would benefit from a similar cleanup on mainline. Will
> look into it tomorrow.
>
> * gigi.h (end_subprog_body): New ELAB_P argument, saying if
> this is called for an elab proc to be discarded if empty.
> * utils.c (end_subprog_body): Honor ELAB_P.
> (build_function_stub): Adjust call to end_subprog_body.
> * trans.c (Subprogram_Body_to_gnu): Likewise.
> (gigi): Reorganize processing of elab procs to prevent
> gimplifying twice, using the new end_subprog_body argument.
Thanks. That indeed makes the stage1 ada compiler work. I have
FAIL: gnat.dg/regpat1.adb execution test
=== gnat Summary ===
# of expected passes 515
# of unexpected failures 1
# of expected failures 6
FAIL: c34002a
FAIL: c37213b
FAIL: c37215b
FAIL: c460007
FAIL: cc1221d
FAIL: cxa5a10
FAIL: cxg2012
=== acats Summary ===
# of expected passes 2308
# of unexpected failures 7
*** FAILURES: c34002a c37213b c37215b c460007 cc1221d cxa5a10 cxg2012
Unfortunately none of that is the ICE in EH I get during stage2
building the rts. I'm going to attack the ICEs in the acats suite now,
but I would appreciate help in reducing the EH ICE
/obj/gcc> /space/rguenther/obj/./prev-gcc/xgcc
-B/space/rguenther/obj/./prev-gcc/
-B/usr/local/x86_64-unknown-linux-gnu/bin/ -c -g -O2 -gnatpg -gnata
-gnatwns -nostdinc -I- -I. -Iada -I../../gimple-tuples-branch/gcc/ada
../../gimple-tuples-branch/gcc/ada/exp_attr.adb -o ada/exp_attr.o
+===========================GNAT BUG
DETECTED==============================+
| 4.4.0 20080715 (experimental) (x86_64-unknown-linux-gnu) GCC error:
|
| in find_goto_replacement, at tree-eh.c:460
|
| Error detected around
../../gimple-tuples-branch/gcc/ada/exp_attr.adb:5507|
| Please submit a bug report; see http://gcc.gnu.org/bugs.html.
|
| Use a subject line meaningful to you and us to track the bug.
|
| Include the entire contents of this bug box in the report.
|
| Include the exact gcc or gnatmake command that you entered.
|
| Also include sources listed below in gnatchop format
|
| (concatenated together with no headers between files).
|
+==========================================================================+
(exp_attr.adb is rather large, and delta seems not too useful in
reducing ada testcases).
Btw, I'm going to apply your patch to the tuples branch.
Thanks,
Richard.