[PATCH, TREE_LIST removal] remove calls to build_constructor_from_list from coverage.c
Nathan Froyd
froydnj@codesourcery.com
Thu May 13 03:59:00 GMT 2010
On Wed, May 12, 2010 at 03:38:40PM -0700, H.J. Lu wrote:
> On Wed, May 12, 2010 at 8:33 AM, Nathan Froyd <froydnj@codesourcery.com> wrote:
> >> Testing in progress on x86-64-linux-gnu; will commit after testing
> >> finishes.
> >
> > After the tree.c changes downthread and re-testing on
> > x86_64-unknown-linux-gnu, I've committed this patch.
> >
>
> One of your patches caused:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44103
Yes, I screwed up here. I forgot about libjava; sorry about that.
The problem is that build_constructor now sets TREE_CONSTANT to 1 when
passed a 0-length vector of elements. The Java front-end passes
0-length vectors to build_constructor and then proceeds to append things
to the constructor's element vector. Before, TREE_CONSTANT on such
constructors would be 0; it's now 1, and this breaks things.
There are two ways to fix this:
- Modify java-tree.h:START_RECORD_CONSTRUCTOR to set TREE_CONSTANT to 0on
the new constructor; or
- Make build_constructor set TREE_CONSTANT to 0 when handed a 0-length
vector.
I like the second option better, since it's more robust, but I can see
the argument for fixing the Java front-end and avoiding extra checking
for unlikely cases in the middle-end. Any maintainers have an opinion?
-Nathan
More information about the Gcc-patches
mailing list