This is the mail archive of the
mailing list for the GCC project.
fold_builtin changes tree
- From: "Paulo J. Matos" <paulo at matos-sorge dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 19 Mar 2012 17:50:28 +0000 (UTC)
- Subject: fold_builtin changes tree
I have builtin __function_size(foobar) that is applied to functions.
This should be folded to a symbol foobar@size.
The problem comes when I mark in the fold_builtin function in my backend
that DECL_PRESERVE(foobar) = 1;
The reason I need to do this is so that foobar is not removed if we
happen to use __function_size(foobar) since I will need foobar during
linking phase to do some calculations with regards to its size.
As a consequence of DECL_PRESERVE(foobar) I cannot build GCC with --
enable-checking because it fails the check in: fold-const.c and shows the
internal compiler error: fold check: original tree changed by fold
This is really annoying since I like to run my tests with --enable-
checking=full to get the most of the checks in GCC but I can't with this
issue lying around. I am open to suggestions on how to mark the function
as preserve is the function name is referred to by a function builtin.