This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fold_builtin changes tree


Hi,

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 
message:
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.

Cheers,

-- 
PMatos


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]