This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/11514] [tree-ssa] ICE on bootstrap with ada in sem_util.adb --- walk_tree does not know about PLACEHOLDER_EXPR
- From: "steven at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jul 2003 20:16:30 -0000
- Subject: [Bug middle-end/11514] [tree-ssa] ICE on bootstrap with ada in sem_util.adb --- walk_tree does not know about PLACEHOLDER_EXPR
- References: <20030713191541.11514.dhazeghi@yahoo.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11514
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at redhat dot com
Severity|critical |normal
Summary|[tree-ssa] ICE on bootstrap |[tree-ssa] ICE on bootstrap
|with ada in sem_util.c --- |with ada in sem_util.adb ---
|walk_tree does not know |walk_tree does not know
|about PLACEHOLDER_EXPR |about PLACEHOLDER_EXPR
Target Milestone|3.4 |tree-ssa
------- Additional Comments From steven at gcc dot gnu dot org 2003-07-18 20:16 -------
[ Jason, added you to CC: since you're the "GIMPLE man"...
Please correct me if I am wrong somewhere :-) ]
Andrew,
You say in the audit log that PLACEHOLDER_EXPR is GIMPLE, but you seem to miss
an important point: GIMPLE is not the same as the set of tree nodes defined in
tree.def. Your remark that "since PLACEHOLDER_EXPR is defined in tree.def in
the gcc, that makes it gimple" is simply not true.
In fact, PLACEHOLDER_EXPR is used in exactly one front end (Ada) and the only
reason why it is in tree.def is because the Ada front end apparently was allowed
in the past to clutter the language independent tree code set with language
specific ones. As far as I can tell, PLACEHOLDER_EXPRs are necessary in Ada
because they represent information about information that is not available at
the time when Ada expands its native AST to RTL.
Once Ada starts producing functions as trees, it should be perfectly feasible
for them to eliminate PLACEHOLDER_EXPRs in an extra pass before expanding (in
fact, they will have to since the GIMPLE tree would have to represent the full
semantics of the Ada program unit). At that point the PLACEHOLDER_EXPR
definition should be moved out of tree.def and into ada/ada-tree.def
That was the PLACEHOLDER_EXPR discusion....
Now about the actual problem here: Why would Ada end up using walk_tree() in
the first place?
The function walk_tree() is intentended to be used by front ends which produce
functions at trees, or at least partially complete trees. Ada does neither,
instead it produces its own AST and expands to RTL from there directly,
bypassing the functions-as-trees infrastructure. Therefore, the real problem is
that Ada somehow ends up using walk_tree() when it should not. Unfortunately
there is no GDB backtrace in the audit log of this bug, so it's hard to tell
where things go awry.
Dara, could you distill a smaller test case from the problem? Maybe there's
some kind of Ada preprocessor that can collect the relevant information from all
those modules???
I am trying to build Ada now for the first time (never had the appropriate GNAT
until last week when I installed RH9), and if there's a test case we can hunt
this problem down more easily.
Gr.