This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
your change to tree-sra.c
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: rth at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 7 Jul 04 10:31:18 EDT
- Subject: your change to tree-sra.c
You deleted the test for DECL_INITIAL being null in sra_walk_modify_expr.
That broke Ada bootstrap for exactly the case that I put it there.
The case is the Ada front end file osint.adb in the Osint._Elabb routine.
Look at the assignment _init = osint__P32s;
osint__p32s is a static that has a zero DECL_INITIAL because it's an
expression that's not a valid initializer. But that does't mean that
it's zero. Indeed you can see it initialized directly above.
How should this be handled?
Do we want to preserve a static with DECL_INITIAL meaning no data?
In that case, I can set it to error_mark_node instead of zero (like
gimplify_decl_expr does) for the variable DECL_INITIAL case and
put back the test for ERROR_MARK here.
But I think it best not to rely on a zero DECL_INITIAL meaning anything.
What do you think?